diff options
author | Eric Engestrom <[email protected]> | 2019-06-19 12:47:19 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-07-31 09:41:05 +0100 |
commit | abc226cf41574454c79477c217e60e8ff1fddfad (patch) | |
tree | 4c01a31ebe12a2a03bef6c7902a4d0ca400110ce /src/gallium | |
parent | ab9c76769ad070490434aa7104d11958e1fc49d4 (diff) |
tree-wide: replace MAYBE_UNUSED with ASSERTED
Suggested-by: Jason Ekstrand <[email protected]>
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/gallium')
31 files changed, 54 insertions, 54 deletions
diff --git a/src/gallium/auxiliary/driver_trace/tr_context.c b/src/gallium/auxiliary/driver_trace/tr_context.c index 232fea80504..083458dc147 100644 --- a/src/gallium/auxiliary/driver_trace/tr_context.c +++ b/src/gallium/auxiliary/driver_trace/tr_context.c @@ -2034,6 +2034,6 @@ error1: void trace_context_check(const struct pipe_context *pipe) { - MAYBE_UNUSED struct trace_context *tr_ctx = (struct trace_context *) pipe; + ASSERTED struct trace_context *tr_ctx = (struct trace_context *) pipe; assert(tr_ctx->base.destroy == trace_context_destroy); } diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 53b9ce06379..ec181911923 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -826,7 +826,7 @@ fenced_buffer_fence(struct pb_buffer *buf, assert(fenced_buf->validation_flags); if (fenced_buf->fence) { - MAYBE_UNUSED boolean destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); + ASSERTED boolean destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); assert(!destroyed); } if (fence) { diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c index b6758fc2f9b..8577486b769 100644 --- a/src/gallium/auxiliary/util/u_blit.c +++ b/src/gallium/auxiliary/util/u_blit.c @@ -384,7 +384,7 @@ util_blit_pixels(struct blit_state *ctx, struct pipe_surface *dst, int dstX0, int dstY0, int dstX1, int dstY1, - MAYBE_UNUSED float z, + ASSERTED float z, enum pipe_tex_filter filter, uint writemask) { diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index 8d6909ec426..ffe1a8d46f0 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -579,7 +579,7 @@ void util_blitter_unset_running_flag(struct blitter_context *blitter) blitter->pipe->set_active_query_state(blitter->pipe, true); } -static void blitter_check_saved_vertex_states(MAYBE_UNUSED struct blitter_context_priv *ctx) +static void blitter_check_saved_vertex_states(ASSERTED struct blitter_context_priv *ctx) { assert(ctx->base.saved_vs != INVALID_PTR); assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR); @@ -645,7 +645,7 @@ void util_blitter_restore_vertex_states(struct blitter_context *blitter) ctx->base.saved_rs_state = INVALID_PTR; } -static void blitter_check_saved_fragment_states(MAYBE_UNUSED struct blitter_context_priv *ctx) +static void blitter_check_saved_fragment_states(ASSERTED struct blitter_context_priv *ctx) { assert(ctx->base.saved_fs != INVALID_PTR); assert(ctx->base.saved_dsa_state != INVALID_PTR); @@ -691,7 +691,7 @@ void util_blitter_restore_fragment_states(struct blitter_context *blitter) } } -static void blitter_check_saved_fb_state(MAYBE_UNUSED struct blitter_context_priv *ctx) +static void blitter_check_saved_fb_state(ASSERTED struct blitter_context_priv *ctx) { assert(ctx->base.saved_fb_state.nr_cbufs != (ubyte) ~0); } @@ -727,7 +727,7 @@ void util_blitter_restore_fb_state(struct blitter_context *blitter) util_unreference_framebuffer_state(&ctx->base.saved_fb_state); } -static void blitter_check_saved_textures(MAYBE_UNUSED struct blitter_context_priv *ctx) +static void blitter_check_saved_textures(ASSERTED struct blitter_context_priv *ctx) { assert(ctx->base.saved_num_sampler_states != ~0u); assert(ctx->base.saved_num_sampler_views != ~0u); diff --git a/src/gallium/auxiliary/util/u_format_yuv.c b/src/gallium/auxiliary/util/u_format_yuv.c index 98081a3b2c3..e0f85c5aa97 100644 --- a/src/gallium/auxiliary/util/u_format_yuv.c +++ b/src/gallium/auxiliary/util/u_format_yuv.c @@ -246,7 +246,7 @@ util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri void util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, MAYBE_UNUSED unsigned j) + unsigned i, ASSERTED unsigned j) { assert(i < 2); assert(j < 1); @@ -466,7 +466,7 @@ util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stri void util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, MAYBE_UNUSED unsigned j) + unsigned i, ASSERTED unsigned j) { assert(i < 2); assert(j < 1); @@ -682,7 +682,7 @@ util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void util_format_uyvy_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, MAYBE_UNUSED unsigned j) + unsigned i, ASSERTED unsigned j) { uint8_t y, u, v; @@ -903,7 +903,7 @@ util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, void util_format_yuyv_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, MAYBE_UNUSED unsigned j) + unsigned i, ASSERTED unsigned j) { uint8_t y, u, v; diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 1254e3f9e98..40512625ad9 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -77,7 +77,7 @@ pipe_reference_described(struct pipe_reference *dst, if (dst != src) { /* bump the src.count first */ if (src) { - MAYBE_UNUSED int count = p_atomic_inc_return(&src->count); + ASSERTED int count = p_atomic_inc_return(&src->count); assert(count != 1); /* src had to be referenced */ debug_reference(src, get_desc, 1); } diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index 3eaab0b7bef..c2bdda5f447 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -2223,7 +2223,7 @@ static void tc_call_generate_mipmap(struct pipe_context *pipe, union tc_payload *payload) { struct tc_generate_mipmap *p = (struct tc_generate_mipmap *)payload; - MAYBE_UNUSED bool result = pipe->generate_mipmap(pipe, p->res, p->format, + ASSERTED bool result = pipe->generate_mipmap(pipe, p->res, p->format, p->base_level, p->last_level, p->first_layer, diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c b/src/gallium/drivers/etnaviv/etnaviv_compiler.c index 90eda5b5d60..0150002c06d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.c @@ -477,7 +477,7 @@ static void etna_compile_parse_declarations(struct etna_compile *c) { struct tgsi_parse_context ctx = { }; - MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens); + ASSERTED unsigned status = tgsi_parse_init(&ctx, c->tokens); assert(status == TGSI_PARSE_OK); while (!tgsi_parse_end_of_tokens(&ctx)) { @@ -529,7 +529,7 @@ static void etna_compile_pass_check_usage(struct etna_compile *c) { struct tgsi_parse_context ctx = { }; - MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens); + ASSERTED unsigned status = tgsi_parse_init(&ctx, c->tokens); assert(status == TGSI_PARSE_OK); for (int idx = 0; idx < c->total_decls; ++idx) { @@ -660,7 +660,7 @@ etna_compile_pass_optimize_outputs(struct etna_compile *c) { struct tgsi_parse_context ctx = { }; int inst_idx = 0; - MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens); + ASSERTED unsigned status = tgsi_parse_init(&ctx, c->tokens); assert(status == TGSI_PARSE_OK); while (!tgsi_parse_end_of_tokens(&ctx)) { @@ -1809,7 +1809,7 @@ static void etna_compile_pass_generate_code(struct etna_compile *c) { struct tgsi_parse_context ctx = { }; - MAYBE_UNUSED unsigned status = tgsi_parse_init(&ctx, c->tokens); + ASSERTED unsigned status = tgsi_parse_init(&ctx, c->tokens); assert(status == TGSI_PARSE_OK); int inst_idx = 0; diff --git a/src/gallium/drivers/lima/ir/gp/scheduler.c b/src/gallium/drivers/lima/ir/gp/scheduler.c index 1a727aebc92..9900ceaa041 100644 --- a/src/gallium/drivers/lima/ir/gp/scheduler.c +++ b/src/gallium/drivers/lima/ir/gp/scheduler.c @@ -912,7 +912,7 @@ static void spill_node(sched_ctx *ctx, gpir_node *node, gpir_store_node *store) gpir_node_add_dep(&load->node, &store->node, GPIR_DEP_READ_AFTER_WRITE); gpir_debug("spilling use %d of node %d to load node %d\n", use->index, node->index, load->node.index); - MAYBE_UNUSED bool result = _try_place_node(ctx, use->sched.instr, &load->node); + ASSERTED bool result = _try_place_node(ctx, use->sched.instr, &load->node); assert(result); } } @@ -1303,7 +1303,7 @@ static bool try_node(sched_ctx *ctx) if (best_node) { gpir_debug("scheduling %d (score = %d)%s\n", best_node->index, best_score, best_node->sched.max_node ? " (max)" : ""); - MAYBE_UNUSED int score = schedule_try_node(ctx, best_node, false); + ASSERTED int score = schedule_try_node(ctx, best_node, false); assert(score != INT_MIN); return true; } @@ -1323,7 +1323,7 @@ static void place_move(sched_ctx *ctx, gpir_node *node) gpir_node_replace_child(succ, move, node); } } - MAYBE_UNUSED int score = schedule_try_node(ctx, move, false); + ASSERTED int score = schedule_try_node(ctx, move, false); assert(score != INT_MIN); } diff --git a/src/gallium/drivers/lima/ir/pp/node_to_instr.c b/src/gallium/drivers/lima/ir/pp/node_to_instr.c index fc1671985e3..c5f55472f78 100644 --- a/src/gallium/drivers/lima/ir/pp/node_to_instr.c +++ b/src/gallium/drivers/lima/ir/pp/node_to_instr.c @@ -123,7 +123,7 @@ static bool insert_to_each_succ_instr(ppir_block *block, ppir_node *node) if (!create_new_instr(block, move)) return false; - MAYBE_UNUSED bool insert_result = + ASSERTED bool insert_result = ppir_instr_insert_node(move->instr, node); assert(insert_result); diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 17ac61cddb2..5dd318329e0 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -108,7 +108,7 @@ lp_setup_unmap_vertices(struct vbuf_render *vbr, ushort min_index, ushort max_index ) { - MAYBE_UNUSED struct lp_setup_context *setup = lp_setup_context(vbr); + ASSERTED struct lp_setup_context *setup = lp_setup_context(vbr); assert( setup->vertex_buffer_size >= (max_index+1) * setup->vertex_size ); /* do nothing */ } diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index 139ff4a31dc..03fada1415e 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -621,7 +621,7 @@ void CodeEmitterNV50::emitLOAD(const Instruction *i) { DataFile sf = i->src(0).getFile(); - MAYBE_UNUSED int32_t offset = i->getSrc(0)->reg.data.offset; + ASSERTED int32_t offset = i->getSrc(0)->reg.data.offset; switch (sf) { case FILE_SHADER_INPUT: diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index bfdb923379b..673fcd187ca 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -3514,7 +3514,7 @@ PostRaLoadPropagation::handleMADforNV50(Instruction *i) ImmediateValue val; // getImmediate() has side-effects on the argument so this *shouldn't* // be folded into the assert() - MAYBE_UNUSED bool ret = def->src(0).getImmediate(val); + ASSERTED bool ret = def->src(0).getImmediate(val); assert(ret); if (i->getSrc(1)->reg.data.id & 1) val.reg.data.u32 >>= 16; diff --git a/src/gallium/drivers/nouveau/nv50/nv98_video.c b/src/gallium/drivers/nouveau/nv50/nv98_video.c index da0267e646a..e4b57358936 100644 --- a/src/gallium/drivers/nouveau/nv50/nv98_video.c +++ b/src/gallium/drivers/nouveau/nv50/nv98_video.c @@ -41,7 +41,7 @@ nv98_decoder_decode_bitstream(struct pipe_video_codec *decoder, union pipe_desc desc; unsigned vp_caps, is_ref; - MAYBE_UNUSED unsigned ret; /* used in debug checks */ + ASSERTED unsigned ret; /* used in debug checks */ struct nouveau_vp3_video_buffer *refs[16] = {}; desc.base = picture; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c index 5c1cf899ca5..c5871f8a221 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_video.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_video.c @@ -32,7 +32,7 @@ nvc0_decoder_begin_frame(struct pipe_video_codec *decoder, { struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder; uint32_t comm_seq = ++dec->fence_seq; - MAYBE_UNUSED unsigned ret = 0; /* used in debug checks */ + ASSERTED unsigned ret = 0; /* used in debug checks */ assert(dec); assert(target); @@ -53,7 +53,7 @@ nvc0_decoder_decode_bitstream(struct pipe_video_codec *decoder, { struct nouveau_vp3_decoder *dec = (struct nouveau_vp3_decoder *)decoder; uint32_t comm_seq = dec->fence_seq; - MAYBE_UNUSED unsigned ret = 0; /* used in debug checks */ + ASSERTED unsigned ret = 0; /* used in debug checks */ assert(decoder); @@ -73,7 +73,7 @@ nvc0_decoder_end_frame(struct pipe_video_codec *decoder, union pipe_desc desc; unsigned vp_caps, is_ref; - MAYBE_UNUSED unsigned ret; /* used in debug checks */ + ASSERTED unsigned ret; /* used in debug checks */ struct nouveau_vp3_video_buffer *refs[16] = {}; desc.base = picture; diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c index d1c3168a15e..89c7019dd9c 100644 --- a/src/gallium/drivers/panfrost/pan_drm.c +++ b/src/gallium/drivers/panfrost/pan_drm.c @@ -197,7 +197,7 @@ panfrost_drm_import_bo(struct panfrost_screen *screen, int fd) { struct panfrost_bo *bo = rzalloc(screen, struct panfrost_bo); struct drm_panfrost_get_bo_offset get_bo_offset = {0,}; - MAYBE_UNUSED int ret; + ASSERTED int ret; unsigned gem_handle; ret = drmPrimeFDToHandle(screen->fd, fd, &gem_handle); @@ -355,7 +355,7 @@ unsigned panfrost_drm_query_gpu_version(struct panfrost_screen *screen) { struct drm_panfrost_get_param get_param = {0,}; - MAYBE_UNUSED int ret; + ASSERTED int ret; get_param.param = DRM_PANFROST_PARAM_GPU_PROD_ID; ret = drmIoctl(screen->fd, DRM_IOCTL_PANFROST_GET_PARAM, &get_param); diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index 805cf662da7..685c2b6d21b 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -435,7 +435,7 @@ static void compute_memory_move_item(struct compute_memory_pool *pool, new_start_in_dw, new_start_in_dw * 4); if (pool->item_list != item->link.prev) { - MAYBE_UNUSED struct compute_memory_item *prev; + ASSERTED struct compute_memory_item *prev; prev = container_of(item->link.prev, item, link); assert(prev->start_in_dw + prev->size_in_dw <= new_start_in_dw); } diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index bce5f36773e..68ed4cc5002 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -1062,7 +1062,7 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx, struct si_context *sctx = (struct si_context*)ctx; struct si_texture *src = (struct si_texture*)info->src.resource; struct si_texture *dst = (struct si_texture*)info->dst.resource; - MAYBE_UNUSED struct si_texture *stmp; + ASSERTED struct si_texture *stmp; unsigned dst_width = u_minify(info->dst.resource->width0, info->dst.level); unsigned dst_height = u_minify(info->dst.resource->height0, info->dst.level); enum pipe_format format = info->src.format; diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 7d5124e51b2..3704debd60b 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -193,7 +193,7 @@ void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst, if (!size) return; - MAYBE_UNUSED unsigned clear_alignment = MIN2(clear_value_size, 4); + ASSERTED unsigned clear_alignment = MIN2(clear_value_size, 4); assert(clear_value_size != 3 && clear_value_size != 6); /* 12 is allowed. */ assert(offset % clear_alignment == 0); diff --git a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c index b8a5df07137..373fd4ffa7c 100644 --- a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c +++ b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c @@ -1098,7 +1098,7 @@ si_prepare_prim_discard_or_split_draw(struct si_context *sctx, /* The compute IB is always chained, but we need to call cs_check_space to add more space. */ struct radeon_cmdbuf *cs = sctx->prim_discard_compute_cs; - MAYBE_UNUSED bool compute_has_space = sctx->ws->cs_check_space(cs, need_compute_dw, false); + ASSERTED bool compute_has_space = sctx->ws->cs_check_space(cs, need_compute_dw, false); assert(compute_has_space); assert(si_check_ring_space(sctx, out_indexbuf_size)); return SI_PRIM_DISCARD_ENABLED; diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 09442be1350..38b9b11a83c 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -2321,7 +2321,7 @@ static void si_init_bindless_descriptors(struct si_context *sctx, short shader_userdata_rel_index, unsigned num_elements) { - MAYBE_UNUSED unsigned desc_slot; + ASSERTED unsigned desc_slot; si_init_descriptors(desc, shader_userdata_rel_index, 16, num_elements); sctx->bindless_descriptors.num_active_slots = num_elements; diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 57c16ae67a1..5d7a30e306f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -134,7 +134,7 @@ static void add_arg_assign_checked(struct si_function_info *fninfo, enum si_arg_regfile regfile, LLVMTypeRef type, LLVMValueRef *assign, unsigned idx) { - MAYBE_UNUSED unsigned actual = add_arg_assign(fninfo, regfile, type, assign); + ASSERTED unsigned actual = add_arg_assign(fninfo, regfile, type, assign); assert(actual == idx); } @@ -6649,8 +6649,8 @@ static void si_build_wrapper_function(struct si_shader_context *ctx, LLVMTypeRef function_type; unsigned num_first_params; unsigned num_out, initial_num_out; - MAYBE_UNUSED unsigned num_out_sgpr; /* used in debug checks */ - MAYBE_UNUSED unsigned initial_num_out_sgpr; /* used in debug checks */ + ASSERTED unsigned num_out_sgpr; /* used in debug checks */ + ASSERTED unsigned initial_num_out_sgpr; /* used in debug checks */ unsigned num_sgprs, num_vgprs; unsigned gprs; diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c index 356196c1917..fda638dcea1 100644 --- a/src/gallium/drivers/softpipe/sp_state_sampler.c +++ b/src/gallium/drivers/softpipe/sp_state_sampler.c @@ -200,7 +200,7 @@ prepare_shader_sampling( if (!sp_tex->dt) { /* regular texture - setup array of mipmap level offsets */ - MAYBE_UNUSED struct pipe_resource *res = view->texture; + ASSERTED struct pipe_resource *res = view->texture; int j; if (view->target != PIPE_BUFFER) { diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c index da4792757f1..dc2418f5a50 100644 --- a/src/gallium/drivers/softpipe/sp_state_shader.c +++ b/src/gallium/drivers/softpipe/sp_state_shader.c @@ -420,7 +420,7 @@ static void softpipe_delete_compute_state(struct pipe_context *pipe, void *cs) { - MAYBE_UNUSED struct softpipe_context *softpipe = softpipe_context(pipe); + ASSERTED struct softpipe_context *softpipe = softpipe_context(pipe); struct sp_compute_shader *state = (struct sp_compute_shader *)cs; assert(softpipe->cs != state); diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index b6c21a866fe..e0e55f129b8 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -1002,10 +1002,10 @@ check_draw_params(struct svga_hwtnl *hwtnl, assert(range->indexWidth == range->indexArray.stride); if (ib) { - MAYBE_UNUSED unsigned size = ib->width0; - MAYBE_UNUSED unsigned offset = range->indexArray.offset; - MAYBE_UNUSED unsigned stride = range->indexArray.stride; - MAYBE_UNUSED unsigned count; + ASSERTED unsigned size = ib->width0; + ASSERTED unsigned offset = range->indexArray.offset; + ASSERTED unsigned stride = range->indexArray.stride; + ASSERTED unsigned count; assert(size); assert(offset < size); diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 1916a64245c..1f572c6c115 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -370,7 +370,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen, * It will be done using the current context. */ if (SVGA3D_InvalidateGBSurface(svga->swc, entry->handle) != PIPE_OK) { - MAYBE_UNUSED enum pipe_error ret; + ASSERTED enum pipe_error ret; /* Even though surface invalidation here is done after the command * buffer is flushed, it is still possible that it will diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c index 1aa15d8cd26..96d8a52eb62 100644 --- a/src/gallium/drivers/svga/svga_swtnl_draw.c +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c @@ -44,7 +44,7 @@ svga_swtnl_draw_vbo(struct svga_context *svga, struct pipe_transfer *ib_transfer = NULL; struct pipe_transfer *cb_transfer[SVGA_MAX_CONST_BUFS] = { 0 }; struct draw_context *draw = svga->swtnl.draw; - MAYBE_UNUSED unsigned old_num_vertex_buffers; + ASSERTED unsigned old_num_vertex_buffers; unsigned i; const void *map; enum pipe_error ret; diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c index cd9a4985d35..7926bfd39da 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) { - 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); + ASSERTED bool had_pm = *last_inst(block) & QPU_PM; + ASSERTED bool had_ws = *last_inst(block) & QPU_WS; + ASSERTED 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; } - MAYBE_UNUSED bool handled_qinst_cond = false; + ASSERTED bool handled_qinst_cond = false; switch (qinst->op) { case QOP_RCP: diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index e511750dc69..f68ac815f15 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -88,7 +88,7 @@ virgl_rebind_resource(struct virgl_context *vctx, /* Queries use internally created buffers and do not go through transfers. * Index buffers are not bindable. They are not tracked. */ - MAYBE_UNUSED const unsigned tracked_bind = (PIPE_BIND_VERTEX_BUFFER | + ASSERTED const unsigned tracked_bind = (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_SHADER_BUFFER | PIPE_BIND_SHADER_IMAGE); diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c index 329e881d873..c450a273767 100644 --- a/src/gallium/state_trackers/xvmc/surface.c +++ b/src/gallium/state_trackers/xvmc/surface.c @@ -227,8 +227,8 @@ Status XvMCRenderSurface(Display *dpy, XvMCContext *context, unsigned int pictur XvMCContextPrivate *context_priv; XvMCSurfacePrivate *target_surface_priv; - MAYBE_UNUSED XvMCSurfacePrivate *past_surface_priv; - MAYBE_UNUSED XvMCSurfacePrivate *future_surface_priv; + ASSERTED XvMCSurfacePrivate *past_surface_priv; + ASSERTED XvMCSurfacePrivate *future_surface_priv; XvMCMacroBlock *xvmc_mb; XVMC_MSG(XVMC_TRACE, "[XvMC] Rendering to surface %p, with past %p and future %p\n", diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index 8b82a9f90d3..6ab43cb998c 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -370,7 +370,7 @@ vmw_swc_add_validate_buffer(struct vmw_svga_winsys_context *vswc, struct pb_buffer *pb_buf, unsigned flags) { - MAYBE_UNUSED enum pipe_error ret; + ASSERTED enum pipe_error ret; unsigned translated_flags; boolean already_present; |