Re: [Mesa-dev] [PATCH] draw: don't crash on vertex buffer overflow

2013-05-09 Thread Jose Fonseca
I somehow thought that GL_ARB_robustness that had something for this, but apparently it was just my imagination. Anyway, if we particularly cared for robustness of user pointers, we could query the OS for the virtual address range that contains a pointer. Windows/Mac have nice APIs for that. Li

Re: [Mesa-dev] [PATCH] draw: don't crash on vertex buffer overflow

2013-05-09 Thread Marek Olšák
Yes, we are not getting the user buffer sizes, because OpenGL lacks API to set them. The pointer is all you will ever have, just as it was received from a gl*Pointer call. Marek On Thu, May 9, 2013 at 8:29 PM, Zack Rusin wrote: > We would crash when stride was bigger than the size of the buffer.

[Mesa-dev] [PATCH] draw: don't crash on vertex buffer overflow

2013-05-09 Thread Zack Rusin
We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly with user_buffer's there's no way to validate the size because currently we're just not getting it. Adjust the draw interface to pass the size along the mapped

[Mesa-dev] [PATCH] draw: don't crash on vertex buffer overflow

2013-05-08 Thread Zack Rusin
We would crash when stride was bigger than the size of the buffer. The correct behavior is to just fetch zero's in this case. Unfortunatly gallium allows user_buffers in vertex_buffers and we can't figure out the sizes of those, so we need to null check the buffer to see if we can at all perform th