vkd3d-shader/hlsl: Track whether a variable is read in any entry function.

This commit is contained in:
Shaun Ren
2024-10-04 20:15:57 -04:00
committed by Henri Verbeet
parent f15a1c0b23
commit 5f8570b933
Notes: Henri Verbeet 2024-10-15 17:03:41 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1154
3 changed files with 20 additions and 2 deletions

View File

@@ -488,6 +488,8 @@ struct hlsl_ir_var
* range). The IR instructions are numerated starting from 2, because 0 means unused, and 1
* means function entry. */
unsigned int first_write, last_read;
/* Whether the variable is read in any entry function. */
bool is_read;
/* Offset where the variable's value is stored within its buffer in numeric register components.
* This in case the variable is uniform. */
unsigned int buffer_offset;