i965/batch/debug: Allow log be dumped before assert
authorSergii Romantsov <sergii.romantsov@gmail.com>
Mon, 5 Nov 2018 13:02:49 +0000 (15:02 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 5 Nov 2018 17:24:55 +0000 (09:24 -0800)
Message that may show the culprit of assert now will
be dumped before that for debug purposes.

Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Reviewed-by: Lionel G Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/intel_batchbuffer.c

index 8b769eaf53465c568adf9ec5e4db260d03f26c1b..353fcba18f4a22c2fd021162626bded17fef972f 100644 (file)
@@ -725,10 +725,10 @@ execbuffer(int fd,
 
       /* Update brw_bo::gtt_offset */
       if (batch->validation_list[i].offset != bo->gtt_offset) {
-         assert(!(bo->kflags & EXEC_OBJECT_PINNED));
          DBG("BO %d migrated: 0x%" PRIx64 " -> 0x%llx\n",
              bo->gem_handle, bo->gtt_offset,
              batch->validation_list[i].offset);
+         assert(!(bo->kflags & EXEC_OBJECT_PINNED));
          bo->gtt_offset = batch->validation_list[i].offset;
       }
    }