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