[Mesa-dev] [PATCH 0/8] Implement EXT_shader_samples_identical

Ian Romanick idr at freedesktop.org
Wed Nov 18 15:46:46 PST 2015


This patch series implements a new GL extension,
EXT_shader_samples_identical.  This extension allows shaders to
determine when all of the samples in a particular texel are the same.
This takes advantage of the way compressed multisample surfaces are
stored on modern Intel and AMD hardware.  This enables optimizations in
application multisample resolve filters, etc.

I really wanted to get this in the next Mesa release.  For some reason,
I thought the branch point was after Thanksgiving (which is next
Thursday).  Ken reminded me yesterday that the branch point is actually
this Friday. :( As a result, I'm sending it out today to get review as
soon as possible.

I also wanted to get as much time as possible for other drivers to get
implementations.  I worked with Graham Sellers on this extension, and he
assures me that the implementation on modern Radeons is trivial.  My
expectation is that it should be about the same as the Intel
implementation.

There will be some extra TGSI bits needed, but that should also be
trivial.  For the NIR and i965 backend bits, I mostly copied and blended
the implementations of txf_ms and query_samples.

There are currently only trivial piglit tests, but I am working on more.
I basically hacked up tests/spec/arb_texture_multisample/texelfetch.c to
use the extension to render different colors based on whether
textureSamplesIdenticalEXT returned true or false.  The resulting image
and the generated assembly look good.  My plan is to get a set of real
tests out by midday tomorrow.

As soon as we're confident that the spec is good, I'll submit it to
Khronos for publication in the registry.  I'm still waiting on feedback
from another closed-source driver writer.


More information about the mesa-dev mailing list