mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
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 commitb56b54cbf1) Squashed with commit: radv/ac/llvm: fix regression with shadow samplers fix This fixesb56b54cbf1: 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 commitb2e217369e) 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 commit020978af12)
This commit is contained in:
parent
17dee709a9
commit
87b76f0e05
1 changed files with 2 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue