zink: Fix unused var warnings in release build from assertions.
authorEric Anholt <eric@anholt.net>
Tue, 25 Aug 2020 18:30:07 +0000 (11:30 -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/zink/nir_to_spirv/nir_to_spirv.c
src/gallium/drivers/zink/zink_screen.c

index a1347f163fd0a0fb52aee47804ff14966076b6a2..bcbb208de1177203c088a6511e582597a0c40662 100644 (file)
@@ -1545,7 +1545,7 @@ emit_load_const(struct ntv_context *ctx, nir_load_const_instr *load_const)
 static void
 emit_load_ubo(struct ntv_context *ctx, nir_intrinsic_instr *intr)
 {
-   nir_const_value *const_block_index = nir_src_as_const_value(intr->src[0]);
+   ASSERTED nir_const_value *const_block_index = nir_src_as_const_value(intr->src[0]);
    assert(const_block_index); // no dynamic indexing for now
    assert(const_block_index->u32 == 0); // we only support the default UBO for now
 
index acf8e9e0bc3a280b161cab51b893006cfd6ce11c..6cec34ac7f10712f4f74969521ad499b5331837b 100644 (file)
@@ -774,7 +774,7 @@ load_device_extensions(struct zink_screen *screen)
       screen->vk_GetPhysicalDeviceCalibrateableTimeDomainsEXT(screen->pdev, &num_domains, domains);
 
       /* VK_TIME_DOMAIN_DEVICE_EXT is used for the ctx->get_timestamp hook and is the only one we really need */
-      bool have_device_time = false;
+      ASSERTED bool have_device_time = false;
       for (unsigned i = 0; i < num_domains; i++) {
          if (domains[i] == VK_TIME_DOMAIN_DEVICE_EXT) {
             have_device_time = true;