mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/dxil: Use vsir_program_append() in sm6_parser_add_instruction().
This commit is contained in:
committed by
Henri Verbeet
parent
49e189fec6
commit
1ee42bd406
Notes:
Henri Verbeet
2025-08-29 15:13:14 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1690
@@ -3665,14 +3665,15 @@ static struct vkd3d_shader_instruction *sm6_parser_require_space(struct sm6_pars
|
|||||||
return &instructions->elements[instructions->count];
|
return &instructions->elements[instructions->count];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Space should be reserved before calling this. It is intended to require no checking of the returned pointer. */
|
|
||||||
static struct vkd3d_shader_instruction *sm6_parser_add_instruction(struct sm6_parser *sm6,
|
static struct vkd3d_shader_instruction *sm6_parser_add_instruction(struct sm6_parser *sm6,
|
||||||
enum vkd3d_shader_opcode handler_idx)
|
enum vkd3d_shader_opcode op)
|
||||||
{
|
{
|
||||||
struct vkd3d_shader_instruction *ins = sm6_parser_require_space(sm6, 1);
|
struct vkd3d_shader_instruction *ins;
|
||||||
VKD3D_ASSERT(ins);
|
|
||||||
vsir_instruction_init(ins, &sm6->p.location, handler_idx);
|
if (!(ins = vsir_program_append(sm6->program)))
|
||||||
++sm6->program->instructions.count;
|
return NULL;
|
||||||
|
vsir_instruction_init(ins, &sm6->p.location, op);
|
||||||
|
|
||||||
return ins;
|
return ins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user