[Mesa-dev] [PATCH 1/4] svga: fix buffer binding flags initialization
Brian Paul
brianp at vmware.com
Mon Jul 3 16:09:46 UTC 2017
On 07/03/2017 09:57 AM, Charmaine Lee wrote:
>
>>From: Brian Paul <brianp at vmware.com>
>>Sent: Sunday, July 2, 2017 8:12 AM
>>To: mesa-dev at lists.freedesktop.org
>>Cc: Charmaine Lee
>>Subject: [PATCH 1/4] svga: fix buffer binding flags initialization
>
>>If a buffer is created/initialized with glNamedBufferData we will
>>have no target (GL_ARRAY_BUFFER, GL_UNIFORM_BUFFER, etc) >so the
>>svga_buffer::bind_flags will be zero until we try to get the buffer
> handle.
>
>>This patch initializes the svga_buffer::bind_flags field when it's
> zero.
>
>>This fixes the Piglit arb_uniform_buffer_object-rendering-dsa test.
>
>>Note that there's still issues in this area that'll have to be
>>addressed in the future. For example, creating a buffer object
>>as GL_UNIFORM_BUFFER and later using it as a vertex buffer will
>>fail.
>
> Since we are creating two separate host surfaces for such buffer object
> when it is used as both constant buffer and vertex buffer, we are
> probably missing a surface update when the buffer object is updated.
> Which piglit fails?
Piglit seems OK, actually. But I hacked a Mesa demo to setup a VBO
using GL_UNIFORM_BUFFER as the initial binding point, the test fails.
I'll send it to you. I also want to write a new piglit test to exercise
this.
-Brian
More information about the mesa-dev
mailing list