From: Eric Anholt Date: Tue, 25 Aug 2020 18:30:07 +0000 (-0700) Subject: zink: Fix unused var warnings in release build from assertions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab6a09f25b978b22142a6b00e6126c968d6789b9;p=mesa.git zink: Fix unused var warnings in release build from assertions. Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index a1347f163fd..bcbb208de11 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -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 diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index acf8e9e0bc3..6cec34ac7f1 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -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;