spirv: Work around the Doom shader bug
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 20 Jun 2017 16:06:44 +0000 (09:06 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 21 Jun 2017 01:51:26 +0000 (18:51 -0700)
commit1bd0acab21c250b263604a52ca6694941a6f02e0
treec69734a52f561da8ef8ae3b027f9832db9177429
parent93055576ae81a30880ab7079b5e832098946b3f6
spirv: Work around the Doom shader bug

Doom shipped with a broken version of GLSLang which handles samplers as
function arguments in a way that isn't spec-compliant.  In particular,
it creates a temporary local sampler variable and copies the sampler
into it.  While Dave has had a hack patch out for a while that gets it
working, we've never landed it because we've been hoping that a game
update would come out with fixed shaders.  Unfortunately, no game update
appears on to be on the horizon and I've found this issue in yet another
application so I think we're stuck working around it.  Hopefully, we can
delete this code one day.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99467
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/compiler/spirv/vtn_private.h
src/compiler/spirv/vtn_variables.c