Actually no, I don't think I should have cherry picked this commit, as in the master branch reg_size for objects is set to 1, so there is no point in removing the assert().
Giovanni.
Il 03/05/22 12:18, Giovanni Mascellani ha scritto:
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 03/05/22 11:57, Giovanni Mascellani ha scritto:
From: Zebediah Figura zfigura@codeweavers.com
It's legal to declare arrays of object types, which don't.
libs/vkd3d-shader/hlsl.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 7239b183..95ce9445 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -165,7 +165,6 @@ static void hlsl_type_calculate_reg_size(struct hlsl_ctx *ctx, struct hlsl_type { unsigned int element_size = type->e.array.type->reg_size; - assert(element_size); if (is_sm4) type->reg_size = (type->e.array.elements_count - 1)
- align(element_size, 4) + element_size;
else