vkd3d-shader: Embed the parsing location in vkd3d_shader_instruction.

So that it can be used for printing meaningful error locations by
downstream processors.
This commit is contained in:
Giovanni Mascellani
2023-09-05 11:31:31 +02:00
committed by Alexandre Julliard
parent 531c41306d
commit cf871d2cb2
Notes: Alexandre Julliard 2023-09-22 22:46:19 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/317
5 changed files with 28 additions and 19 deletions

View File

@@ -2327,7 +2327,7 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_sm4_parser *sm4, str
return;
}
vsir_instruction_init(ins, opcode_info->handler_idx);
vsir_instruction_init(ins, &sm4->p.location, opcode_info->handler_idx);
if (ins->handler_idx == VKD3DSIH_HS_CONTROL_POINT_PHASE || ins->handler_idx == VKD3DSIH_HS_FORK_PHASE
|| ins->handler_idx == VKD3DSIH_HS_JOIN_PHASE)
sm4->phase = ins->handler_idx;