i965: Render R16G16B16X16 as R16G16B16A16
authorAnuj Phogat <anuj.phogat@gmail.com>
Fri, 10 Apr 2015 11:35:24 +0000 (04:35 -0700)
committerAnuj Phogat <anuj.phogat@gmail.com>
Fri, 17 Apr 2015 18:48:38 +0000 (11:48 -0700)
This enables using _mesa_meta_pbo_TexSubImage() to upload data
to R16G16B16X16 texture. Earlier it fell back to slower paths.

Jenkins run shows no piglit regressions.

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

index c7fb70733816ea1c106570d5ea717fcbb4054452..c5fde350fe3d02aa33d50e550da8120e537bc03d 100644 (file)
@@ -590,6 +590,12 @@ brw_init_surface_formats(struct brw_context *brw)
       case BRW_SURFACEFORMAT_L16_UNORM:
          render = BRW_SURFACEFORMAT_R16_UNORM;
          break;
+      case BRW_SURFACEFORMAT_R16G16B16X16_UNORM:
+         render = BRW_SURFACEFORMAT_R16G16B16A16_UNORM;
+         break;
+      case BRW_SURFACEFORMAT_R16G16B16X16_FLOAT:
+         render = BRW_SURFACEFORMAT_R16G16B16A16_FLOAT;
+         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