mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Use hlsl_ir_index for resource access.
This patch makes index expressions on resources hlsl_ir_index nodes instead of hlsl_ir_resource_load nodes, because it is not known if they will be used later as the lhs of an hlsl_ir_resource_store. For now, the only benefit is consistency.
This commit is contained in:
committed by
Alexandre Julliard
parent
e2dac061e2
commit
4aaf6b8895
Notes:
Alexandre Julliard
2023-05-03 22:38:15 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/182
@@ -1369,6 +1369,11 @@ bool hlsl_index_is_noncontiguous(struct hlsl_ir_index *index)
|
||||
return type->class == HLSL_CLASS_MATRIX && !hlsl_type_is_row_major(type);
|
||||
}
|
||||
|
||||
bool hlsl_index_is_resource_access(struct hlsl_ir_index *index)
|
||||
{
|
||||
return index->val.node->data_type->class == HLSL_CLASS_OBJECT;
|
||||
}
|
||||
|
||||
struct hlsl_ir_node *hlsl_new_index(struct hlsl_ctx *ctx, struct hlsl_ir_node *val,
|
||||
struct hlsl_ir_node *idx, const struct vkd3d_shader_location *loc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user