Commit 2c5b43c8 authored by Bas Nieuwenhuizen's avatar Bas Nieuwenhuizen

ac/nir: Fix nir_texop_lod on GFX for 1D arrays.

Fixes: 1bcb953e 'radv: handle GFX9 1D textures'
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
parent da9c3cd3
......@@ -4747,7 +4747,9 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
filler = LLVMConstReal(ctx->ac.f32, 0.5);
if (instr->sampler_dim == GLSL_SAMPLER_DIM_1D) {
if (instr->is_array) {
/* No nir_texop_lod, because it does not take a slice
* even with array textures. */
if (instr->is_array && instr->op != nir_texop_lod ) {
address[count] = address[count - 1];
address[count - 1] = filler;
count++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment