diff options
author | Ian Romanick <[email protected]> | 2018-02-21 16:16:53 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-03-02 16:10:44 -0800 |
commit | 1049b57bf262a6afb2e2ab73062376258b33a442 (patch) | |
tree | 6a2c2ac3d3d53aba6ca64da569785e3a2303cade /src | |
parent | 50bf1868295ecd5ef5d9673d4f5c1259b9fa2b3f (diff) |
i965: Silence unused parameter warnings in genX_state_upload
Reduces my build from 1772 warnings to 1717 warnings by silencing 55
instances of things like
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘gen4_emit_vertex_buffer_state’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:313:41: warning: unused parameter ‘end_offset’ [-Wunused-parameter]
unsigned end_offset,
^~~~~~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘gen4_emit_sampler_state_pointers_xs’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:4689:58: warning: unused parameter ‘brw’ [-Wunused-parameter]
genX(emit_sampler_state_pointers_xs)(struct brw_context *brw,
^~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:4690:62: warning: unused parameter ‘stage_state’ [-Wunused-parameter]
struct brw_stage_state *stage_state)
^~~~~~~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘gen4_upload_default_color’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:4730:40: warning: unused parameter ‘format’ [-Wunused-parameter]
mesa_format format, GLenum base_format,
^~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘translate_wrap_mode’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:4906:41: warning: unused parameter ‘brw’ [-Wunused-parameter]
translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest)
^~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c: In function ‘gen4_update_sampler_state’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_state_upload.c:4972:37: warning: unused parameter ‘batch_offset_for_sampler_state’ [-Wunused-parameter]
uint32_t batch_offset_for_sampler_state)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index d43f0ed2ade..001589a8dfe 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -158,7 +158,7 @@ KSP(struct brw_context *brw, uint32_t offset) } #else static uint32_t -KSP(struct brw_context *brw, uint32_t offset) +KSP(UNUSED struct brw_context *brw, uint32_t offset) { return offset; } @@ -330,9 +330,9 @@ genX(emit_vertex_buffer_state)(struct brw_context *brw, unsigned buffer_nr, struct brw_bo *bo, unsigned start_offset, - unsigned end_offset, + MAYBE_UNUSED unsigned end_offset, unsigned stride, - unsigned step_rate) + MAYBE_UNUSED unsigned step_rate) { struct GENX(VERTEX_BUFFER_STATE) buf_state = { .VertexBufferIndex = buffer_nr, @@ -4732,8 +4732,8 @@ genX(emit_mi_report_perf_count)(struct brw_context *brw, * Emit a 3DSTATE_SAMPLER_STATE_POINTERS_{VS,HS,GS,DS,PS} packet. */ static void -genX(emit_sampler_state_pointers_xs)(struct brw_context *brw, - struct brw_stage_state *stage_state) +genX(emit_sampler_state_pointers_xs)(MAYBE_UNUSED struct brw_context *brw, + MAYBE_UNUSED struct brw_stage_state *stage_state) { #if GEN_GEN >= 7 static const uint16_t packet_headers[] = { @@ -4773,7 +4773,7 @@ has_component(mesa_format format, int i) static void genX(upload_default_color)(struct brw_context *brw, const struct gl_sampler_object *sampler, - mesa_format format, GLenum base_format, + MAYBE_UNUSED mesa_format format, GLenum base_format, bool is_integer_format, bool is_stencil_sampling, uint32_t *sdc_offset) { @@ -4949,7 +4949,7 @@ genX(upload_default_color)(struct brw_context *brw, } static uint32_t -translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest) +translate_wrap_mode(GLenum wrap, MAYBE_UNUSED bool using_nearest) { switch (wrap) { case GL_REPEAT: @@ -5014,8 +5014,7 @@ genX(update_sampler_state)(struct brw_context *brw, mesa_format format, GLenum base_format, const struct gl_texture_object *texObj, const struct gl_sampler_object *sampler, - uint32_t *sampler_state, - uint32_t batch_offset_for_sampler_state) + uint32_t *sampler_state) { struct GENX(SAMPLER_STATE) samp_st = { 0 }; @@ -5083,9 +5082,9 @@ genX(update_sampler_state)(struct brw_context *brw, bool either_nearest = sampler->MinFilter == GL_NEAREST || sampler->MagFilter == GL_NEAREST; - unsigned wrap_s = translate_wrap_mode(brw, sampler->WrapS, either_nearest); - unsigned wrap_t = translate_wrap_mode(brw, sampler->WrapT, either_nearest); - unsigned wrap_r = translate_wrap_mode(brw, sampler->WrapR, either_nearest); + unsigned wrap_s = translate_wrap_mode(sampler->WrapS, either_nearest); + unsigned wrap_t = translate_wrap_mode(sampler->WrapT, either_nearest); + unsigned wrap_r = translate_wrap_mode(sampler->WrapR, either_nearest); if (target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_CUBE_MAP_ARRAY) { @@ -5178,8 +5177,7 @@ genX(update_sampler_state)(struct brw_context *brw, static void update_sampler_state(struct brw_context *brw, int unit, - uint32_t *sampler_state, - uint32_t batch_offset_for_sampler_state) + uint32_t *sampler_state) { struct gl_context *ctx = &brw->ctx; const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; @@ -5196,7 +5194,7 @@ update_sampler_state(struct brw_context *brw, texUnit->LodBias, firstImage->TexFormat, firstImage->_BaseFormat, texObj, sampler, - sampler_state, batch_offset_for_sampler_state); + sampler_state); } static void @@ -5221,19 +5219,15 @@ genX(upload_sampler_state_table)(struct brw_context *brw, 32, &stage_state->sampler_offset); /* memset(sampler_state, 0, sampler_count * size_in_bytes); */ - uint32_t batch_offset_for_sampler_state = stage_state->sampler_offset; - for (unsigned s = 0; s < sampler_count; s++) { if (SamplersUsed & (1 << s)) { const unsigned unit = prog->SamplerUnits[s]; if (ctx->Texture.Unit[unit]._Current) { - update_sampler_state(brw, unit, sampler_state, - batch_offset_for_sampler_state); + update_sampler_state(brw, unit, sampler_state); } } sampler_state += dwords; - batch_offset_for_sampler_state += size_in_bytes; } if (GEN_GEN >= 7 && stage_state->stage != MESA_SHADER_COMPUTE) { |