mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
After lowering the derefs path to a single offset node, there was no way of knowing the type of the referenced part of the variable. This little modification allows to avoid having to pass the data type everywhere and it is required for supporting instructions that reference objects components within struct types. Since deref->data_type allows us to retrieve the type of the deref, deref->offset_regset is no longer necessary.
This commit is contained in:
committed by
Alexandre Julliard
parent
d4b5e79c8b
commit
ae6bc398d6
Notes:
Alexandre Julliard
2023-07-17 23:25:21 +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/209
@@ -524,7 +524,9 @@ struct hlsl_type *hlsl_deref_get_type(struct hlsl_ctx *ctx, const struct hlsl_de
|
||||
unsigned int i;
|
||||
|
||||
assert(deref);
|
||||
assert(!deref->offset.node);
|
||||
|
||||
if (deref->offset.node)
|
||||
return deref->data_type;
|
||||
|
||||
type = deref->var->data_type;
|
||||
for (i = 0; i < deref->path_len; ++i)
|
||||
|
Reference in New Issue
Block a user