-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/30/2011 11:54 AM, Ian Romanick wrote: > On 08/30/2011 10:15 AM, Marek Olaá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.
As another data point, and perhaps Eric can correct me if I'm wrong, this is what the Intel drivers already do. In intel_bufferobj_map_range (intel_buffer_objects.c): if (intel_obj->buffer == NULL) { obj->Pointer = NULL; return NULL; } > I'd be more inclined to return an invalid pointer, like (void > *)0xdeadbeef, so the reads or writes through it will cause the segfault > that the app deserves. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk5dMp4ACgkQX1gOwKyEAw/QhACgoKVPaHTZh/pRSjcOK+e1X9Ui EU8An2pLZ6oQUlEgrEtPOq3aBaDqTRMm =RKmk -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev