mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
tgsi: fix tgsi_util_get_inst_usage_mask
The logic for handling shadow coords was completely broken.
Fixes be3ab867bd.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103265
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
a6c55243b9
commit
77b8392858
1 changed files with 6 additions and 6 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue