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

This commit is contained in:
Conor McCarthy 2024-04-27 00:12:54 +10:00 committed by Alexandre Julliard
parent 9615c38968
commit b67a68b486
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

@ -3961,7 +3961,8 @@ static void sm6_parser_emit_atomicrmw(struct sm6_parser *sm6, const struct dxil_
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)