mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Rename shader_instruction_init().
This commit is contained in:
parent
78ff0f3df4
commit
05af25eecb
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
@ -1090,7 +1090,7 @@ static void shader_sm1_read_instruction(struct vkd3d_shader_sm1_parser *sm1, str
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ins->handler_idx = opcode_info->vkd3d_opcode;
|
||||
vsir_instruction_init(ins, 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;
|
||||
|
@ -1999,7 +1999,7 @@ static struct vkd3d_shader_instruction *sm6_parser_add_instruction(struct sm6_pa
|
||||
{
|
||||
struct vkd3d_shader_instruction *ins = sm6_parser_require_space(sm6, 1);
|
||||
assert(ins);
|
||||
shader_instruction_init(ins, handler_idx);
|
||||
vsir_instruction_init(ins, handler_idx);
|
||||
++sm6->p.instructions.count;
|
||||
return ins;
|
||||
}
|
||||
@ -2190,7 +2190,7 @@ static void sm6_parser_emit_dx_store_output(struct sm6_parser *sm6, struct sm6_b
|
||||
return;
|
||||
}
|
||||
|
||||
shader_instruction_init(ins, VKD3DSIH_MOV);
|
||||
vsir_instruction_init(ins, VKD3DSIH_MOV);
|
||||
|
||||
if (!(dst_param = instruction_dst_params_alloc(ins, 1, sm6)))
|
||||
return;
|
||||
|
@ -313,7 +313,7 @@ void shader_register_init(struct vkd3d_shader_register *reg, enum vkd3d_shader_r
|
||||
reg->immconst_type = VKD3D_IMMCONST_SCALAR;
|
||||
}
|
||||
|
||||
void shader_instruction_init(struct vkd3d_shader_instruction *ins, enum vkd3d_shader_opcode handler_idx)
|
||||
void vsir_instruction_init(struct vkd3d_shader_instruction *ins, enum vkd3d_shader_opcode handler_idx)
|
||||
{
|
||||
memset(ins, 0, sizeof(*ins));
|
||||
ins->handler_idx = handler_idx;
|
||||
@ -343,7 +343,7 @@ static enum vkd3d_result instruction_array_flatten_hull_shader_phases(struct vkd
|
||||
|
||||
if (!shader_instruction_array_reserve(&flattener.instructions, flattener.instructions.count + 1))
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
shader_instruction_init(&instructions->elements[instructions->count++], VKD3DSIH_RET);
|
||||
vsir_instruction_init(&instructions->elements[instructions->count++], VKD3DSIH_RET);
|
||||
}
|
||||
|
||||
*src_instructions = flattener.instructions;
|
||||
@ -422,7 +422,7 @@ static enum vkd3d_result control_point_normaliser_emit_hs_input(struct control_p
|
||||
normaliser->instructions.count += count;
|
||||
|
||||
ins = &normaliser->instructions.elements[dst];
|
||||
shader_instruction_init(ins, VKD3DSIH_HS_CONTROL_POINT_PHASE);
|
||||
vsir_instruction_init(ins, VKD3DSIH_HS_CONTROL_POINT_PHASE);
|
||||
ins->flags = 1;
|
||||
++ins;
|
||||
|
||||
@ -434,13 +434,13 @@ static enum vkd3d_result control_point_normaliser_emit_hs_input(struct control_p
|
||||
|
||||
if (e->sysval_semantic != VKD3D_SHADER_SV_NONE)
|
||||
{
|
||||
shader_instruction_init(ins, VKD3DSIH_DCL_INPUT_SIV);
|
||||
vsir_instruction_init(ins, VKD3DSIH_DCL_INPUT_SIV);
|
||||
param = &ins->declaration.register_semantic.reg;
|
||||
ins->declaration.register_semantic.sysval_semantic = vkd3d_siv_from_sysval(e->sysval_semantic);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_instruction_init(ins, VKD3DSIH_DCL_INPUT);
|
||||
vsir_instruction_init(ins, VKD3DSIH_DCL_INPUT);
|
||||
param = &ins->declaration.dst;
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ static void shader_instruction_normalise_io_params(struct vkd3d_shader_instructi
|
||||
}
|
||||
|
||||
if (!keep)
|
||||
shader_instruction_init(ins, VKD3DSIH_NOP);
|
||||
vsir_instruction_init(ins, VKD3DSIH_NOP);
|
||||
}
|
||||
|
||||
static enum vkd3d_result instruction_array_normalise_io_registers(struct vkd3d_shader_instruction_array *instructions,
|
||||
|
@ -2327,7 +2327,7 @@ static void shader_sm4_read_instruction(struct vkd3d_shader_sm4_parser *sm4, str
|
||||
return;
|
||||
}
|
||||
|
||||
ins->handler_idx = opcode_info->handler_idx;
|
||||
vsir_instruction_init(ins, 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;
|
||||
|
@ -1008,7 +1008,7 @@ struct vkd3d_shader_instruction
|
||||
} declaration;
|
||||
};
|
||||
|
||||
void shader_instruction_init(struct vkd3d_shader_instruction *ins, enum vkd3d_shader_opcode handler_idx);
|
||||
void vsir_instruction_init(struct vkd3d_shader_instruction *ins, enum vkd3d_shader_opcode handler_idx);
|
||||
|
||||
static inline bool vkd3d_shader_instruction_has_texel_offset(const struct vkd3d_shader_instruction *ins)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user