i965: Mark functions used conditionally as UNUSED
authorMatt Turner <mattst88@gmail.com>
Sat, 26 Aug 2017 03:40:13 +0000 (20:40 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 29 Aug 2017 22:20:57 +0000 (15:20 -0700)
The functions we're marking as UNUSED in genX_state_upload.c are used
only when compiling for particular generations.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/mesa/drivers/dri/i965/genX_state_upload.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index eb370db..3c2dc95 100644 (file)
@@ -119,7 +119,7 @@ ro_bo(struct brw_bo *bo, uint32_t offset)
    };
 }
 
-static struct brw_address
+UNUSED static struct brw_address
 ggtt_bo(struct brw_bo *bo, uint32_t offset)
 {
    return (struct brw_address) {
@@ -3036,7 +3036,7 @@ genX(upload_push_constant_packets)(struct brw_context *brw)
 
    for (int stage = 0; stage <= MESA_SHADER_FRAGMENT; stage++) {
       struct brw_stage_state *stage_state = stage_states[stage];
-      struct gl_program *prog = ctx->_Shader->CurrentProgram[stage];
+      UNUSED struct gl_program *prog = ctx->_Shader->CurrentProgram[stage];
 
       if (!stage_state->push_constants_dirty)
          continue;
index ef4a2b8..3fd5af4 100644 (file)
@@ -397,7 +397,7 @@ brw_get_num_logical_layers(const struct intel_mipmap_tree *mt, unsigned level)
       return mt->surf.logical_level0_px.array_len;
 }
 
-static unsigned
+UNUSED static unsigned
 get_num_phys_layers(const struct isl_surf *surf, unsigned level)
 {
    /* In case of physical dimensions one needs to consider also the layout.