On 22.01.2010 17:41, Keith Whitwell wrote:
> Christoph,
>
> The vertex usage issue is a bug and can be fixed.
>
>   
Oh ... I thought it was intentional, and relied on it to decide whether
to use immediate mode or to copy the buffers to VRAM/GART first.
That bug helped increase nexuiz' FPS tenfold ... :'(
> It sounds like you're really asking for another flag that indicates the 
> expected lifetime of the buffer.  That sounds orthogonal to the ones we 
> already have describing the possible binding points.
>
> I suspect ttm is already reusing buffer memory for you (userspace 
> sub-allocation), so the weight of the ttm calls you are making may be less 
> than you suspect.  
>
> Keith
> ________________________________________
> From: Christoph Bumiller [e0425...@student.tuwien.ac.at]
> Sent: Friday, January 22, 2010 8:35 AM
> To: Keith Whitwell
> Cc: Michal Krol; mesa3d-dev
> Subject: Re: [Mesa3d-dev] [RFC] gallium-multiple-constant-buffers merge
>
> On 22.01.2010 17:01, Keith Whitwell wrote:
>   
>> Christoph,
>>
>> The USAGE_CONSTANT flag is a bit confusing -- the intention is to state that 
>> this buffer can be bound as a constant-buffer, not that it is itself 
>> immutable.  It should be perfectly legal to create a single constant buffer 
>> and update it over time...
>>
>>
>>     
> I didn't interpret the USAGE_CONSTANT as meaning the buffer's contents
> should be constant at all, I just meant it should not be used for throw-away
> constant buffers.
> The same is done for vertex buffers created for glVertexPointer etc., they
> do NOT have PIPE_BUFFER_USAGE_VERTEX (they are user_buffer_create),
> but STILL get set as vertex buffers.
>
> Alternatively, rather than not using USAGE_CONSTANT/VERTEX on those,
> we could finally add PIPE_BUFFER_USAGE_STATIC,STREAM,THROW_AWAY ...
>
> Of course, maybe we shouldn't take the buffer_create function literally and
> ask TTM to create a new buffer object every time it's called ... I admit
> that
> this whole thing is a pipe driver specific issue.
>   
>> Keith
>> ________________________________________
>> From: Christoph Bumiller [e0425...@student.tuwien.ac.at]
>> Sent: Thursday, January 21, 2010 3:48 PM
>> To: Michal Krol
>> Cc: mesa3d-dev; Keith Whitwell
>> Subject: Re: [Mesa3d-dev] [RFC] gallium-multiple-constant-buffers merge
>>
>> On 21.01.2010 20:20, michal wrote:
>>
>>     
>>> Hi,
>>>
>>> This simple feature branch adds support for two-dimensional constant
>>> buffers in TGSI.
>>>
>>> An example shader would look like this:
>>>
>>> FRAG
>>>
>>> DCL IN[0], COLOR, LINEAR
>>> DCL OUT[0], COLOR
>>> DCL CONST[1][1..2]
>>>
>>> MAD OUT[0], IN[0], CONST[1][2], CONST[1][1]
>>>
>>> END
>>>
>>> For this to work, one needs to bind a buffer to slot nr 1 containing at
>>> least 3 vectors.
>>>
>>>
>>>
>>>       
>> I've been thinking about what to do with these multiple constant
>> buffers now, and I thought we might want to avoid creating those
>> buffers with PIPE_BUFFER_USAGE_CONSTANT that will be used
>> only once and then discarded, as the currently used uniform buffer
>> is.
>> Instead it should only be set for persistent ones that the user
>> created with glGenBuffers'd etc. (this would be similar to our usage of
>> PIPE_BUFFER_USAGE_VERTEX).
>>
>> Then I would be able to decided whether to put them in VRAM or
>> in user memory (since creation of VRAM buffers is a bit costly),
>> and then either copy/upload constants from the buffer if it's user,
>> or bind it's GPU virt. address to the program CB it if it's VRAM.
>>
>> Of course, I don't know if it would even be noticeable performance-wise
>> if I just kept around a bunch of buffers and pushed constants all the
>> time ...
>>
>> Any thoughts ?
>> Thanks,
>>  Christoph
>>
>>     
>>> ------------------------------------------------------------------------------
>>> Throughout its 18-year history, RSA Conference consistently attracts the
>>> world's best and brightest in the field, creating opportunities for 
>>> Conference
>>> attendees to learn about information security's most important issues 
>>> through
>>> interactions with peers, luminaries and emerging and established companies.
>>> http://p.sf.net/sfu/rsaconf-dev2dev
>>> _______________________________________________
>>> Mesa3d-dev mailing list
>>> Mesa3d-dev@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
>>>
>>>
>>>       
>>     
>   


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to