Commit dfc0f3b7 by Ben Clayton Committed by Ben Clayton

SpirvShader: Move emit() instructions to their own functions

These are only going to grow. Bug: b/126126820 Change-Id: I03a2b214e9968c31dabc4814b505c1f8c22349ae Reviewed-on: https://swiftshader-review.googlesource.com/c/25552 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent d4e4c66b
...@@ -381,6 +381,16 @@ namespace sw ...@@ -381,6 +381,16 @@ namespace sw
SIMD::Int WalkAccessChain(ObjectID id, uint32_t numIndexes, uint32_t const *indexIds, SpirvRoutine *routine) const; SIMD::Int WalkAccessChain(ObjectID id, uint32_t numIndexes, uint32_t const *indexIds, SpirvRoutine *routine) const;
uint32_t WalkLiteralAccessChain(TypeID id, uint32_t numIndexes, uint32_t const *indexes) const; uint32_t WalkLiteralAccessChain(TypeID id, uint32_t numIndexes, uint32_t const *indexes) const;
// Emit pass instructions:
void EmitVariable(InsnIterator insn, SpirvRoutine *routine) const;
void EmitLoad(InsnIterator insn, SpirvRoutine *routine) const;
void EmitStore(InsnIterator insn, SpirvRoutine *routine) const;
void EmitAccessChain(InsnIterator insn, SpirvRoutine *routine) const;
void EmitCompositeConstruct(InsnIterator insn, SpirvRoutine *routine) const;
void EmitCompositeInsert(InsnIterator insn, SpirvRoutine *routine) const;
void EmitCompositeExtract(InsnIterator insn, SpirvRoutine *routine) const;
void EmitVectorShuffle(InsnIterator insn, SpirvRoutine *routine) const;
// OpcodeName returns the name of the opcode op. // OpcodeName returns the name of the opcode op.
// If NDEBUG is defined, then OpcodeName will only return the numerical code. // If NDEBUG is defined, then OpcodeName will only return the numerical code.
static std::string OpcodeName(spv::Op op); static std::string OpcodeName(spv::Op op);
......
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