diff options
author | Ian Romanick <[email protected]> | 2012-07-12 13:52:06 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-10-29 09:55:42 -0700 |
commit | 1f6e10f67b0fce811eb91abfbdb3e9c6ed0035a3 (patch) | |
tree | 6a4aad0d93d6ee04a9d9c6fe6503ff25988990a3 /src/mesa/drivers/dri/nouveau | |
parent | 43d6fe156b2bf9754aaa65776e001c927275d765 (diff) |
dri: Convert driCreateConfigs to use a gl_format enum
This is instead of the pair of GLenums for format and type that were
previously used. This is necessary for the Intel drivers to expose sRGB
framebuffer formats.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_screen.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 4f78a82846d..dc6d758f771 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -52,24 +52,20 @@ nouveau_get_configs(void) const uint8_t stencil_bits[] = { 0, 0, 0, 8 }; const uint8_t msaa_samples[] = { 0 }; - const struct { - GLenum format; - GLenum type; - } fb_formats[] = { - { GL_RGB , GL_UNSIGNED_SHORT_5_6_5 }, - { GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV }, - { GL_BGR , GL_UNSIGNED_INT_8_8_8_8_REV }, + static const gl_format formats[3] = { + MESA_FORMAT_RGB565, + MESA_FORMAT_ARGB8888, + MESA_FORMAT_XRGB8888, }; const GLenum back_buffer_modes[] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML }; - for (i = 0; i < Elements(fb_formats); i++) { + for (i = 0; i < Elements(formats); i++) { __DRIconfig **config; - config = driCreateConfigs(fb_formats[i].format, - fb_formats[i].type, + config = driCreateConfigs(formats[i], depth_bits, stencil_bits, Elements(depth_bits), back_buffer_modes, |