diff options
author | Dave Airlie <airlied@redhat.com> | 2016-10-25 07:47:13 +1000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-28 12:56:18 +0000 |
commit | 87b76f0e058658ffe122b97e8dc7e7dc19d49265 (patch) | |
tree | d859758791ada6295f83bb8f10aa6fa6e001ca64 | |
parent | 17dee709a9b8ac358374d26c1f4efe5c7b09f5bd (diff) | |
download | external_mesa3d-87b76f0e058658ffe122b97e8dc7e7dc19d49265.zip external_mesa3d-87b76f0e058658ffe122b97e8dc7e7dc19d49265.tar.gz external_mesa3d-87b76f0e058658ffe122b97e8dc7e7dc19d49265.tar.bz2 |
radv/ac/llvm: shadow samplers only return one value.
The intrinsic engine asserts in llvm due to this.
Reported-by: Christoph Haag <haagch+mesadev@frickel.club>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b56b54cbf1d8e70c87a434da5350d11533e5fed8)
Squashed with commit:
radv/ac/llvm: fix regression with shadow samplers fix
This fixes b56b54cbf1d8e70c87a434da5350d11533e5fed8:
radv/ac/llvm: shadow samplers only return one value
It makes sure we only do that for shadow sampling, as
opposed to sizing requests.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit b2e217369e1ca4bf9d7741721559a4506b1f0ce8)
Squashed with commit:
radv: brown-paper bag for a forgotten else.
This fixes the fix:
radv/ac/llvm: fix regression with shadow samplers fix
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 020978af12ef6d598bc5efeae3704c0eb8cdafd2)
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 799eb34..0daef08 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3545,6 +3545,8 @@ 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) + result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, ""); else if (instr->op == nir_texop_txs && instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE && instr->is_array) { |