Mesa (10.2): radeonsi: fix samplerCubeShadow with bias

Carl Worth cworth at kemper.freedesktop.org
Mon Jul 14 20:58:37 UTC 2014


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Jul  4 03:19:58 2014 +0200

radeonsi: fix samplerCubeShadow with bias

Pack the depth value before overwriting it with cube coordinates.

Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit b279f0143f4dce67c8f5af57cd4a5942eb403c13)

Conflicts:
	src/gallium/drivers/radeonsi/si_shader.c

---

 src/gallium/drivers/radeonsi/si_shader.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 0d070d3..09c99eb 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1540,9 +1540,6 @@ static void tex_fetch_args(
 	if (opcode == TGSI_OPCODE_TXB)
 		address[count++] = coords[3];
 
-	if (target == TGSI_TEXTURE_CUBE || target == TGSI_TEXTURE_SHADOWCUBE)
-		radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data, coords);
-
 	/* Pack depth comparison value */
 	switch (target) {
 	case TGSI_TEXTURE_SHADOW1D:
@@ -1558,6 +1555,9 @@ static void tex_fetch_args(
 		address[count++] = lp_build_emit_fetch(bld_base, inst, 1, 0);
 	}
 
+	if (target == TGSI_TEXTURE_CUBE || target == TGSI_TEXTURE_SHADOWCUBE)
+		radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data, coords);
+
 	/* Pack user derivatives */
 	if (opcode == TGSI_OPCODE_TXD) {
 		for (chan = 0; chan < 2; chan++) {




More information about the mesa-commit mailing list