[Mesa-dev] [PATCH] mesa: handle zero-size buffers in MapBuffer and ranges in MapBufferRange

Marek Olšák maraeo at gmail.com
Tue Aug 30 12:26:27 PDT 2011


On Tue, Aug 30, 2011 at 8:54 PM, Ian Romanick <idr at freedesktop.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/30/2011 10:15 AM, Marek Olšák wrote:
>> Moved from st/mesa.
>> This also fixes an assertion failure in piglit/fdo31934 on gallium drivers.
>
> So... I guess I don't understand why the mapping can't just fail and set
> GL_OUT_OF_MEMORY.  Returning a pointer to some random bit of storage
> seems like a recipe for bugs that are excruciating for app developers to
> debug.

I checked the ARB_vertex_buffer_object and ARB_map_buffer_range specs
and what should happen in this particular case is not specified. I
guess this is the reason st/mesa does not throw an error and silently
provides a dummy pointer.

Marek


More information about the mesa-dev mailing list