Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-15 Thread Marek Olšák
On Fri, Mar 14, 2014 at 7:35 PM, Eric Anholt wrote: > Kenneth Graunke writes: > >> On 02/27/2014 02:52 PM, Eric Anholt wrote: >>> One thing I noticed while working on this was that we only reallocate buffer >>> storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The >>> ARB_mbr s

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-15 Thread Kenneth Graunke
On 03/14/2014 11:35 AM, Eric Anholt wrote: > Kenneth Graunke writes: > >> On 02/27/2014 02:52 PM, Eric Anholt wrote: >>> One thing I noticed while working on this was that we only reallocate buffer >>> storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The >>> ARB_mbr spec says

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-14 Thread Eric Anholt
Kenneth Graunke writes: > I'm trying to decide whether we need to implement MemoryBarrier(). > > Reading through the spec, it definitely seems to apply to us: > > Add to the list of flags accepted by the parameter to > MemoryBarrier in Section 7.12.2, "Shader Memory Access Synchronizatio

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-14 Thread Eric Anholt
Kenneth Graunke writes: > On 02/27/2014 02:52 PM, Eric Anholt wrote: >> One thing I noticed while working on this was that we only reallocate buffer >> storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The >> ARB_mbr spec says that the contents "may be discarded", not "must be

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-14 Thread Kenneth Graunke
I'm trying to decide whether we need to implement MemoryBarrier(). Reading through the spec, it definitely seems to apply to us: Add to the list of flags accepted by the parameter to MemoryBarrier in Section 7.12.2, "Shader Memory Access Synchronization": * CLIENT_MAPPED_BUFFER_

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-13 Thread Kenneth Graunke
On 02/27/2014 02:52 PM, Eric Anholt wrote: > One thing I noticed while working on this was that we only reallocate buffer > storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The > ARB_mbr spec says that the contents "may be discarded", not "must be > discarded". However, while w

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-04 Thread Jose Fonseca
I agree that apps that only write to a buffer shouldn't use both MAP_UNSYNCHRONIZED and MAP_INVALIDATE_BUFFER_BIT, if that's your point. Apps should stick so a single strategy. But it seems a common pitfall. Note that MAP_INVALIDATE_*_BIT purpose is not just avoid synchronization. They also a

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-04 Thread Marek Olšák
In my opinion, MAP_UNSYNCHRONIZED says that you don't have to sync, which makes MAP_INVALIDATE_* useless, because the invalidate flags are only useful for avoiding synchronization and you already know you don't have to do it. Marek On Thu, Feb 27, 2014 at 11:52 PM, Eric Anholt wrote: > One thing

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-04 Thread Jose Fonseca
- Original Message - > - Original Message - > > One thing I noticed while working on this was that we only reallocate > > buffer > > storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The > > ARB_mbr spec says that the contents "may be discarded", not "must be >

Re: [Mesa-dev] i965 GL_ARB_buffer_storage

2014-03-04 Thread Jose Fonseca
- Original Message - > One thing I noticed while working on this was that we only reallocate buffer > storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The > ARB_mbr spec says that the contents "may be discarded", not "must be > discarded". However, while writing the gla

[Mesa-dev] i965 GL_ARB_buffer_storage

2014-02-27 Thread Eric Anholt
One thing I noticed while working on this was that we only reallocate buffer storage for INVALIDATE_BUFFER_BIT when UNSYNCHRONIZED_BIT is unset. The ARB_mbr spec says that the contents "may be discarded", not "must be discarded". However, while writing the glamor code I happened to type this for