mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01: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>
This commit is contained in:
parent
9838db8f64
commit
b56b54cbf1
1 changed files with 3 additions and 1 deletions
|
|
@ -3627,7 +3627,9 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
|
|||
|
||||
result = build_tex_intrinsic(ctx, instr, &tinfo);
|
||||
|
||||
if (instr->op == nir_texop_query_levels)
|
||||
if (instr->is_shadow)
|
||||
result = LLVMBuildExtractElement(ctx->builder, result, ctx->i32zero, "");
|
||||
else if (instr->op == nir_texop_query_levels)
|
||||
result = LLVMBuildExtractElement(ctx->builder, result, LLVMConstInt(ctx->i32, 3, false), "");
|
||||
else if (instr->op == nir_texop_txs &&
|
||||
instr->sampler_dim == GLSL_SAMPLER_DIM_CUBE &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue