summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-02-06 14:48:45 -0800
committerEric Anholt <[email protected]>2017-06-20 09:09:09 -0700
commit45b0172693edf84eb27fe657a49da5a4f2989d8d (patch)
tree5bef365d7df865d29029f610249908751ff606a6 /src/gallium/drivers
parent743dcdd93696d305de7146aa6e33359db3e2eab2 (diff)
vc4: Clean up release build warnings using MAYBE_UNUSED.
These variables are all used in an assert(), so release builds see no usages.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c3
-rw-r--r--src/gallium/drivers/vc4/vc4_qpu_emit.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index f1c40c06a0e..60eb68e847b 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1708,8 +1708,7 @@ ntq_emit_ssa_undef(struct vc4_compile *c, nir_ssa_undef_instr *instr)
static void
ntq_emit_color_read(struct vc4_compile *c, nir_intrinsic_instr *instr)
{
- nir_const_value *const_offset = nir_src_as_const_value(instr->src[0]);
- assert(const_offset->u32[0] == 0);
+ assert(nir_src_as_const_value(instr->src[0])->u32[0] == 0);
/* Reads of the per-sample color need to be done in
* order.
diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index aaa3a041216..cd9a4985d35 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -204,9 +204,9 @@ fixup_raddr_conflict(struct qblock *block,
static void
set_last_dst_pack(struct qblock *block, struct qinst *inst)
{
- bool had_pm = *last_inst(block) & QPU_PM;
- bool had_ws = *last_inst(block) & QPU_WS;
- uint32_t unpack = QPU_GET_FIELD(*last_inst(block), QPU_UNPACK);
+ MAYBE_UNUSED bool had_pm = *last_inst(block) & QPU_PM;
+ MAYBE_UNUSED bool had_ws = *last_inst(block) & QPU_WS;
+ MAYBE_UNUSED uint32_t unpack = QPU_GET_FIELD(*last_inst(block), QPU_UNPACK);
if (!inst->dst.pack)
return;
@@ -419,7 +419,7 @@ vc4_generate_code_block(struct vc4_compile *c,
break;
}
- bool handled_qinst_cond = false;
+ MAYBE_UNUSED bool handled_qinst_cond = false;
switch (qinst->op) {
case QOP_RCP: