Fix validation of group ops in SPV_AMD_shader_ballot
authorDavid Neto <dneto@google.com>
Fri, 24 Nov 2017 19:18:17 +0000 (14:18 -0500)
committerDavid Neto <dneto@google.com>
Thu, 30 Nov 2017 15:26:04 +0000 (10:26 -0500)
commit3c2e4c7d997404cb8d43299117373a697c28fde1
tree1802a031649bcdc77edd8580895a62993f5c6b7a
parent8cfa0c40e0afd5b6fcbedf622fd45afd2de2a055
Fix validation of group ops in SPV_AMD_shader_ballot

This needs custom code since the rules from the extension
are not encoded in the grammar.

Changes are:
- The new group instructions don't require Group capability
  when the extension is declared.
- The Reduce, InclusiveScan, ExclusiveScan normally require the Kernel
  capability, but don't when the extension is declared.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/991
source/val/validation_state.cpp
source/val/validation_state.h
source/validate_instruction.cpp
test/val/val_extensions_test.cpp