vkd3d-shader/hlsl: Introduce hlsl_ir_index.

This node type is intended for use during parse-time.

While we parse an indexing expression such as "a[3]", we don't know if
it will end up as part of an expression (in which case it must be folded
into a load) or it is for the lhs of a store (in which case it must be
folded into the store's deref).
This commit is contained in:
Francisco Casas
2023-02-24 16:39:56 -03:00
committed by Alexandre Julliard
parent 8cd3defe0d
commit 741c9e5893
Notes: Alexandre Julliard 2023-04-13 23:20:40 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
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/124
4 changed files with 85 additions and 0 deletions

View File

@@ -1210,6 +1210,7 @@ static unsigned int evaluate_static_expression(struct hlsl_ir_node *node)
}
case HLSL_IR_EXPR:
case HLSL_IR_INDEX:
case HLSL_IR_LOAD:
case HLSL_IR_RESOURCE_LOAD:
case HLSL_IR_SWIZZLE: