[Mesa-dev] [PATCH 3/4] winsys/radeon: Keep bo statistics

Lauri Kasanen cand at gmx.com
Wed Jan 8 09:38:50 PST 2014


On Wed, 8 Jan 2014 15:56:33 +0200
Lauri Kasanen <cand at gmx.com> wrote:

> On Wed, 8 Jan 2014 12:03:12 +0100
> Marek Olšák <maraeo at gmail.com> wrote:
> > Also, last_cpu_time will be wrong anyway, because the driver may call
> > the buffer_map function only once per buffer, e.g. at buffer creation.
> > It's not a rule, but it happens.
> 
> I'll investigate this, thanks.

There are exactly two places where this happens.

1) trace_ptr, which is unused outside of the map call (should be removed
it seems)
2) r600_clear_buffer cpu fallback, which I believe is a bug:

} else {
	uint32_t *map = r600_buffer_map_sync_with_rings
		(&rctx->b, r600_resource(dst), PIPE_TRANSFER_WRITE);
	size /= 4;
	for (unsigned i = 0; i < size; i++)
		*map++ = value;
}

The buffer is never unmapped, and the pointer goes out of scope. So for
the current state, the cpu map statistics are ok.

- Lauri


More information about the mesa-dev mailing list