svga: add missing devcap check for texture array support
authorCharmaine Lee <charmainel@vmware.com>
Fri, 8 Dec 2017 05:29:49 +0000 (21:29 -0800)
committerBrian Paul <brianp@vmware.com>
Mon, 10 Sep 2018 19:07:30 +0000 (13:07 -0600)
The patch checks DXFMT_ARRAY devcap for texture array support.

Tested with MTT-piglit. No regressions.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_format.c

index 1eb03b9a4dd2c3c60c47268235aefd3e5b948390..5baf8f87f28d0378214224a88b99a9f2b4e8c231 100644 (file)
@@ -2442,8 +2442,18 @@ svga_is_dx_format_supported(struct pipe_screen *screen,
    if (bindings & PIPE_BIND_DEPTH_STENCIL)
       mask |= SVGA3D_DXFMT_DEPTH_RENDERTARGET;
 
-   if (target == PIPE_TEXTURE_3D)
+   switch (target) {
+   case PIPE_TEXTURE_3D:
       mask |= SVGA3D_DXFMT_VOLUME;
+      break;
+   case PIPE_TEXTURE_1D_ARRAY:
+   case PIPE_TEXTURE_2D_ARRAY:
+   case PIPE_TEXTURE_CUBE_ARRAY:
+      mask |= SVGA3D_DXFMT_ARRAY;
+      break;
+   default:
+      break;
+   }
 
    /* Is the format supported for rendering */
    if ((caps.u & mask) != mask)