mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/ir: Introduce vsir_register_is_descriptor().
This commit is contained in:
committed by
Alexandre Julliard
parent
22960753e9
commit
215a2c4ede
Notes:
Alexandre Julliard
2023-11-13 23:30:13 +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/467
@@ -3396,21 +3396,6 @@ static bool spirv_compiler_get_register_info(const struct spirv_compiler *compil
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool register_is_descriptor(const struct vkd3d_shader_register *reg)
|
||||
{
|
||||
switch (reg->type)
|
||||
{
|
||||
case VKD3DSPR_SAMPLER:
|
||||
case VKD3DSPR_RESOURCE:
|
||||
case VKD3DSPR_CONSTBUFFER:
|
||||
case VKD3DSPR_UAV:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool spirv_compiler_enable_descriptor_indexing(struct spirv_compiler *compiler,
|
||||
enum vkd3d_shader_register_type reg_type, enum vkd3d_shader_resource_type resource_type)
|
||||
{
|
||||
@@ -3536,7 +3521,7 @@ static void spirv_compiler_emit_dereference_register(struct spirv_compiler *comp
|
||||
FIXME("Relative addressing not implemented.\n");
|
||||
|
||||
/* Handle arrayed registers, e.g. v[3][0]. */
|
||||
if (reg->idx_count > 1 && !register_is_descriptor(reg))
|
||||
if (reg->idx_count > 1 && !vsir_register_is_descriptor(reg))
|
||||
indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[0]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user