radv: fix another regression since shadow fixes.
authorDave Airlie <airlied@redhat.com>
Mon, 5 Dec 2016 00:13:49 +0000 (10:13 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 5 Dec 2016 00:14:37 +0000 (10:14 +1000)
This fixes:
dEQP-VK.glsl.texture_gather.basic.2d.depth32f.*

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_nir_to_llvm.c

index df121d853c2b0b55e120f7ae50efcb9572bbe195..6b91e93f3cb5e66e335e9a643699c4ddfe945266 100644 (file)
@@ -3660,7 +3660,7 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
 
        if (instr->op == nir_texop_query_levels)
                result = LLVMBuildExtractElement(ctx->builder, result, LLVMConstInt(ctx->i32, 3, false), "");
-       else if (instr->is_shadow && instr->op != nir_texop_txs && instr->op != nir_texop_lod)
+       else if (instr->is_shadow && instr->op != nir_texop_txs && instr->op != nir_texop_lod && instr->op != nir_texop_tg4)
                result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, "");
        else if (instr->op == nir_texop_txs &&
                 instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&