i965: Add B8G8R8X8_SRGB to the alpha format override
authorNeil Roberts <neil@linux.intel.com>
Fri, 11 Dec 2015 12:32:17 +0000 (12:32 +0000)
committerNeil Roberts <neil@linux.intel.com>
Sun, 13 Dec 2015 14:29:41 +0000 (14:29 +0000)
brw_init_surface_formats overrides the render format for RGBX formats
which aren't supported for rendering so that they internally use RGBA
instead. However, B8G8R8X8_SRGB was missing so it wasn't marked as a
renderable format. This patch just adds it.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_surface_formats.c

index 3fc47c3..7bc8b8b 100644 (file)
@@ -674,6 +674,10 @@ brw_init_surface_formats(struct brw_context *brw)
          if (gen < tinfo->render_target)
             render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
         break;
+      case BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB:
+         if (gen < tinfo->render_target)
+            render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
+         break;
       case BRW_SURFACEFORMAT_R8G8B8X8_UNORM:
          render = BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
          break;