summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2015-12-11 12:32:17 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-08 11:54:09 +0200
commita98bc4999794efff42b01730732458a7a37ed2a4 (patch)
treeeee082a599f6d9a03233cbbb2bf3d2042e1f2fec
parent0193dc6a427e20e4ccbad153f676b241ca299167 (diff)
i965: Add B8G8R8X8_SRGB to the alpha format override
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> (cherry picked from commit 43f4be5f06b7a96b96a3a7b43f5112139a1f423a)
-rw-r--r--src/mesa/drivers/dri/i965/brw_surface_formats.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 0ecabf1f95..2b35f12dc9 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -675,6 +675,10 @@ brw_init_surface_formats(struct brw_context *brw)
*/
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;