From: Marek Olšák <marek.ol...@amd.com>

---
 src/gallium/drivers/radeonsi/si_shader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index b5cb41d..a6f4ce9 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4795,21 +4795,22 @@ static void build_tex_intrinsic(const struct 
lp_build_tgsi_action *action,
        case TGSI_OPCODE_TG4:
                args.opcode = ac_image_gather4;
                args.level_zero = true;
                break;
        default:
                assert(0);
                return;
        }
 
        /* The hardware needs special lowering for Gather4 with integer 
formats. */
-       if (opcode == TGSI_OPCODE_TG4) {
+       if (ctx->screen->b.chip_class <= VI &&
+           opcode == TGSI_OPCODE_TG4) {
                struct tgsi_shader_info *info = &ctx->shader->selector->info;
                /* This will also work with non-constant indexing because of how
                 * glsl_to_tgsi works and we intent to preserve that behavior.
                 */
                const unsigned src_idx = 2;
                unsigned sampler = inst->Src[src_idx].Register.Index;
 
                assert(inst->Src[src_idx].Register.File == TGSI_FILE_SAMPLER);
 
                if (info->sampler_type[sampler] == TGSI_RETURN_TYPE_SINT ||
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to