[Mesa-dev] [Mesa-stable] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers
Kenneth Graunke
kenneth at whitecape.org
Mon May 19 22:22:31 PDT 2014
On 05/19/2014 03:52 PM, Chris Forbes wrote:
> If you're going to do that, you'd really want to add draw buffer count
> to the cache key (and i guess this might be the point where you
> convert the blit shader cache to be a hashtable), to avoid recompiling
> all the time if the app does two blits with the same target but
> different draw buffer counts.
>
> This all seems like a huge amount of extra machinery to avoid using
> gl_FragColor and having the backend just take care of it, though. What
> do we actually gain from this?
One thing that's bothered me about our blit code...the integer RT
support is rather sketchy.
Eric pointed out that it ought to work: we interpret the integer source
buffer as float, copy those bits to gl_FragColor - which takes a float -
and then write the bits out as if the destination were float. It should
preserve the bits, and filtering should be off...
One annoying thing is that there's no int/uint equivalent to
gl_FragColor...so if you want to write to all the render targets, you
have to do something like this. (Or, we'd have to add something to the
language...)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140519/eed390e3/attachment.sig>
More information about the mesa-dev
mailing list