Mesa (master): radeonsi: Fix cube texture coordinates.

Michel Dänzer daenzer at kemper.freedesktop.org
Thu Dec 6 19:35:56 UTC 2012


Module: Mesa
Branch: master
Commit: e0f2ffc3d9dfa1c0492370d4d86a310c56a99e90
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0f2ffc3d9dfa1c0492370d4d86a310c56a99e90

Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Mon Dec  3 12:46:30 2012 +0100

radeonsi: Fix cube texture coordinates.

8 more piglits.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

---

 src/gallium/drivers/radeonsi/radeonsi_shader.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index d5d56c4..a452d4b 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -813,6 +813,13 @@ static void tex_fetch_args(
 		emit_data->args[1] = lp_build_emit_fetch(bld_base, emit_data->inst,
 							 0, LP_CHAN_ALL);
 
+	if ((inst->Texture.Texture == TGSI_TEXTURE_CUBE ||
+	     inst->Texture.Texture == TGSI_TEXTURE_SHADOWCUBE) &&
+	    inst->Instruction.Opcode != TGSI_OPCODE_TXQ) {
+		radeon_llvm_emit_prepare_cube_coords(bld_base, &emit_data->args[1],
+						     inst->Texture.Texture);
+	}
+
 	/* Resource */
 	ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V8I32, SI_SGPR_RESOURCE);
 	offset = lp_build_const_int32(bld_base->base.gallivm,




More information about the mesa-commit mailing list