shader: Implement OUT
This commit is contained in:
parent
dd3432d357
commit
a6cef71cc0
10 changed files with 73 additions and 17 deletions
|
@ -125,6 +125,14 @@ void IREmitter::Epilogue() {
|
|||
Inst(Opcode::Epilogue);
|
||||
}
|
||||
|
||||
void IREmitter::EmitVertex(const U32& stream) {
|
||||
Inst(Opcode::EmitVertex, stream);
|
||||
}
|
||||
|
||||
void IREmitter::EndPrimitive(const U32& stream) {
|
||||
Inst(Opcode::EndPrimitive, stream);
|
||||
}
|
||||
|
||||
U32 IREmitter::GetReg(IR::Reg reg) {
|
||||
return Inst<U32>(Opcode::GetRegister, reg);
|
||||
}
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
void Prologue();
|
||||
void Epilogue();
|
||||
|
||||
void EmitVertex(const U32& stream);
|
||||
void EndPrimitive(const U32& stream);
|
||||
|
||||
[[nodiscard]] U32 GetReg(IR::Reg reg);
|
||||
void SetReg(IR::Reg reg, const U32& value);
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ bool Inst::MayHaveSideEffects() const noexcept {
|
|||
case Opcode::MemoryBarrierSystemLevel:
|
||||
case Opcode::Prologue:
|
||||
case Opcode::Epilogue:
|
||||
case Opcode::EmitVertex:
|
||||
case Opcode::EndPrimitive:
|
||||
case Opcode::SetAttribute:
|
||||
case Opcode::SetAttributeIndexed:
|
||||
case Opcode::SetFragColor:
|
||||
|
|
|
@ -25,6 +25,8 @@ OPCODE(MemoryBarrierSystemLevel, Void,
|
|||
// Special operations
|
||||
OPCODE(Prologue, Void, )
|
||||
OPCODE(Epilogue, Void, )
|
||||
OPCODE(EmitVertex, Void, U32, )
|
||||
OPCODE(EndPrimitive, Void, U32, )
|
||||
|
||||
// Context getters/setters
|
||||
OPCODE(GetRegister, U32, Reg, )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue