Mesa (master): svga: use enum tgsi_opcode

Brian Paul brianp at kemper.freedesktop.org
Fri Mar 23 15:30:57 UTC 2018


Module: Mesa
Branch: master
Commit: 7df96826f80231b988e8712f5bce7c9edb358360
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7df96826f80231b988e8712f5bce7c9edb358360

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Mar  5 10:05:52 2018 -0700

svga: use enum tgsi_opcode

Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/gallium/drivers/svga/svga_tgsi_insn.c   | 2 +-
 src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index be99ad511b..c08809c550 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -40,7 +40,7 @@ static boolean emit_ps_postamble( struct svga_shader_emitter *emit );
 
 
 static unsigned
-translate_opcode(uint opcode)
+translate_opcode(enum tgsi_opcode opcode)
 {
    switch (opcode) {
    case TGSI_OPCODE_ADD:        return SVGA3DOP_ADD;
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
index b9b3d4fb3f..04d83038b0 100644
--- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c
@@ -501,7 +501,7 @@ translate_shader_type(unsigned type)
  * as seen below.  All other opcodes are handled/translated specially.
  */
 static VGPU10_OPCODE_TYPE
-translate_opcode(unsigned opcode)
+translate_opcode(enum tgsi_opcode opcode)
 {
    switch (opcode) {
    case TGSI_OPCODE_MOV:
@@ -5364,7 +5364,7 @@ static boolean
 emit_simple(struct svga_shader_emitter_v10 *emit,
             const struct tgsi_full_instruction *inst)
 {
-   const unsigned opcode = inst->Instruction.Opcode;
+   const enum tgsi_opcode opcode = inst->Instruction.Opcode;
    const struct tgsi_opcode_info *op = tgsi_get_opcode_info(opcode);
    unsigned i;
 
@@ -5415,7 +5415,7 @@ emit_simple_1dst(struct svga_shader_emitter_v10 *emit,
                  unsigned dst_count,
                  unsigned dst_index)
 {
-   const unsigned opcode = inst->Instruction.Opcode;
+   const enum tgsi_opcode opcode = inst->Instruction.Opcode;
    const struct tgsi_opcode_info *op = tgsi_get_opcode_info(opcode);
    unsigned i;
 
@@ -5447,7 +5447,7 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit,
                         unsigned inst_number,
                         const struct tgsi_full_instruction *inst)
 {
-   const unsigned opcode = inst->Instruction.Opcode;
+   const enum tgsi_opcode opcode = inst->Instruction.Opcode;
 
    switch (opcode) {
    case TGSI_OPCODE_ADD:




More information about the mesa-commit mailing list