aboutsummaryrefslogtreecommitdiff
path: root/source/val/validate_cfg.cpp
diff options
context:
space:
mode:
authoralan-baker <alanbaker@google.com>2020-07-22 11:45:02 -0400
committerGitHub <noreply@github.com>2020-07-22 11:45:02 -0400
commitf3cec93665ec6097dbc56dafbb8b46595842eded (patch)
tree4711a093d608cfc0eb5f392982310bc0bfb109ba /source/val/validate_cfg.cpp
parentdca2c86bc85047beb37be613daa0ac1ba96a35ec (diff)
downloadSPIRV-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.cpp6
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;