[Mesa-dev] [PATCH 2/2] i965: Implement the ARB_map_buffer_alignment extension.
eric at anholt.net
Mon Oct 29 14:30:36 PDT 2012
Kenneth Graunke <kenneth at whitecape.org> writes:
> (This extension became core in OpenGL 4.2.)
> On Gen4+, all of our buffer objects are backed by GEM bos, which are
> aligned to multiples of PAGE_SIZE (typically 4096, definitely >= 64).
> Gen3 uses malloc'd memory for some buffers, so don't expose this
> extension there. It's not likely to be useful anyway.
> We could actually set MIN_MAP_BUFFER_ALIGNMENT to getpagesize(), but
> Daniel suggested being conservative and only advertising 64.
I think this doesn't quite work in the temporary-buffer case.
The alignment part of the spec says that basically you'll get alignment
as if you were mapping the underlying aligned buffer even if you asked
for a sub-offset in the buffer. So if they ask for an offset of "1",
then we would need to allocate our temporary with a bit of padding and
return an offset of 1 into that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the mesa-dev