{
struct aub_buffer *sbo = aub_bo(buf);
+ assert(sbo->data);
+
if (flags & PIPE_BUFFER_FLAG_WRITE)
sbo->dump_on_unmap = 1;
if (sbo->map_count == 0 &&
sbo->dump_on_unmap) {
+
+ sbo->dump_on_unmap = 0;
+
brw_aub_gtt_data( iws->aubfile,
sbo->offset,
sbo->data,
struct pipe_buffer_handle *buf)
{
if (*ptr) {
+ assert(aub_bo(*ptr)->refcount != 0);
if (--(aub_bo(*ptr)->refcount) == 0)
free(*ptr);
*ptr = NULL;
unsigned flags,
unsigned hint)
{
- return pipe_bo(CALLOC_STRUCT(aub_buffer));
+ struct aub_buffer *sbo = CALLOC_STRUCT(aub_buffer);
+ sbo->refcount = 1;
+ return pipe_bo(sbo);
}
{
struct aub_buffer *sbo = CALLOC_STRUCT(aub_buffer);
+ sbo->refcount = 1;
+
/* Lets hope this is meant for upload, not as a result!
*/
aub_buffer_data( winsys,