[Mesa-dev] [PATCH 08/10] radeonsi/gfx9: fix 1D array fetches with derivs, bias, or Z compare value
Marek Olšák
maraeo at gmail.com
Thu Mar 30 17:16:05 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index d4f37365..84e3305 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4547,21 +4547,21 @@ static void tex_fetch_args(
if (opcode == TGSI_OPCODE_TXF)
filler = bld_base->uint_bld.zero;
else
filler = LLVMConstReal(ctx->f32, 0.5);
if (target == TGSI_TEXTURE_1D ||
target == TGSI_TEXTURE_SHADOW1D) {
address[count++] = filler;
} else if (target == TGSI_TEXTURE_1D_ARRAY ||
target == TGSI_TEXTURE_SHADOW1D_ARRAY) {
- address[count] = coords[count - 1];
+ address[count] = address[count - 1];
address[count - 1] = filler;
count++;
}
}
/* Pack LOD or sample index */
if (opcode == TGSI_OPCODE_TXL || opcode == TGSI_OPCODE_TXF)
address[count++] = coords[3];
else if (opcode == TGSI_OPCODE_TXL2)
address[count++] = lp_build_emit_fetch(bld_base, inst, 1, TGSI_CHAN_X);
--
2.7.4
More information about the mesa-dev
mailing list