vc4: Fix unused var warnings in release builds from assertions.
authorEric Anholt <eric@anholt.net>
Tue, 25 Aug 2020 18:27:50 +0000 (11:27 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 22:45:08 +0000 (22:45 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462>

src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_simulator.c

index d2a92518863e67b73a83f605873888b4c0939d70..0d448fa2754f76d0a6e49cf7ce48f73d89e7231b 100644 (file)
@@ -115,7 +115,7 @@ indirect_uniform_load(struct vc4_compile *c, nir_intrinsic_instr *intr)
 static struct qreg
 vc4_ubo_load(struct vc4_compile *c, nir_intrinsic_instr *intr)
 {
-        int buffer_index = nir_src_as_uint(intr->src[0]);
+        ASSERTED int buffer_index = nir_src_as_uint(intr->src[0]);
         assert(buffer_index == 1);
         assert(c->stage == QSTAGE_FRAG);
 
index 2ce5a759633b0a6dbbe39d1c87e25f63dd112726..b3379b16c11e8ae0cd90290ed5561d91ff5d73bf 100644 (file)
@@ -421,7 +421,7 @@ vc4_simulator_submit_cl_ioctl(int fd, struct drm_vc4_submit_cl *args)
         list_for_each_entry_safe(struct drm_vc4_bo, bo, &exec.unref_list,
                                  unref_head) {
                 struct vc4_simulator_bo *sim_bo = (struct vc4_simulator_bo *)bo;
-                struct drm_gem_cma_object *obj = &sim_bo->base.base;
+                ASSERTED struct drm_gem_cma_object *obj = &sim_bo->base.base;
                list_del(&bo->unref_head);
                 assert(*(uint32_t *)(obj->vaddr + obj->base.size) ==
                        BO_SENTINEL);