From 0fc6c17bf214708cf1729ec7ed08ec48b1bea3ea Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 17 Nov 2017 11:18:38 -0700 Subject: svga: allow TGSI_TEXTURE_CUBE_ARRAY in emit_tg4() Technically, SM4.1 doesn't support cube map arrays, but our backend renderers actually do. This allows the Piglit textureGather cube map array tests to pass. Tested with GLrenderer, DX11renderer and SWrenderer. Reviewed-by: Neha Bhende Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/gallium/drivers/svga') diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index abfbd523605..87669618319 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -5329,7 +5329,6 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { const uint unit = inst->Src[2].Register.Index; - unsigned target = inst->Texture.Texture; struct tgsi_full_src_register src; int offsets[3]; @@ -5337,12 +5336,8 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, if (!is_valid_tex_instruction(emit, inst)) return TRUE; - if (target == TGSI_TEXTURE_CUBE_ARRAY) { - debug_printf("TGSI_TEXTURE_CUBE_ARRAY is not supported\n"); - return TRUE; - } - - /* Only single channel is supported in SM4_1. + /* Only a single channel is supported in SM4_1 and we report + * PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS = 1. * Only the 0th component will be gathered. */ switch (emit->key.tex[unit].swizzle_r) { -- cgit v1.2.3