diff options
author | alan-baker <alanbaker@google.com> | 2020-07-22 11:45:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 11:45:02 -0400 |
commit | f3cec93665ec6097dbc56dafbb8b46595842eded (patch) | |
tree | 4711a093d608cfc0eb5f392982310bc0bfb109ba /source/val/validate_cfg.cpp | |
parent | dca2c86bc85047beb37be613daa0ac1ba96a35ec (diff) | |
download | SPIRV-Tools-f3cec93665ec6097dbc56dafbb8b46595842eded.tar.gz |
Support SPV_KHR_terminate_invocation (#3568)
Covers:
- assembler
- disassembler
- validator
- optimizer
Co-authored-by: David Neto <dneto@google.com>
Diffstat (limited to 'source/val/validate_cfg.cpp')
-rw-r--r-- | source/val/validate_cfg.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/val/validate_cfg.cpp b/source/val/validate_cfg.cpp index a2fe8827..8eb3a968 100644 --- a/source/val/validate_cfg.cpp +++ b/source/val/validate_cfg.cpp @@ -1096,12 +1096,18 @@ spv_result_t CfgPass(ValidationState_t& _, const Instruction* inst) { case SpvOpKill: case SpvOpReturnValue: case SpvOpUnreachable: + case SpvOpTerminateInvocation: _.current_function().RegisterBlockEnd(std::vector<uint32_t>()); if (opcode == SpvOpKill) { _.current_function().RegisterExecutionModelLimitation( SpvExecutionModelFragment, "OpKill requires Fragment execution model"); } + if (opcode == SpvOpTerminateInvocation) { + _.current_function().RegisterExecutionModelLimitation( + SpvExecutionModelFragment, + "OpTerminateInvocation requires Fragment execution model"); + } break; default: break; |