Vulkan BuiltIn variables can't have Location/Component decorations
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>
Thu, 22 Feb 2018 07:28:45 +0000 (23:28 -0800)
committerDavid Neto <dneto@google.com>
Thu, 1 Mar 2018 20:00:08 +0000 (15:00 -0500)
commit8b27ba834da7347552eac56ace31e539c3c9084d
tree2d8f600e07479027a41ff35b060c2862ed6a055e
parentce5941a6425e2b0f8128d02e830a9609b3f18709
Vulkan BuiltIn variables can't have Location/Component decorations

As per Vulkan spec, BuiltIn variables can't have Location or Component
decorations. On some drivers, these can lead to driver crashing when
compiling the shader pipeline; for example, NVidia/AMD desktop drivers:
https://github.com/KhronosGroup/glslang/issues/1182.

This change adds validation and tests to catch this.
source/validate_decorations.cpp
test/val/val_decoration_test.cpp