mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Allow to force alignment on some semantic vars.
This is required to properly optimize signatures, because these semantics must be alligned while being packed: - Array elements. - The first fields of structs. - Major vectors of a matrix. For now this has no effect since semantics are allocated with reg_size 4, but will have effect when optimizing interstage signatures.
This commit is contained in:
committed by
Henri Verbeet
parent
7fd6c29ee8
commit
d562b03c43
Notes:
Henri Verbeet
2024-10-22 20:54:15 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1193
@@ -516,6 +516,9 @@ struct hlsl_ir_var
|
||||
|
||||
/* Whether the shader performs dereferences with non-constant offsets in the variable. */
|
||||
bool indexable;
|
||||
/* Whether this is a semantic variable that was split from an array, or is the first
|
||||
* element of a struct, and thus needs to be aligned when packed in the signature. */
|
||||
bool force_align;
|
||||
|
||||
uint32_t is_input_semantic : 1;
|
||||
uint32_t is_output_semantic : 1;
|
||||
|
||||
Reference in New Issue
Block a user