vkd3d-shader/dxil: Emit an error if a CMPXCHG instruction uses a forward-referenced pointer.

This commit is contained in:
Conor McCarthy 2024-04-27 00:13:10 +10:00 committed by Alexandre Julliard
parent b67a68b486
commit 05510c118a
Notes: Alexandre Julliard 2024-04-30 23:14:34 +02: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/836

View File

@ -6462,7 +6462,8 @@ static void sm6_parser_emit_cmpxchg(struct sm6_parser *sm6, const struct dxil_re
uint64_t code;
if (!(ptr = sm6_parser_get_value_by_ref(sm6, record, NULL, &i))
|| !sm6_value_validate_is_pointer_to_i32(ptr, sm6))
|| !sm6_value_validate_is_pointer_to_i32(ptr, sm6)
|| !sm6_value_validate_is_backward_ref(ptr, sm6))
return;
if (ptr->u.reg.type != VKD3DSPR_GROUPSHAREDMEM)