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

@@ -1098,7 +1098,7 @@ static void shader_sm1_read_instruction(struct vkd3d_shader_sm1_parser *sm1, str
goto fail;
}
vsir_instruction_init(ins, opcode_info->vkd3d_opcode);
vsir_instruction_init(ins, &sm1->p.location, opcode_info->vkd3d_opcode);
ins->flags = (opcode_token & VKD3D_SM1_INSTRUCTION_FLAGS_MASK) >> VKD3D_SM1_INSTRUCTION_FLAGS_SHIFT;
ins->coissue = opcode_token & VKD3D_SM1_COISSUE;
ins->raw = false;