Henri Verbeet : vkd3d-shader: Rename VKD3D_SHADER_INSTRUCTION_HANDLER to vkd3d_shader_opcode.

Alexandre Julliard julliard at winehq.org
Tue Feb 16 15:53:08 CST 2021


Module: vkd3d
Branch: master
Commit: 8315d319f67a42785b3dfec8f7987fdf8e7ce95a
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=8315d319f67a42785b3dfec8f7987fdf8e7ce95a

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Feb 16 14:58:23 2021 +0100

vkd3d-shader: Rename VKD3D_SHADER_INSTRUCTION_HANDLER to vkd3d_shader_opcode.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/dxbc.c                 |  2 +-
 libs/vkd3d-shader/spirv.c                | 14 +++++++-------
 libs/vkd3d-shader/vkd3d_shader_main.c    |  4 ++--
 libs/vkd3d-shader/vkd3d_shader_private.h |  4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index 278912d..5b56259 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -481,7 +481,7 @@ struct vkd3d_sm4_data
 struct vkd3d_sm4_opcode_info
 {
     enum vkd3d_sm4_opcode opcode;
-    enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+    enum vkd3d_shader_opcode handler_idx;
     const char *dst_info;
     const char *src_info;
     void (*read_opcode_func)(struct vkd3d_shader_instruction *ins,
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c
index 148115a..b0b2399 100644
--- a/libs/vkd3d-shader/spirv.c
+++ b/libs/vkd3d-shader/spirv.c
@@ -2131,7 +2131,7 @@ struct vkd3d_push_constant_buffer_binding
 
 struct vkd3d_shader_phase
 {
-    enum VKD3D_SHADER_INSTRUCTION_HANDLER type;
+    enum vkd3d_shader_opcode type;
     unsigned int idx;
     unsigned int instance_count;
     uint32_t function_id;
@@ -6417,7 +6417,7 @@ static SpvOp vkd3d_dxbc_compiler_map_alu_instruction(const struct vkd3d_shader_i
 {
     static const struct
     {
-        enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+        enum vkd3d_shader_opcode handler_idx;
         SpvOp spirv_op;
     }
     alu_ops[] =
@@ -6491,7 +6491,7 @@ static enum GLSLstd450 vkd3d_dxbc_compiler_map_ext_glsl_instruction(
 {
     static const struct
     {
-        enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+        enum vkd3d_shader_opcode handler_idx;
         enum GLSLstd450 glsl_inst;
     }
     glsl_insts[] =
@@ -7514,7 +7514,7 @@ static void vkd3d_dxbc_compiler_emit_deriv_instruction(struct vkd3d_dxbc_compile
 
     static const struct instruction_info
     {
-        enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+        enum vkd3d_shader_opcode handler_idx;
         SpvOp op;
         bool needs_derivative_control;
     }
@@ -8402,7 +8402,7 @@ static SpvOp vkd3d_dxbc_compiler_map_atomic_instruction(const struct vkd3d_shade
 {
     static const struct
     {
-        enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+        enum vkd3d_shader_opcode handler_idx;
         SpvOp spirv_op;
     }
     atomic_ops[] =
@@ -8438,7 +8438,7 @@ static SpvOp vkd3d_dxbc_compiler_map_atomic_instruction(const struct vkd3d_shade
     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;
 }
@@ -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);
 }
 
-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)
             || handler_idx == VKD3DSIH_HS_DECLS;
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index ff917db..c1306ca 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -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)
 {
-    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)
             || (VKD3DSIH_IMM_ATOMIC_ALLOC <= handler_idx && handler_idx <= VKD3DSIH_IMM_ATOMIC_XOR)
             || 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)
 {
-    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
             || handler_idx == VKD3DSIH_IMM_ATOMIC_CONSUME;
 }
diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h
index 01ad087..1975848 100644
--- a/libs/vkd3d-shader/vkd3d_shader_private.h
+++ b/libs/vkd3d-shader/vkd3d_shader_private.h
@@ -93,7 +93,7 @@ enum vkd3d_shader_error
     VKD3D_SHADER_WARNING_PP_DIV_BY_ZERO                 = 4306,
 };
 
-enum VKD3D_SHADER_INSTRUCTION_HANDLER
+enum vkd3d_shader_opcode
 {
     VKD3DSIH_ABS,
     VKD3DSIH_ADD,
@@ -779,7 +779,7 @@ struct vkd3d_shader_primitive_type
 
 struct vkd3d_shader_instruction
 {
-    enum VKD3D_SHADER_INSTRUCTION_HANDLER handler_idx;
+    enum vkd3d_shader_opcode handler_idx;
     DWORD flags;
     unsigned int dst_count;
     unsigned int src_count;




More information about the wine-cvs mailing list