[PATCH vkd3d 3/8] vkd3d-shader/hlsl: Don't assert that the array element type has a nonzero register size.

Giovanni Mascellani gmascellani at codeweavers.com
Tue May 3 06:15:37 CDT 2022


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 at codeweavers.com>
> 
> Il 03/05/22 11:57, Giovanni Mascellani ha scritto:
>> From: Zebediah Figura <zfigura at 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
> 



More information about the wine-devel mailing list