anv: mark debug variables with ASSERTED

To clean up compilation warnings about unused variables
when asserts are disabled.

v2: UNUSED -> ASSERTED (Eric Engestrom)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19016>
This commit is contained in:
Tapani Pälli
2022-10-10 13:17:37 +03:00
committed by Marge Bot
parent c9c9a5b78d
commit b62d1c257e
2 changed files with 3 additions and 4 deletions

View File

@@ -137,7 +137,7 @@ anv_nir_lower_mesh_ext_instr(nir_builder *b, nir_instr *instr, void *data)
assert(intrin->src[1].is_ssa);
uint8_t components = intrin->src[1].ssa->num_components;
unsigned vertices_per_primitive =
ASSERTED unsigned vertices_per_primitive =
num_mesh_vertices_per_primitive(b->shader->info.mesh.primitive_type);
assert(vertices_per_primitive == components);
assert(nir_intrinsic_write_mask(intrin) == (1u << components) - 1);
@@ -1975,7 +1975,7 @@ anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
struct vk_pipeline_cache *cache,
const VkComputePipelineCreateInfo *info)
{
const VkPipelineShaderStageCreateInfo *sinfo = &info->stage;
ASSERTED const VkPipelineShaderStageCreateInfo *sinfo = &info->stage;
assert(sinfo->stage == VK_SHADER_STAGE_COMPUTE_BIT);
VkPipelineCreationFeedback pipeline_feedback = {

View File

@@ -1887,8 +1887,7 @@ emit_3dstate_primitive_replication(struct anv_graphics_pipeline *pipeline,
return;
}
uint32_t view_mask = rp->view_mask;
assert(replication_count == util_bitcount(view_mask));
assert(replication_count == util_bitcount(rp->view_mask));
assert(replication_count <= MAX_VIEWS_FOR_PRIMITIVE_REPLICATION);
anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_PRIMITIVE_REPLICATION), pr) {