[Mesa-dev] [PATCH 8/8] i965/surface_state: Silence warning.
Rafael Antognolli
rafael.antognolli at intel.com
Fri Dec 15 22:53:35 UTC 2017
This warning showed up after aux_bo started being used inside
if (use_clear_address) {...
But use_clear_address depends on aux_surf being not null, in which case
aux_bo would also be set. Make the compiler happy anyway.
Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 9f583ca995f..78968aa83d0 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -148,7 +148,7 @@ brw_emit_surface_state(struct brw_context *brw,
union isl_color_value clear_color = { .u32 = { 0, 0, 0, 0 } };
- struct brw_bo *aux_bo;
+ struct brw_bo *aux_bo = NULL;
struct isl_surf *aux_surf = NULL;
uint64_t aux_offset = 0;
switch (aux_usage) {
--
2.14.3
More information about the mesa-dev
mailing list