diff options
author | Brian Paul <[email protected]> | 2018-03-05 10:48:46 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-03-23 09:03:26 -0600 |
commit | c99f46c2acb71ac00812d7e1059a0a1610824421 (patch) | |
tree | 413e2ee32b69c9fcae3e548198c26f95f4c21d7e | |
parent | 7181a9fa0e8141794e76d383b7747b5bb4216e1c (diff) |
svga: replace unsigned with proper enum names
Reviewed-by: Neha Bhende <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_emit.h | 12 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 19 |
2 files changed, 16 insertions, 15 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h index 114c9563e2b..357d772e7a6 100644 --- a/src/gallium/drivers/svga/svga_tgsi_emit.h +++ b/src/gallium/drivers/svga/svga_tgsi_emit.h @@ -189,7 +189,7 @@ emit_instruction(struct svga_shader_emitter *emit, /** Generate a SVGA3dShaderInstToken for the given SVGA3D shader opcode */ static inline SVGA3dShaderInstToken -inst_token(unsigned opcode) +inst_token(SVGA3dShaderOpCodeType opcode) { SVGA3dShaderInstToken inst; @@ -205,7 +205,7 @@ inst_token(unsigned opcode) * with the predication flag set. */ static inline SVGA3dShaderInstToken -inst_token_predicated(unsigned opcode) +inst_token_predicated(SVGA3dShaderOpCodeType opcode) { SVGA3dShaderInstToken inst; @@ -222,7 +222,7 @@ inst_token_predicated(unsigned opcode) * using the given comparison operator (one of SVGA3DOPCOMP_xx). */ static inline SVGA3dShaderInstToken -inst_token_setp(unsigned operator) +inst_token_setp(SVGA3dShaderOpCodeCompFnType operator) { SVGA3dShaderInstToken inst; @@ -240,7 +240,7 @@ inst_token_setp(unsigned operator) * temp registers AND constants (see emit_def_const()). */ static inline SVGA3dShaderDestToken -dst_register(unsigned file, int number) +dst_register(SVGA3dShaderRegType file, int number) { SVGA3dShaderDestToken dest; @@ -278,7 +278,7 @@ writemask(SVGA3dShaderDestToken dest, unsigned mask) /** Create a SVGA3dShaderSrcToken given a register file and number */ static inline SVGA3dShaderSrcToken -src_token(unsigned file, int number) +src_token(SVGA3dShaderRegType file, int number) { SVGA3dShaderSrcToken src; @@ -302,7 +302,7 @@ src_token(unsigned file, int number) /** Create a src_register given a register file and register number */ static inline struct src_register -src_register(unsigned file, int number) +src_register(SVGA3dShaderRegType file, int number) { struct src_register src; diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index c08809c5508..c7804b2680f 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -39,7 +39,7 @@ static boolean emit_vs_postamble( struct svga_shader_emitter *emit ); static boolean emit_ps_postamble( struct svga_shader_emitter *emit ); -static unsigned +static SVGA3dShaderOpCodeType translate_opcode(enum tgsi_opcode opcode) { switch (opcode) { @@ -60,8 +60,8 @@ translate_opcode(enum tgsi_opcode opcode) } -static unsigned -translate_file(unsigned file) +static SVGA3dShaderRegType +translate_file(enum tgsi_file_type file) { switch (file) { case TGSI_FILE_TEMPORARY: return SVGA3DREG_TEMP; @@ -1435,7 +1435,7 @@ same_register(struct src_register r1, struct src_register r2) */ static boolean emit_conditional(struct svga_shader_emitter *emit, - unsigned compare_func, + enum pipe_compare_func compare_func, SVGA3dShaderDestToken dst, struct src_register src0, struct src_register src1, @@ -1516,7 +1516,7 @@ emit_conditional(struct svga_shader_emitter *emit, */ static boolean emit_select(struct svga_shader_emitter *emit, - unsigned compare_func, + enum pipe_compare_func compare_func, SVGA3dShaderDestToken dst, struct src_register src0, struct src_register src1 ) @@ -1968,7 +1968,7 @@ emit_brk(struct svga_shader_emitter *emit, */ static boolean emit_scalar_op1(struct svga_shader_emitter *emit, - unsigned opcode, + SVGA3dShaderOpCodeType opcode, const struct tgsi_full_instruction *insn) { SVGA3dShaderInstToken inst; @@ -1990,7 +1990,7 @@ emit_scalar_op1(struct svga_shader_emitter *emit, */ static boolean emit_simple_instruction(struct svga_shader_emitter *emit, - unsigned opcode, + SVGA3dShaderOpCodeType opcode, const struct tgsi_full_instruction *insn) { const struct tgsi_full_src_register *src = insn->Src; @@ -2070,7 +2070,7 @@ emit_deriv(struct svga_shader_emitter *emit, return TRUE; } else { - unsigned opcode; + SVGA3dShaderOpCodeType opcode; const struct tgsi_full_src_register *reg = &insn->Src[0]; SVGA3dShaderInstToken inst; SVGA3dShaderDestToken dst; @@ -2923,7 +2923,8 @@ svga_emit_instruction(struct svga_shader_emitter *emit, default: { - unsigned opcode = translate_opcode(insn->Instruction.Opcode); + SVGA3dShaderOpCodeType opcode = + translate_opcode(insn->Instruction.Opcode); if (opcode == SVGA3DOP_LAST_INST) return FALSE; |