[Mesa-dev] [PATCH 4/7] tgsi: use enum tgsi_opcode
Brian Paul
brianp at vmware.com
Thu Mar 22 15:28:06 UTC 2018
---
src/gallium/auxiliary/tgsi/tgsi_build.c | 2 +-
src/gallium/auxiliary/tgsi/tgsi_lowering.c | 6 +++---
src/gallium/auxiliary/tgsi/tgsi_scan.c | 6 +++---
src/gallium/auxiliary/tgsi/tgsi_transform.c | 2 +-
src/gallium/auxiliary/tgsi/tgsi_transform.h | 12 ++++++------
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 0c4ec8d..36c36d9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -660,7 +660,7 @@ tgsi_default_instruction( void )
}
static struct tgsi_instruction
-tgsi_build_instruction(unsigned opcode,
+tgsi_build_instruction(enum tgsi_opcode opcode,
unsigned saturate,
unsigned precise,
unsigned num_dst_regs,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.c b/src/gallium/auxiliary/tgsi/tgsi_lowering.c
index bfc3a6b..47aa3df 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_lowering.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.c
@@ -823,7 +823,7 @@ transform_dotp(struct tgsi_transform_context *tctx,
struct tgsi_full_src_register *src0 = &inst->Src[0];
struct tgsi_full_src_register *src1 = &inst->Src[1];
struct tgsi_full_instruction new_inst;
- unsigned opcode = inst->Instruction.Opcode;
+ enum tgsi_opcode opcode = inst->Instruction.Opcode;
/* NOTE: any potential last instruction must replicate src on all
* components (since it could be re-written to write to final dst)
@@ -908,7 +908,7 @@ transform_flr_ceil(struct tgsi_transform_context *tctx,
struct tgsi_full_dst_register *dst = &inst->Dst[0];
struct tgsi_full_src_register *src0 = &inst->Src[0];
struct tgsi_full_instruction new_inst;
- unsigned opcode = inst->Instruction.Opcode;
+ enum tgsi_opcode opcode = inst->Instruction.Opcode;
if (dst->Register.WriteMask & TGSI_WRITEMASK_XYZW) {
/* FLR: FRC tmpA, src CEIL: FRC tmpA, -src */
@@ -1038,7 +1038,7 @@ transform_samp(struct tgsi_transform_context *tctx,
/* mask is clamped coords, pmask is all coords (for projection): */
unsigned mask = 0, pmask = 0, smask;
unsigned tex = inst->Texture.Texture;
- unsigned opcode = inst->Instruction.Opcode;
+ enum tgsi_opcode opcode = inst->Instruction.Opcode;
bool lower_txp = (opcode == TGSI_OPCODE_TXP) &&
(ctx->config->lower_TXP & (1 << tex));
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 4a2b354..18488d7 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -55,7 +55,7 @@ is_memory_file(unsigned file)
static bool
-is_mem_query_inst(unsigned opcode)
+is_mem_query_inst(enum tgsi_opcode opcode)
{
return opcode == TGSI_OPCODE_RESQ ||
opcode == TGSI_OPCODE_TXQ ||
@@ -68,7 +68,7 @@ is_mem_query_inst(unsigned opcode)
* texture map?
*/
static bool
-is_texture_inst(unsigned opcode)
+is_texture_inst(enum tgsi_opcode opcode)
{
return (!is_mem_query_inst(opcode) &&
tgsi_get_opcode_info(opcode)->is_tex);
@@ -80,7 +80,7 @@ is_texture_inst(unsigned opcode)
* implicitly?
*/
static bool
-computes_derivative(unsigned opcode)
+computes_derivative(enum tgsi_opcode opcode)
{
if (tgsi_get_opcode_info(opcode)->is_tex) {
return opcode != TGSI_OPCODE_TG4 &&
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.c b/src/gallium/auxiliary/tgsi/tgsi_transform.c
index a13cf90..cd076c9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.c
@@ -169,7 +169,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in,
{
struct tgsi_full_instruction *fullinst
= &parse.FullToken.FullInstruction;
- unsigned opcode = fullinst->Instruction.Opcode;
+ enum tgsi_opcode opcode = fullinst->Instruction.Opcode;
if (first_instruction && ctx->prolog) {
ctx->prolog(ctx);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h
index e4da0f5..018e4a0 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h
@@ -267,7 +267,7 @@ tgsi_transform_src_reg(struct tgsi_full_src_register *reg,
*/
static inline void
tgsi_transform_op1_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
@@ -291,7 +291,7 @@ tgsi_transform_op1_inst(struct tgsi_transform_context *ctx,
static inline void
tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
@@ -320,7 +320,7 @@ tgsi_transform_op2_inst(struct tgsi_transform_context *ctx,
static inline void
tgsi_transform_op3_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
@@ -351,7 +351,7 @@ tgsi_transform_op3_inst(struct tgsi_transform_context *ctx,
static inline void
tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
@@ -392,7 +392,7 @@ tgsi_transform_op1_swz_inst(struct tgsi_transform_context *ctx,
static inline void
tgsi_transform_op2_swz_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
@@ -443,7 +443,7 @@ tgsi_transform_op2_swz_inst(struct tgsi_transform_context *ctx,
static inline void
tgsi_transform_op3_swz_inst(struct tgsi_transform_context *ctx,
- unsigned opcode,
+ enum tgsi_opcode opcode,
unsigned dst_file,
unsigned dst_index,
unsigned dst_writemask,
--
2.7.4
More information about the mesa-dev
mailing list