vkd3d-shader/ir: Do not search for signature elements using a scalar write mask.

The fallback code was added when shader_signature_find_element_for_reg()
would crash when unable to find the requested signature element.
Now it doesn't any more, and the second search is redundant.
This commit is contained in:
Giovanni Mascellani 2024-10-09 22:37:56 +02:00 committed by Henri Verbeet
parent 690c47dbf8
commit 080f25c583
Notes: Henri Verbeet 2024-10-10 20:10:00 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1170

View File

@ -1221,7 +1221,7 @@ static bool shader_signature_find_element_for_reg(const struct shader_signature
unsigned int reg_idx, unsigned int write_mask, unsigned int *element_idx)
{
const struct signature_element *e;
unsigned int i, base_write_mask;
unsigned int i;
for (i = 0; i < signature->element_count; ++i)
{
@ -1234,14 +1234,6 @@ static bool shader_signature_find_element_for_reg(const struct shader_signature
}
}
/* Validated in the TPF reader, but failure in signature_element_range_expand_mask()
* can land us here on an unmatched vector mask. */
FIXME("Failed to find signature element for register index %u, mask %#x; using scalar mask.\n",
reg_idx, write_mask);
base_write_mask = 1u << vsir_write_mask_get_component_idx(write_mask);
if (base_write_mask != write_mask)
return shader_signature_find_element_for_reg(signature, reg_idx, base_write_mask, element_idx);
return false;
}