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 <marek.olsak@amd.com>
case TGSI_OPCODE_TXL2:
case TGSI_OPCODE_LODQ:
case TGSI_OPCODE_TG4: {
case TGSI_OPCODE_TXL2:
case TGSI_OPCODE_LODQ:
case TGSI_OPCODE_TG4: {
- unsigned dim_layer_shadow =
tgsi_util_get_texture_coord_dim(inst->Texture.Texture);
tgsi_util_get_texture_coord_dim(inst->Texture.Texture);
- unsigned dim_layer, dim;
+ unsigned dim_layer_shadow, dim;
if (tgsi_is_shadow_target(inst->Texture.Texture)) {
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)
if (inst->Texture.Texture == TGSI_TEXTURE_SHADOW1D)
- dim_layer = dim_layer_shadow;
+ dim_layer_shadow = dim_layer;