Commit 7edf5344 by Chris Forbes

Handle more instructions in spirv analysis pass

Most of these are "we know we can just ignore this instruction", but also sanity check for the lowering passes applied before this -- if any of those instructions remain, then we're very likely to do the wrong thing. Bug: b/124388146 Change-Id: I3f8f66121f57f20cc93abdbd26c575baf03d9c94 Reviewed-on: https://swiftshader-review.googlesource.com/c/24597Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
parent 31ed57da
......@@ -194,7 +194,34 @@ namespace sw
case spv::OpMemoryModel:
// Memory model does not affect our code generation until we decide to do Vulkan Memory Model support.
case spv::OpEntryPoint:
// Due to preprocessing, the entrypoint provides no value.
case spv::OpFunction:
case spv::OpFunctionEnd:
// Due to preprocessing, the entrypoint and its function provide no value.
break;
case spv::OpExtInstImport:
// We will only support the GLSL 450 extended instruction set, so no point in tracking the ID we assign it.
// Valid shaders will not attempt to import any other instruction sets.
break;
case spv::OpFunctionParameter:
case spv::OpFunctionCall:
case spv::OpSpecConstant:
case spv::OpSpecConstantComposite:
case spv::OpSpecConstantFalse:
case spv::OpSpecConstantOp:
case spv::OpSpecConstantTrue:
// These should have all been removed by preprocessing passes. If we see them here,
// our assumptions are wrong and we will probably generate wrong code.
UNIMPLEMENTED("These instructions should have already been lowered.");
break;
case spv::OpStore:
case spv::OpReturn:
// Don't need to do anything during analysis pass
break;
case spv::OpKill:
modes.ContainsKill = true;
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment