struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ /* XXX we should check that all bound resources are unmapped
+ * before drawing.
+ */
+
pipe->draw_vbo(pipe, info);
}
struct pipe_context *context = glhd_context->pipe;
struct pipe_transfer *transfer = glhd_transfer->transfer;
+ struct galahad_resource *glhd_resource = galahad_resource(_transfer->resource);
+
+ glhd_resource->map_count++;
+
return context->transfer_map(context,
transfer);
}
struct galahad_transfer *glhd_transfer = galahad_transfer(_transfer);
struct pipe_context *context = glhd_context->pipe;
struct pipe_transfer *transfer = glhd_transfer->transfer;
+ struct galahad_resource *glhd_resource = galahad_resource(_transfer->resource);
+
+ if (glhd_resource->map_count < 1) {
+ glhd_warn("context::transfer_unmap() called too many times"
+ " (count = %d)\n", glhd_resource->map_count);
+ }
+
+ glhd_resource->map_count--;
context->transfer_unmap(context,
transfer);