vkd3d-shader/hlsl: Make regset an output argument in hlsl_type_get_component_offset().

Components only span across a single regset, so instead of expecting the
regset as input for the offset, hlsl_type_get_component_offset() can
actually retrieve it.
This commit is contained in:
Francisco Casas
2023-06-09 16:55:21 -04:00
committed by Alexandre Julliard
parent b5c0c9c22f
commit dfce1e7f4a
Notes: Alexandre Julliard 2023-10-05 22:36:55 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/342
3 changed files with 17 additions and 14 deletions

View File

@ -3250,8 +3250,7 @@ static struct extern_resource *sm4_get_extern_resources(struct hlsl_ctx *ctx, un
if (!hlsl_type_is_resource(component_type))
continue;
regset = hlsl_type_get_regset(component_type);
regset_offset = hlsl_type_get_component_offset(ctx, var->data_type, regset, k);
regset_offset = hlsl_type_get_component_offset(ctx, var->data_type, k, &regset);
if (regset_offset > var->regs[regset].allocation_size)
continue;