On 4/30/20 8:11 AM, Matteo Bruni wrote:
On Thu, Apr 30, 2020 at 4:55 AM Zebediah Figura z.figura12@gmail.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
dlls/d3dcompiler_43/hlsl.y | 11 ++++++++++- dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y index a33ea588ccf..9ef0b130d3d 100644 --- a/dlls/d3dcompiler_43/hlsl.y +++ b/dlls/d3dcompiler_43/hlsl.y @@ -839,6 +839,13 @@ static struct list *gen_struct_fields(struct hlsl_type *type, DWORD modifiers, s return list; }
+static DWORD get_array_size(const struct hlsl_type *type) +{
- if (type->type == HLSL_CLASS_ARRAY)
return get_array_size(type->e.array.type) * type->e.array.elements_count;
Are arrays of arrays supported in HLSL?
Yes, and they get written into the constant table as a single array. That does deserve a test, of course...