diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 9cce5689d09..e8ad6da2926 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -583,6 +583,9 @@ translate_tex_format(gl_format mesa_format, GLenum depth_mode, GLenum srgb_decode) { + if (srgb_decode == GL_SKIP_DECODE_EXT) + mesa_format = _mesa_get_srgb_format_linear(mesa_format); + switch( mesa_format ) { case MESA_FORMAT_Z16: @@ -598,14 +601,6 @@ translate_tex_format(gl_format mesa_format, case MESA_FORMAT_Z32_FLOAT_X24S8: return BRW_SURFACEFORMAT_R32G32_FLOAT; - case MESA_FORMAT_SARGB8: - case MESA_FORMAT_SLA8: - case MESA_FORMAT_SL8: - if (srgb_decode == GL_DECODE_EXT) - return brw_format_for_mesa_format(mesa_format); - else if (srgb_decode == GL_SKIP_DECODE_EXT) - return brw_format_for_mesa_format(_mesa_get_srgb_format_linear(mesa_format)); - case MESA_FORMAT_RGBA8888_REV: /* This format is not renderable? */ return BRW_SURFACEFORMAT_R8G8B8A8_UNORM; |