From 080f25c5839f8fe3ee8b082143cfff66b2497eb5 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 9 Oct 2024 22:37:56 +0200 Subject: [PATCH] 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. --- libs/vkd3d-shader/ir.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index b818edaa..7e021ed8 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -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; }