mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Updated spirv-tools.
This commit is contained in:
21
3rdparty/spirv-tools/source/opcode.cpp
vendored
21
3rdparty/spirv-tools/source/opcode.cpp
vendored
@@ -444,15 +444,32 @@ bool spvOpcodeIsReturn(SpvOp opcode) {
|
||||
}
|
||||
}
|
||||
|
||||
bool spvOpcodeIsAbort(SpvOp opcode) {
|
||||
switch (opcode) {
|
||||
case SpvOpKill:
|
||||
case SpvOpUnreachable:
|
||||
case SpvOpTerminateInvocation:
|
||||
case SpvOpTerminateRayKHR:
|
||||
case SpvOpIgnoreIntersectionKHR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool spvOpcodeIsReturnOrAbort(SpvOp opcode) {
|
||||
return spvOpcodeIsReturn(opcode) || opcode == SpvOpKill ||
|
||||
opcode == SpvOpUnreachable || opcode == SpvOpTerminateInvocation;
|
||||
return spvOpcodeIsReturn(opcode) || spvOpcodeIsAbort(opcode);
|
||||
}
|
||||
|
||||
bool spvOpcodeIsBlockTerminator(SpvOp opcode) {
|
||||
return spvOpcodeIsBranch(opcode) || spvOpcodeIsReturnOrAbort(opcode);
|
||||
}
|
||||
|
||||
bool spvOpcodeTerminatesExecution(SpvOp opcode) {
|
||||
return opcode == SpvOpKill || opcode == SpvOpTerminateInvocation ||
|
||||
opcode == SpvOpTerminateRayKHR || opcode == SpvOpIgnoreIntersectionKHR;
|
||||
}
|
||||
|
||||
bool spvOpcodeIsBaseOpaqueType(SpvOp opcode) {
|
||||
switch (opcode) {
|
||||
case SpvOpTypeImage:
|
||||
|
||||
Reference in New Issue
Block a user