summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-07-04 03:19:58 +0200
committerMarek Olšák <[email protected]>2014-07-11 19:36:29 +0200
commitb279f0143f4dce67c8f5af57cd4a5942eb403c13 (patch)
tree85eff88196809c3b293a985cf15404a7d9bddc64
parenta11fff329ea0b236ee5d2d7ad563af49770c04c7 (diff)
radeonsi: fix samplerCubeShadow with bias
Pack the depth value before overwriting it with cube coordinates. Cc: [email protected]
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 07d9833bd1c..7bff8f95d59 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1634,12 +1634,6 @@ static void tex_fetch_args(
if (opcode == TGSI_OPCODE_TXB2)
address[count++] = lp_build_emit_fetch(bld_base, inst, 1, 0);
- if (target == TGSI_TEXTURE_CUBE ||
- target == TGSI_TEXTURE_CUBE_ARRAY ||
- target == TGSI_TEXTURE_SHADOWCUBE ||
- target == TGSI_TEXTURE_SHADOWCUBE_ARRAY)
- radeon_llvm_emit_prepare_cube_coords(bld_base, emit_data, coords);
-
/* Pack depth comparison value */
if (tgsi_is_shadow_sampler(target) && opcode != TGSI_OPCODE_LODQ) {
if (target == TGSI_TEXTURE_SHADOWCUBE_ARRAY) {
@@ -1650,6 +1644,12 @@ static void tex_fetch_args(
}
}
+ if (target == TGSI_TEXTURE_CUBE ||
+ target == TGSI_TEXTURE_CUBE_ARRAY ||
+ target == TGSI_TEXTURE_SHADOWCUBE ||
+ target == TGSI_TEXTURE_SHADOWCUBE_ARRAY)
+ 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++) {