r600/sfn: Set unnormalized flag for z-coordinate when fetching from array
authorGert Wollny <gert.wollny@collabora.com>
Sat, 30 Jan 2021 18:08:55 +0000 (19:08 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 1 Feb 2021 10:11:49 +0000 (10:11 +0000)
It shouldn't be relewant for fetch, but the TGSI code path does it, so
let's do it here as well.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>

src/gallium/drivers/r600/sfn/sfn_emittexinstruction.cpp

index adb10fc..449035a 100644 (file)
@@ -516,6 +516,9 @@ bool EmitTexInstruction::emit_tex_txf(nir_tex_instr* instr, TexInputs& src)
          ir->set_flag(alu_last_instr);
    }
 
+   if (instr->is_array)
+      tex_ir->set_flag(TexInstruction::z_unnormalized);
+
    emit_instruction(tex_ir);
    return true;
 }
@@ -532,6 +535,7 @@ bool EmitTexInstruction::emit_tex_lod(nir_tex_instr* instr, TexInputs& src)
                                  sampler.id + R600_MAX_CONST_BUFFERS, src.sampler_offset);
    irt->set_dest_swizzle({1,0,7,7});
    emit_instruction(irt);
+
    return true;
 
 }