summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-03-05 10:16:01 -0700
committerBrian Paul <[email protected]>2018-03-23 09:03:26 -0600
commit22a3190c85621a55e8498499e1006a9dc242ac6f (patch)
treeec478fa3045c9f6a9b8fd8b87edeb524de755c8f /src/gallium
parent9413d1c0fec74d2a7bd8f09049c2aaef8a232a9d (diff)
tgsi: use enum tgsi_opcode
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_lowering.c6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_scan.c6
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_transform.c2
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_transform.h12
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 0c4ec8d1cf9..36c36d93c0f 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 bfc3a6bfe36..47aa3df61d5 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 4a2b3540639..18488d776e9 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 a13cf90a274..cd076c9e79e 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 e4da0f5debc..018e4a06d82 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,