mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Introduce hlsl_deref_is_lowered() helper.
Some functions work with dereferences and need to know if they are lowered yet. This can be known checking if deref->offset.node is NULL or deref->data_type is NULL. I am using the latter since it keeps working even after the following patches that split deref->offset into constant and variable parts.
This commit is contained in:
committed by
Alexandre Julliard
parent
e93568f290
commit
81be47c00b
Notes:
Alexandre Julliard
2023-10-31 22:38:12 +01: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/396
@@ -135,9 +135,7 @@ static bool replace_deref_path_with_offset(struct hlsl_ctx *ctx, struct hlsl_der
|
||||
struct hlsl_block block;
|
||||
|
||||
assert(deref->var);
|
||||
|
||||
/* register offsets shouldn't be used before this point is reached. */
|
||||
assert(!deref->offset.node);
|
||||
assert(!hlsl_deref_is_lowered(deref));
|
||||
|
||||
type = hlsl_deref_get_type(ctx, deref);
|
||||
|
||||
|
Reference in New Issue
Block a user