Mesa (master): radeonsi: fix/ silence unused variable warnings in optimized builds
Nicolai Hähnle
nh at kemper.freedesktop.org
Thu Nov 10 12:22:42 UTC 2016
Module: Mesa
Branch: master
Commit: b21912e2e92234d66c90b0f6f014a83698ef5ecb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b21912e2e92234d66c90b0f6f014a83698ef5ecb
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: Fri Nov 4 10:39:45 2016 +0100
radeonsi: fix/silence unused variable warnings in optimized builds
I'm leaving num_out_sgpr around since it's not in a fast path, and besides
the compiler should be able to optimize it away easily. The alternative
with #if/#endif would be extremely ugly.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_dma.c | 3 +--
src/gallium/drivers/radeonsi/si_shader.c | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_dma.c b/src/gallium/drivers/radeonsi/si_dma.c
index dee5ec5..8d186c3 100644
--- a/src/gallium/drivers/radeonsi/si_dma.c
+++ b/src/gallium/drivers/radeonsi/si_dma.c
@@ -98,7 +98,6 @@ static void si_dma_copy_tile(struct si_context *ctx,
struct r600_texture *rsrc = (struct r600_texture*)src;
struct r600_texture *rdst = (struct r600_texture*)dst;
unsigned dst_mode = rdst->surface.level[dst_level].mode;
- unsigned src_mode = rsrc->surface.level[src_level].mode;
bool detile = dst_mode == RADEON_SURF_MODE_LINEAR_ALIGNED;
struct r600_texture *rlinear = detile ? rdst : rsrc;
struct r600_texture *rtiled = detile ? rsrc : rdst;
@@ -114,7 +113,7 @@ static void si_dma_copy_tile(struct si_context *ctx,
uint64_t base, addr;
unsigned pipe_config;
- assert(dst_mode != src_mode);
+ assert(dst_mode != rsrc->surface.level[src_level].mode);
sub_cmd = SI_DMA_COPY_TILED;
lbpp = util_logbase2(bpp);
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 287b22f..8e403d7 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -6872,7 +6872,8 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
LLVMValueRef out[48];
LLVMTypeRef function_type;
unsigned num_params;
- unsigned num_out_sgpr, num_out;
+ unsigned num_out;
+ MAYBE_UNUSED unsigned num_out_sgpr; /* used in debug checks */
unsigned num_sgprs, num_vgprs;
unsigned last_sgpr_param;
unsigned gprs;
More information about the mesa-commit
mailing list