15 Mar
2024
15 Mar
'24
8:40 a.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/fx.c:
set_u32(buffer, count_offset, count); }
+static uint32_t get_fx_2_type_size(const struct hlsl_type *type) +{ + uint32_t size = 0, elements_count; + size_t i; + + if (type->class == HLSL_CLASS_ARRAY) + { + elements_count = hlsl_get_multiarray_size(type); + type = hlsl_get_multiarray_element_type(type); + return get_fx_2_type_size(type) * elements_count; + } + else if (type->class == HLSL_CLASS_STRUCT)
I guess structs can only contain numeric types, right? Otherwise the following function doesn't look right. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/717#note_64890