[Mesa-dev] [PATCH] nir/spirv: Make unhandled decorations a warning rather than unreachable()

Jason Ekstrand jason at jlekstrand.net
Tue May 24 03:37:17 UTC 2016

On Mon, May 23, 2016 at 7:49 PM, Matt Turner <mattst88 at gmail.com> wrote:

> On Mon, May 23, 2016 at 6:43 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > This prevents SPIR-V -> NIR from dying if we get a decoration we don't
> know
> > about.  Compiling incorrect code is probably a better failure mode than
> > dying horribly.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95573
> We want to try to limp along after compiling a shader whose meaning we
> can't determine?
> Maybe I don't understand, but shouldn't we just support whatever
> decoration is missing?

We support all of the decorations that have meaning in the given context.
However, sometimes glslang will throw on a pointless decoration we don't
need.  Sometimes hitting that means there's a bug (hence the warning) but
sometimes it means we're getting a junk decoration.  Ultimately, we should
probably have every possible decoration in the switch with most of them
going nowhere; I just haven't bothered to do a full audit of everything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160523/24b65fa8/attachment.html>

More information about the mesa-dev mailing list