i965: fix fbo-srgb on i965.
authorDave Airlie <airlied@gmail.com>
Thu, 13 Jan 2011 05:46:44 +0000 (15:46 +1000)
committerDave Airlie <airlied@gmail.com>
Fri, 14 Jan 2011 04:58:47 +0000 (14:58 +1000)
Until we get the EXT_framebuffer_sRGB extension we should bind the sRGB
formats for FBO as linear.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index e921d8a9a1d374b8f776ac3d23b6dcacc80227f3..233fe3b731065d2c5cae1b8cb8340c192674f1ed 100644 (file)
@@ -435,6 +435,11 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
        */
       surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
       break;
+   case MESA_FORMAT_SARGB8:
+      /* without GL_EXT_framebuffer_sRGB we shouldn't bind sRGB
+        surfaces to the blend/update as sRGB */
+      surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+      break;
    default:
       surf.ss0.surface_format = brw_format_for_mesa_format[irb->Base.Format];
       assert(surf.ss0.surface_format != 0);