[Mesa-dev] [PATCH V3 07/30] i965: Render R8G8B8X8 as R8G8B8A8

Chris Forbes chrisf at ijw.co.nz
Wed Apr 2 01:05:03 PDT 2014


The sampler can handle R8G8B8X8 (and substitute 1.0 for the fourth
component) but we can't use it as a render target.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_surface_formats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index f203f52..3f82f80 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -583,6 +583,9 @@ brw_init_surface_formats(struct brw_context *brw)
 	  */
 	 render = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
 	 break;
+      case BRW_SURFACEFORMAT_R8G8B8X8_UNORM:
+         render = BRW_SURFACEFORMAT_R8G8B8A8_UNORM;
+         break;
       }
 
       rinfo = &surface_formats[render];
-- 
1.9.1



More information about the mesa-dev mailing list