mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/ir: Introduce vsir_program_append().
To append an instruction to the end of the vsir program.
This commit is contained in:
committed by
Henri Verbeet
parent
b4bf2af315
commit
0789578175
Notes:
Henri Verbeet
2025-07-22 17:21:09 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1635
@@ -1583,6 +1583,16 @@ bool vsir_instruction_init_with_params(struct vsir_program *program,
|
||||
struct vkd3d_shader_instruction *ins, const struct vkd3d_shader_location *location,
|
||||
enum vkd3d_shader_opcode opcode, unsigned int dst_count, unsigned int src_count);
|
||||
|
||||
static inline struct vkd3d_shader_instruction *vsir_program_append(struct vsir_program *program)
|
||||
{
|
||||
struct vkd3d_shader_instruction_array *array = &program->instructions;
|
||||
|
||||
if (!shader_instruction_array_insert_at(array, array->count, 1))
|
||||
return NULL;
|
||||
|
||||
return &array->elements[array->count - 1];
|
||||
}
|
||||
|
||||
static inline struct vkd3d_shader_dst_param *vsir_program_get_dst_params(
|
||||
struct vsir_program *program, unsigned int count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user