vkd3d-shader/spirv: Declare indexable temps as Private unless function scope is specified.

This commit is contained in:
Conor McCarthy
2024-01-12 12:47:19 +10:00
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
4 changed files with 12 additions and 5 deletions

View File

@@ -1117,6 +1117,8 @@ static void shader_sm4_read_dcl_indexable_temp(struct vkd3d_shader_instruction *
ins->declaration.indexable_temp.alignment = 0;
ins->declaration.indexable_temp.data_type = VKD3D_DATA_FLOAT;
ins->declaration.indexable_temp.component_count = *tokens;
/* Indexable temp declarations are global, but except for hull shaders the backend currently emits them within a function. */
ins->declaration.indexable_temp.has_function_scope = priv->p.shader_version.type != VKD3D_SHADER_TYPE_HULL;
}
static void shader_sm4_read_dcl_global_flags(struct vkd3d_shader_instruction *ins, uint32_t opcode,