i965: Add the ability to render to I8/L8 and I16/L16 UNORM formats.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 29 Mar 2015 10:45:16 +0000 (03:45 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 7 Apr 2015 21:34:02 +0000 (14:34 -0700)
This allows those formats to work with the meta PBO upload path.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/brw_surface_formats.c

index 7261c01258427d4f431b334094d86068bf3900e7..7524ad9675dedc408757c3882b8a5bd455f626f9 100644 (file)
@@ -582,6 +582,14 @@ brw_init_surface_formats(struct brw_context *brw)
       case BRW_SURFACEFORMAT_L16_FLOAT:
         render = BRW_SURFACEFORMAT_R16_FLOAT;
         break;
+      case BRW_SURFACEFORMAT_I8_UNORM:
+      case BRW_SURFACEFORMAT_L8_UNORM:
+         render = BRW_SURFACEFORMAT_R8_UNORM;
+         break;
+      case BRW_SURFACEFORMAT_I16_UNORM:
+      case BRW_SURFACEFORMAT_L16_UNORM:
+         render = BRW_SURFACEFORMAT_R16_UNORM;
+         break;
       case BRW_SURFACEFORMAT_B8G8R8X8_UNORM:
         /* XRGB is handled as ARGB because the chips in this family
          * cannot render to XRGB targets.  This means that we have to