vkd3d-shader/ir: Free the semantic names of deleted signature elements in shader_signature_merge(). (Valgrind)

This commit is contained in:
Conor McCarthy 2024-09-06 16:41:24 +10:00 committed by Henri Verbeet
parent 828dfdf1bd
commit e550901efa
Notes: Henri Verbeet 2024-09-10 21:57:52 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1050

View File

@ -1401,6 +1401,8 @@ static bool shader_signature_merge(struct shader_signature *s, uint8_t range_map
else else
e->interpolation_mode = f->interpolation_mode; e->interpolation_mode = f->interpolation_mode;
} }
vkd3d_free((void *)f->semantic_name);
} }
} }
element_count = new_count; element_count = new_count;
@ -1428,6 +1430,12 @@ static bool shader_signature_merge(struct shader_signature *s, uint8_t range_map
TRACE("Merging %s, base reg %u, count %u.\n", e->semantic_name, e->register_index, register_count); TRACE("Merging %s, base reg %u, count %u.\n", e->semantic_name, e->register_index, register_count);
e->register_count = register_count; e->register_count = register_count;
e->mask = signature_element_range_expand_mask(e, register_count, range_map); e->mask = signature_element_range_expand_mask(e, register_count, range_map);
for (j = 1; j < register_count; ++j)
{
f = &elements[i + j];
vkd3d_free((void *)f->semantic_name);
}
} }
} }
element_count = new_count; element_count = new_count;