[Mesa-dev] [PATCH 06/22] i965: Silence unused parameter warnings in blorp
Ian Romanick
idr at freedesktop.org
Fri Feb 23 23:55:51 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
Reduces my build from 2023 warnings to 1960 warnings by silencing 63
instances of things like
In file included from ../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c:33:0:
../../SOURCE/master/src/intel/blorp/blorp_genX_exec.h: In function ‘blorp_emit_cc_viewport’:
../../SOURCE/master/src/intel/blorp/blorp_genX_exec.h:500:51: warning: unused parameter ‘params’ [-Wunused-parameter]
const struct blorp_params *params)
^~~~~~
../../SOURCE/master/src/intel/blorp/blorp_genX_exec.h: In function ‘blorp_emit_sampler_state’:
../../SOURCE/master/src/intel/blorp/blorp_genX_exec.h:524:53: warning: unused parameter ‘params’ [-Wunused-parameter]
const struct blorp_params *params)
^~~~~~
In file included from ../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c:36:0:
../../SOURCE/master/src/mesa/drivers/dri/i965/gen4_blorp_exec.h: In function ‘blorp_emit_vs_state’:
../../SOURCE/master/src/mesa/drivers/dri/i965/gen4_blorp_exec.h:50:48: warning: unused parameter ‘params’ [-Wunused-parameter]
const struct blorp_params *params)
^~~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c: In function ‘blorp_flush_range’:
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c:197:39: warning: unused parameter ‘batch’ [-Wunused-parameter]
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
^~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c:197:52: warning: unused parameter ‘start’ [-Wunused-parameter]
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
^~~~~
../../SOURCE/master/src/mesa/drivers/dri/i965/genX_blorp_exec.c:197:66: warning: unused parameter ‘size’ [-Wunused-parameter]
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
^~~~
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/intel/blorp/blorp_genX_exec.h | 12 +++++-------
src/mesa/drivers/dri/i965/gen4_blorp_exec.h | 14 ++++++--------
src/mesa/drivers/dri/i965/genX_blorp_exec.c | 6 ++++--
3 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 737720a..ac70bb9 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -496,8 +496,7 @@ blorp_emit_vertex_elements(struct blorp_batch *batch,
/* 3DSTATE_VIEWPORT_STATE_POINTERS */
static uint32_t
-blorp_emit_cc_viewport(struct blorp_batch *batch,
- const struct blorp_params *params)
+blorp_emit_cc_viewport(struct blorp_batch *batch)
{
uint32_t cc_vp_offset;
blorp_emit_dynamic(batch, GENX(CC_VIEWPORT), vp, 32, &cc_vp_offset) {
@@ -520,8 +519,7 @@ blorp_emit_cc_viewport(struct blorp_batch *batch,
}
static uint32_t
-blorp_emit_sampler_state(struct blorp_batch *batch,
- const struct blorp_params *params)
+blorp_emit_sampler_state(struct blorp_batch *batch)
{
uint32_t offset;
blorp_emit_dynamic(batch, GENX(SAMPLER_STATE), sampler, 32, &offset) {
@@ -980,7 +978,7 @@ blorp_emit_blend_state(struct blorp_batch *batch,
static uint32_t
blorp_emit_color_calc_state(struct blorp_batch *batch,
- const struct blorp_params *params)
+ MAYBE_UNUSED const struct blorp_params *params)
{
uint32_t offset;
blorp_emit_dynamic(batch, GENX(COLOR_CALC_STATE), cc, 64, &offset) {
@@ -1171,7 +1169,7 @@ blorp_emit_pipeline(struct blorp_batch *batch,
blorp_emit(batch, GENX(3DSTATE_CONSTANT_PS), ps);
if (params->src.enabled)
- blorp_emit_sampler_state(batch, params);
+ blorp_emit_sampler_state(batch);
blorp_emit_3dstate_multisample(batch, params);
@@ -1205,7 +1203,7 @@ blorp_emit_pipeline(struct blorp_batch *batch,
blorp_emit_sf_config(batch, params);
blorp_emit_ps_config(batch, params);
- blorp_emit_cc_viewport(batch, params);
+ blorp_emit_cc_viewport(batch);
}
/******** This is the end of the pipeline setup code ********/
diff --git a/src/mesa/drivers/dri/i965/gen4_blorp_exec.h b/src/mesa/drivers/dri/i965/gen4_blorp_exec.h
index 7e5199c..e59bc9f 100644
--- a/src/mesa/drivers/dri/i965/gen4_blorp_exec.h
+++ b/src/mesa/drivers/dri/i965/gen4_blorp_exec.h
@@ -46,8 +46,7 @@ instruction_state_address(struct blorp_batch *batch, uint32_t offset)
}
static struct blorp_address
-blorp_emit_vs_state(struct blorp_batch *batch,
- const struct blorp_params *params)
+blorp_emit_vs_state(struct blorp_batch *batch)
{
assert(batch->blorp->driver_ctx == batch->driver_batch);
struct brw_context *brw = batch->driver_batch;
@@ -116,7 +115,7 @@ blorp_emit_wm_state(struct blorp_batch *batch,
/* Iron Lake can't do sampler prefetch */
wm.SamplerCount = (GEN_GEN != 5);
wm.BindingTableEntryCount = 2;
- uint32_t sampler = blorp_emit_sampler_state(batch, params);
+ uint32_t sampler = blorp_emit_sampler_state(batch);
wm.SamplerStatePointer = dynamic_state_address(batch, sampler);
}
@@ -155,10 +154,9 @@ blorp_emit_wm_state(struct blorp_batch *batch,
}
static struct blorp_address
-blorp_emit_color_calc_state(struct blorp_batch *batch,
- const struct blorp_params *params)
+blorp_emit_color_calc_state(struct blorp_batch *batch)
{
- uint32_t cc_viewport = blorp_emit_cc_viewport(batch, params);
+ uint32_t cc_viewport = blorp_emit_cc_viewport(batch);
uint32_t offset;
blorp_emit_dynamic(batch, GENX(COLOR_CALC_STATE), cc, 64, &offset) {
@@ -178,12 +176,12 @@ blorp_emit_pipeline(struct blorp_batch *batch,
emit_urb_config(batch, params);
blorp_emit(batch, GENX(3DSTATE_PIPELINED_POINTERS), pp) {
- pp.PointertoVSState = blorp_emit_vs_state(batch, params);
+ pp.PointertoVSState = blorp_emit_vs_state(batch);
pp.GSEnable = false;
pp.ClipEnable = false;
pp.PointertoSFState = blorp_emit_sf_state(batch, params);
pp.PointertoWMState = blorp_emit_wm_state(batch, params);
- pp.PointertoColorCalcState = blorp_emit_color_calc_state(batch, params);
+ pp.PointertoColorCalcState = blorp_emit_color_calc_state(batch);
}
brw_upload_urb_fence(brw);
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index 062171a..29ecce1 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -194,7 +194,8 @@ blorp_get_workaround_page(struct blorp_batch *batch)
#endif
static void
-blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
+blorp_flush_range(UNUSED struct blorp_batch *batch, UNUSED void *start,
+ UNUSED size_t size)
{
/* All allocated states come from the batch which we will flush before we
* submit it. There's nothing for us to do here.
@@ -203,7 +204,8 @@ blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
static void
blorp_emit_urb_config(struct blorp_batch *batch,
- unsigned vs_entry_size, unsigned sf_entry_size)
+ unsigned vs_entry_size,
+ MAYBE_UNUSED unsigned sf_entry_size)
{
assert(batch->blorp->driver_ctx == batch->driver_batch);
struct brw_context *brw = batch->driver_batch;
--
2.9.5
More information about the mesa-dev
mailing list