On 09.04.2010 17:49, Keith Whitwell wrote:
> On Fri, 2010-04-09 at 08:45 -0700, Roland Scheidegger wrote:
>> Module: Mesa
>> Branch: gallium-resources
>> Commit: faf53328d1154c51d8a59513f2bfcae62272b0bf
>> URL:    
>> http://cgit.freedesktop.org/mesa/mesa/commit/?id=faf53328d1154c51d8a59513f2bfcae62272b0bf
>>
>> Author: Roland Scheidegger <srol...@vmware.com>
>> Date:   Fri Apr  9 17:44:24 2010 +0200
>>
>> gallium: fix comments for changed USAGE flags
>>
>> ---
>>
>>  src/gallium/auxiliary/util/u_simple_screen.h  |    9 +++++----
>>  src/gallium/drivers/svga/svga_winsys.h        |   10 ++++------
>>  src/gallium/include/pipe/p_screen.h           |    2 +-
>>  src/gallium/include/state_tracker/sw_winsys.h |    2 +-
>>  4 files changed, 11 insertions(+), 12 deletions(-)
>>
>> diff --git a/src/gallium/auxiliary/util/u_simple_screen.h 
>> b/src/gallium/auxiliary/util/u_simple_screen.h
>> index 0042277..1ba59af 100644
>> --- a/src/gallium/auxiliary/util/u_simple_screen.h
>> +++ b/src/gallium/auxiliary/util/u_simple_screen.h
>> @@ -73,9 +73,10 @@ struct pipe_winsys
>>      * window systems must then implement that interface (rather than the
>>      * other way around...).
>>      *
>> -    * usage is a bitmask of PIPE_BUFFER_USAGE_PIXEL/VERTEX/INDEX/CONSTANT. 
>> This
>> -    * usage argument is only an optimization hint, not a guarantee, 
>> therefore
>> -    * proper behavior must be observed in all circumstances.
>> +    * usage is a bitmask of PIPE_BIND_*.
>> +    * XXX is this true?
>> +    * This usage argument is only an optimization hint, not a guarantee,
>> +    * therefore proper behavior must be observed in all circumstances.
> 
> The new flags are no longer hints - they are supposed actually specify
> which operations are permitted on a resource.  
> 
> Unfortunately I don't think this is very well enforced yet -- I intend
> to add a "debug" layer to sit between state-tracker and driver, based on
> the drivers/identity layer, which will check for violations of this &
> other rules.

Ok, I thought this to be the case, but wasn't sure. I'll fix the comment.
In the svga code, I actually couldn't figure out the usage flags when a
winsys buffer is created. It looks like usage is always 0, except for
queries it uses SVGA_BUFFER_USAGE_PINNED. Of course, that's not a
resource but a winsys buffer, but as far as I can tell this ends up in a
pb_buffer usage flag. Not sure if that's ok or supposed to be like that...

Roland

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to