vkd3d-shader/hlsl: Evaluate index before array.

Co-authored-by: Francisco Casas <fcasas@codeweavers.com>
This commit is contained in:
Zebediah Figura 2023-03-24 20:19:39 -03:00 committed by Alexandre Julliard
parent af1aa63ace
commit 8ed7437708
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
2 changed files with 2 additions and 2 deletions

View File

@ -5473,7 +5473,7 @@ postfix_expr:
{
struct hlsl_ir_node *array = node_from_list($1), *index = node_from_list($3);
list_move_tail($1, $3);
list_move_head($1, $3);
vkd3d_free($3);
if (!add_array_access(ctx, $1, array, index, &@2))

View File

@ -44,4 +44,4 @@ float4 main() : sv_target
[test]
draw quad
todo probe all rgba (2.2, 2.2, 2.2, 2.2)
probe all rgba (2.2, 2.2, 2.2, 2.2)