diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-06-24 17:29:43 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-07-05 12:33:55 +0200 |
commit | 16f5fb16f9c9319a96ccbdfbea1900fbf6108464 (patch) | |
tree | 6b04d1287930534d0f745f8f44705fb535e9a13a | |
parent | 13cff379e3212286af33ba63c8c1edd5258efedf (diff) |
ac/nir: handle old-style shadow tex instructions correctly
The first element is only extracted for new-style shadow tex.
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 158d183a9e..16729a8a3c 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4598,7 +4598,9 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr) if (instr->op == nir_texop_query_levels) result = LLVMBuildExtractElement(ctx->ac.builder, result, LLVMConstInt(ctx->ac.i32, 3, false), ""); - else if (instr->is_shadow && instr->op != nir_texop_txs && instr->op != nir_texop_lod && instr->op != nir_texop_tg4) + else if (instr->is_shadow && instr->is_new_style_shadow && + instr->op != nir_texop_txs && instr->op != nir_texop_lod && + instr->op != nir_texop_tg4) result = LLVMBuildExtractElement(ctx->ac.builder, result, ctx->ac.i32_0, ""); else if (instr->op == nir_texop_txs && instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE && |