Mesa (master): intel/blorp: Fix compiler warning about num_layers.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Mar 20 21:07:04 UTC 2018
Module: Mesa
Branch: master
Commit: 4d8b476fa9a01aef94dc2d83e9306ba7c5adbe7f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d8b476fa9a01aef94dc2d83e9306ba7c5adbe7f
Author: Eric Anholt <eric at anholt.net>
Date: Sat Feb 10 10:29:56 2018 +0000
intel/blorp: Fix compiler warning about num_layers.
The compiler doesn't notice that the condition for num_layers to be
undefined already defined it above (as our assert checked in a debug
build).
v2: Move the pair of assignments to one outside of the block.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 72c5d194ef..72578b6ea5 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1426,8 +1426,8 @@ brw_blorp_clear_depth_stencil(struct brw_context *brw,
} else {
level = irb->mt_level;
start_layer = irb->mt_layer;
- num_layers = fb->MaxNumLayers ? irb->layer_count : 1;
}
+ num_layers = fb->MaxNumLayers ? irb->layer_count : 1;
stencil_mask = ctx->Stencil.WriteMask[0] & 0xff;
More information about the mesa-commit
mailing list