summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-06-03 14:25:39 -0700
committerKristian H. Kristensen <[email protected]>2019-06-05 11:15:04 -0700
commit3da9a24f35a80e4aa7df85530127d7a813daa5ea (patch)
treeea52d45bb354cb169a6db493f0f81cabf086a1da /src/gallium/drivers/freedreno
parent6fffc091e2681bdc45c3762f3dce6bdc4c86c9f7 (diff)
freedreno/a6xx: Use VALIDREG in next_regid() helper
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_program.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
index c3345dc1636..2c982cc1afc 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
@@ -300,18 +300,18 @@ setup_stages(struct fd6_program_state *state, struct stage *s, bool binning_pass
}
}
+#define VALIDREG(r) ((r) != regid(63,0))
+#define CONDREG(r, val) COND(VALIDREG(r), (val))
+
static inline uint32_t
next_regid(uint32_t reg, uint32_t increment)
{
- if (reg == regid(63,0))
- return regid(63,0);
- else
+ if (VALIDREG(reg))
return reg + increment;
+ else
+ return regid(63,0);
}
-#define VALIDREG(r) ((r) != regid(63,0))
-#define CONDREG(r, val) COND(VALIDREG(r), (val))
-
static void
setup_stateobj(struct fd_ringbuffer *ring, struct fd6_program_state *state,
const struct ir3_shader_key *key, bool binning_pass)