mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/spirv: Declare indexable temps as Private unless function scope is specified.
This commit is contained in:
committed by
Alexandre Julliard
parent
37d9dba512
commit
b4b2b0d3ac
Notes:
Alexandre Julliard
2024-01-17 22:42:55 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450
@@ -5597,7 +5597,10 @@ static void spirv_compiler_emit_dcl_indexable_temp(struct spirv_compiler *compil
|
||||
SpvStorageClass storage_class;
|
||||
size_t function_location;
|
||||
|
||||
storage_class = SpvStorageClassFunction;
|
||||
/* Indexable temps may be used by more than one function in hull shaders, and
|
||||
* declarations generally should not occur within VSIR code blocks unless function
|
||||
* scope is specified, e.g. DXIL alloca. */
|
||||
storage_class = temp->has_function_scope ? SpvStorageClassFunction : SpvStorageClassPrivate;
|
||||
|
||||
vsir_register_init(®, VKD3DSPR_IDXTEMP, VKD3D_DATA_FLOAT, 1);
|
||||
reg.idx[0].offset = temp->register_idx;
|
||||
|
||||
Reference in New Issue
Block a user