[Mesa-dev] [PATCH 26/35] meta: Use common GLSL code for blits

Kenneth Graunke kenneth at whitecape.org
Tue Feb 4 05:33:33 CET 2014


On 02/03/2014 12:54 AM, Rogovin, Kevin wrote:
> Hi,
> 
>> We can't do stencil blits with GLSL because no driver that uses meta can
>> do the GL_ARB_shader_stencil_export extension.  For depth and color
>> blits, we can always write the values from the shader, and disable
>> writes to the buffers using glColorMask and glDepthMask.  So... we just
>> need one shader.
> 
> Should we add GL_ARB_shader_stencil_export as one of the extensions Mesa
> can support? Naturally that is major tangent from this, and I am not too sure
> what hardware beyond newer AMD hardware has that capability.

Hi Kevin,

I don't believe our hardware can support GL_ARB_shader_stencil_export.
The render target write message can take RGBA, depth, and sample masks,
but not stencil.  Without that, it's not at all obvious how to implement it.

> The shader had that the fragment depth used the same value as the red of the
> fragment color, so should it not be then 3 shaders (color only, depth only, color and depth)
> with the last one having two samplers?
> 
> Also, should not the case of blitting from MSAA to non-MSAA be handled correctly?
> i.e. use the sampler type sampler2DMS  and average over the number of samples?
> or possible fancier filtering kernels?

We could definitely support MSAA->non-MSAA blits via
ARB_texture_multisample, but we don't today.  Gallium drivers don't use
Meta, i965 instead uses BLORP, and the other classic drivers don't
support multisampling.

--Ken

-------------- 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/20140203/2dd55438/attachment.pgp>


More information about the mesa-dev mailing list