aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2017-10-18 23:13:58 +0200
committerRoland Scheidegger <[email protected]>2017-10-19 16:33:39 +0200
commit77b8392858815625ee7909cf9e866043dab9d074 (patch)
tree10e783f1a1d1e4d57bb443323d8cc6c6cdbacc39 /src/gallium/auxiliary
parenta6c55243b9266d3e63d2ebd2e568990bbe493596 (diff)
tgsi: fix tgsi_util_get_inst_usage_mask
The logic for handling shadow coords was completely broken. Fixes be3ab867bd444594f9d9e0f8e59d305d15769afd. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103265 Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index be8bcdf1233..cfce59093c2 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -292,17 +292,17 @@ tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst,
case TGSI_OPCODE_TXL2:
case TGSI_OPCODE_LODQ:
case TGSI_OPCODE_TG4: {
- unsigned dim_layer_shadow =
+ unsigned dim_layer =
tgsi_util_get_texture_coord_dim(inst->Texture.Texture);
- unsigned dim_layer, dim;
+ unsigned dim_layer_shadow, dim;
- /* Remove shadow. */
+ /* Add shadow. */
if (tgsi_is_shadow_target(inst->Texture.Texture)) {
- dim_layer = dim_layer_shadow - 1;
+ dim_layer_shadow = dim_layer + 1;
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D)
- dim_layer = 1;
+ dim_layer_shadow = 3;
} else {
- dim_layer = dim_layer_shadow;
+ dim_layer_shadow = dim_layer;
}
/* Remove layer. */