Module: Mesa Branch: master Commit: b339d63f0d0337df918c7aed471b90c02401bdb7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b339d63f0d0337df918c7aed471b90c02401bdb7
Author: Kenneth Graunke <[email protected]> Date: Mon Sep 18 18:50:06 2017 -0700 i965: Fix batch map failure check in INTEL_DEBUG=bat handling. I originally wrote the code to call the maps 'batch' and 'state', until I remembered that 'batch' is the intel_batchbuffer struct pointer. The NULL check was still using the wrong variable. Caught by Coverity. CID: 1418109 --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 7d5a8947e8..6a16771fc6 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -439,7 +439,7 @@ do_batch_dump(struct brw_context *brw) uint32_t *batch_data = brw_bo_map(brw, batch->bo, MAP_READ); uint32_t *state = brw_bo_map(brw, batch->state_bo, MAP_READ); - if (batch == NULL || state == NULL) { + if (batch_data == NULL || state == NULL) { fprintf(stderr, "WARNING: failed to map batchbuffer/statebuffer\n"); return; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
