Discussion:
[PATCH 14/17] i965: Silence unused parameter warning
(too old to reply)
Ian Romanick
2017-06-19 02:21:04 UTC
Permalink
Raw Message
From: Ian Romanick <***@intel.com>

brw_blorp.c: In function ‘brw_blorp_clear_depth_stencil’:
brw_blorp.c:913:53: warning: unused parameter ‘partial_clear’ [-Wunused-parameter]
GLbitfield mask, bool partial_clear)
^~~~~~~~~~~~~

Signed-off-by: Ian Romanick <***@intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 2 +-
src/mesa/drivers/dri/i965/brw_blorp.h | 2 +-
src/mesa/drivers/dri/i965/brw_clear.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index bc7a7b2..02158d9 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -910,7 +910,7 @@ brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
void
brw_blorp_clear_depth_stencil(struct brw_context *brw,
struct gl_framebuffer *fb,
- GLbitfield mask, bool partial_clear)
+ GLbitfield mask)
{
const struct gl_context *ctx = &brw->ctx;
struct gl_renderbuffer *depth_rb =
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h
index 29d5788..f03413d 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.h
+++ b/src/mesa/drivers/dri/i965/brw_blorp.h
@@ -65,7 +65,7 @@ brw_blorp_clear_color(struct brw_context *brw, struct gl_framebuffer *fb,
void
brw_blorp_clear_depth_stencil(struct brw_context *brw,
struct gl_framebuffer *fb,
- GLbitfield mask, bool partial_clear);
+ GLbitfield mask);

void
brw_blorp_resolve_color(struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index 467f017..25604cb 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -235,7 +235,7 @@ brw_clear(struct gl_context *ctx, GLbitfield mask)
}

if (mask & BUFFER_BITS_DEPTH_STENCIL) {
- brw_blorp_clear_depth_stencil(brw, fb, mask, partial_clear);
+ brw_blorp_clear_depth_stencil(brw, fb, mask);
debug_mask("blorp depth/stencil", mask & BUFFER_BITS_DEPTH_STENCIL);
mask &= ~BUFFER_BITS_DEPTH_STENCIL;
}
--
2.9.4
Ian Romanick
2017-06-19 02:21:06 UTC
Permalink
Raw Message
From: Ian Romanick <***@intel.com>

In file included from brw_context.h:40:0,
from brw_blorp.c:32:
../../../../../src/intel/compiler/brw_compiler.h: In function ‘brw_stage_has_packed_dispatch’:
../../../../../src/intel/compiler/brw_compiler.h:1150:61: warning: unused parameter ‘devinfo’ [-Wunused-parameter]
brw_stage_has_packed_dispatch(const struct gen_device_info *devinfo,
^~~~~~~

Signed-off-by: Ian Romanick <***@intel.com>
---
src/intel/compiler/brw_compiler.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
index 7887374..19dd43c 100644
--- a/src/intel/compiler/brw_compiler.h
+++ b/src/intel/compiler/brw_compiler.h
@@ -1147,7 +1147,7 @@ encode_slm_size(unsigned gen, uint32_t bytes)
* '2^n - 1' for some n.
*/
static inline bool
-brw_stage_has_packed_dispatch(const struct gen_device_info *devinfo,
+brw_stage_has_packed_dispatch(MAYBE_UNUSED const struct gen_device_info *devinfo,
gl_shader_stage stage,
const struct brw_stage_prog_data *prog_data)
{
--
2.9.4
Ian Romanick
2017-06-19 02:21:05 UTC
Permalink
Raw Message
From: Ian Romanick <***@intel.com>

brw_blorp.c:1007:4: warning: ‘num_layers’ may be used uninitialized in this function [-Wmaybe-uninitialized]
blorp_clear_depth_stencil(&batch, &depth_surf, &stencil_surf,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
level, start_layer, num_layers,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
x0, y0, x1, y1,
~~~~~~~~~~~~~~~
(mask & BUFFER_BIT_DEPTH), ctx->Depth.Clear,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stencil_mask, ctx->Stencil.Clear);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
brw_blorp.c:1007:4: warning: ‘start_layer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
brw_blorp.c:1007:4: warning: ‘level’ may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Ian Romanick <***@intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 02158d9..05f46ee 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -955,7 +955,7 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw,
if (x0 == x1 || y0 == y1)
return;

- uint32_t level, start_layer, num_layers;
+ uint32_t level = 0, start_layer = 0, num_layers = 0;
struct isl_surf isl_tmp[4];
struct blorp_surf depth_surf, stencil_surf;

@@ -1001,6 +1001,7 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw,
}

assert((mask & BUFFER_BIT_DEPTH) || stencil_mask);
+ assert(num_layers != 0);

struct blorp_batch batch;
blorp_batch_init(&brw->blorp, &batch, brw, 0);
--
2.9.4
Loading...