galahad: do map/unmap counting for resources
[mesa.git] / src / gallium / drivers / i965 / brw_batchbuffer.c
index d725e8b27e054a93ba6748eb5aa92b54d04e38a3..e80067f3b191830d72bc67335688a5f33c61cb82 100644 (file)
 #include "util/u_memory.h"
 
 #include "brw_batchbuffer.h"
-//#include "brw_decode.h"
 #include "brw_reg.h"
 #include "brw_winsys.h"
 #include "brw_debug.h"
 #include "brw_structs.h"
-#include "intel_decode.h"
 
 #define ALWAYS_EMIT_MI_FLUSH 1
 
@@ -157,14 +155,14 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
 enum pipe_error
 brw_batchbuffer_emit_reloc(struct brw_batchbuffer *batch,
                           struct brw_winsys_buffer *buffer,
-                          uint32_t usage,
+                          enum brw_buffer_usage usage,
                           uint32_t delta)
 {
    int ret;
 
    if (batch->ptr - batch->map > batch->buf->size) {
-      debug_printf("bad relocation ptr %p map %p offset %d size %d\n",
-                  batch->ptr, batch->map, batch->ptr - batch->map, batch->buf->size);
+      debug_printf("bad relocation ptr %p map %p offset %li size %i\n",
+                  batch->ptr, batch->map, (long) (batch->ptr - batch->map), batch->buf->size);
 
       return PIPE_ERROR_OUT_OF_MEMORY;
    }