Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com> I agree, it is also legal to declare empty structs, and we also will need to represent implicit size arrays as size 0 arrays if they are incorrectly initialized. (Unless we want to immediately abort when we find them). May 3, 2022 6:14 AM, "Giovanni Mascellani" <gmascellani(a)codeweavers.com> wrote:
From: Zebediah Figura <zfigura(a)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 -- 2.36.0