From: Charmaine Lee Date: Fri, 8 Dec 2017 05:29:49 +0000 (-0800) Subject: svga: add missing devcap check for texture array support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fdf58851833c6521fba7038425dcea8f063ced38;p=mesa.git svga: add missing devcap check for texture array support The patch checks DXFMT_ARRAY devcap for texture array support. Tested with MTT-piglit. No regressions. Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index 1eb03b9a4dd..5baf8f87f28 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -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)