vkd3d-shader: Rename VKD3D_SHADER_INSTRUCTION_HANDLER to vkd3d_shader_opcode.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-02-16 14:58:23 +01:00 committed by Alexandre Julliard
parent b57ad006c2
commit 8315d319f6
4 changed files with 12 additions and 12 deletions

View File

@ -481,7 +481,7 @@ struct vkd3d_sm4_data
struct vkd3d_sm4_opcode_info struct vkd3d_sm4_opcode_info
{ {
enum vkd3d_sm4_opcode opcode; enum vkd3d_sm4_opcode opcode;
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
const char *dst_info; const char *dst_info;
const char *src_info; const char *src_info;
void (*read_opcode_func)(struct vkd3d_shader_instruction *ins, void (*read_opcode_func)(struct vkd3d_shader_instruction *ins,

View File

@ -2131,7 +2131,7 @@ struct vkd3d_push_constant_buffer_binding
struct vkd3d_shader_phase struct vkd3d_shader_phase
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER type; enum vkd3d_shader_opcode type;
unsigned int idx; unsigned int idx;
unsigned int instance_count; unsigned int instance_count;
uint32_t function_id; uint32_t function_id;
@ -6417,7 +6417,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i
{ {
static const struct static const struct
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
SpvOp spirv_op; SpvOp spirv_op;
} }
alu_ops[] = alu_ops[] =
@ -6491,7 +6491,7 @@ static enum GLSLstd450 vkd3d_dxbc_compiler_map_ext_glsl_instruction(
{ {
static const struct static const struct
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
enum GLSLstd450 glsl_inst; enum GLSLstd450 glsl_inst;
} }
glsl_insts[] = glsl_insts[] =
@ -7514,7 +7514,7 @@ static void vkd3d_dxbc_compiler_emit_deriv_instruction(struct vkd3d_dxbc_compile
static const struct instruction_info static const struct instruction_info
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
SpvOp op; SpvOp op;
bool needs_derivative_control; bool needs_derivative_control;
} }
@ -8402,7 +8402,7 @@ static SpvOp vkd3d_dxbc_compiler_map_atomic_instruction(const struct vkd3d_shade
{ {
static const struct static const struct
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
SpvOp spirv_op; SpvOp spirv_op;
} }
atomic_ops[] = atomic_ops[] =
@ -8438,7 +8438,7 @@ static SpvOp vkd3d_dxbc_compiler_map_atomic_instruction(const struct vkd3d_shade
return SpvOpMax; return SpvOpMax;
} }
static bool is_imm_atomic_instruction(enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx) static bool is_imm_atomic_instruction(enum vkd3d_shader_opcode handler_idx)
{ {
return VKD3DSIH_IMM_ATOMIC_ALLOC <= handler_idx && handler_idx <= VKD3DSIH_IMM_ATOMIC_XOR; return VKD3DSIH_IMM_ATOMIC_ALLOC <= handler_idx && handler_idx <= VKD3DSIH_IMM_ATOMIC_XOR;
} }
@ -9029,7 +9029,7 @@ static void vkd3d_dxbc_compiler_emit_main_prolog(struct vkd3d_dxbc_compiler *com
vkd3d_dxbc_compiler_emit_hull_shader_inputs(compiler); vkd3d_dxbc_compiler_emit_hull_shader_inputs(compiler);
} }
static bool is_dcl_instruction(enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx) static bool is_dcl_instruction(enum vkd3d_shader_opcode handler_idx)
{ {
return (VKD3DSIH_DCL <= handler_idx && handler_idx <= VKD3DSIH_DCL_VERTICES_OUT) return (VKD3DSIH_DCL <= handler_idx && handler_idx <= VKD3DSIH_DCL_VERTICES_OUT)
|| handler_idx == VKD3DSIH_HS_DECLS; || handler_idx == VKD3DSIH_HS_DECLS;

View File

@ -460,7 +460,7 @@ static struct vkd3d_shader_descriptor_info *vkd3d_shader_scan_get_uav_descriptor
static bool vkd3d_shader_instruction_is_uav_read(const struct vkd3d_shader_instruction *instruction) static bool vkd3d_shader_instruction_is_uav_read(const struct vkd3d_shader_instruction *instruction)
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx = instruction->handler_idx; enum vkd3d_shader_opcode handler_idx = instruction->handler_idx;
return (VKD3DSIH_ATOMIC_AND <= handler_idx && handler_idx <= VKD3DSIH_ATOMIC_XOR) return (VKD3DSIH_ATOMIC_AND <= handler_idx && handler_idx <= VKD3DSIH_ATOMIC_XOR)
|| (VKD3DSIH_IMM_ATOMIC_ALLOC <= handler_idx && handler_idx <= VKD3DSIH_IMM_ATOMIC_XOR) || (VKD3DSIH_IMM_ATOMIC_ALLOC <= handler_idx && handler_idx <= VKD3DSIH_IMM_ATOMIC_XOR)
|| handler_idx == VKD3DSIH_LD_UAV_TYPED || handler_idx == VKD3DSIH_LD_UAV_TYPED
@ -482,7 +482,7 @@ static void vkd3d_shader_scan_record_uav_read(struct vkd3d_shader_scan_context *
static bool vkd3d_shader_instruction_is_uav_counter(const struct vkd3d_shader_instruction *instruction) static bool vkd3d_shader_instruction_is_uav_counter(const struct vkd3d_shader_instruction *instruction)
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx = instruction->handler_idx; enum vkd3d_shader_opcode handler_idx = instruction->handler_idx;
return handler_idx == VKD3DSIH_IMM_ATOMIC_ALLOC return handler_idx == VKD3DSIH_IMM_ATOMIC_ALLOC
|| handler_idx == VKD3DSIH_IMM_ATOMIC_CONSUME; || handler_idx == VKD3DSIH_IMM_ATOMIC_CONSUME;
} }

View File

@ -93,7 +93,7 @@ enum vkd3d_shader_error
VKD3D_SHADER_WARNING_PP_DIV_BY_ZERO = 4306, VKD3D_SHADER_WARNING_PP_DIV_BY_ZERO = 4306,
}; };
enum VKD3D_SHADER_INSTRUCTION_HANDLER enum vkd3d_shader_opcode
{ {
VKD3DSIH_ABS, VKD3DSIH_ABS,
VKD3DSIH_ADD, VKD3DSIH_ADD,
@ -779,7 +779,7 @@ struct vkd3d_shader_primitive_type
struct vkd3d_shader_instruction struct vkd3d_shader_instruction
{ {
enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx; enum vkd3d_shader_opcode handler_idx;
DWORD flags; DWORD flags;
unsigned int dst_count; unsigned int dst_count;
unsigned int src_count; unsigned int src_count;