mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-12-23 01:05:38 +00:00
Add OpEmitStreamVertex and OpEndStreamPrimitive
This commit is contained in:
parent
dc47faf89f
commit
da093a04fe
|
@ -8,11 +8,11 @@
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <span>
|
#include <span>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <functional>
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
@ -422,10 +422,17 @@ public:
|
||||||
Id OpUndef(Id result_type);
|
Id OpUndef(Id result_type);
|
||||||
|
|
||||||
/// Emits the current values of all output variables to the current output primitive.
|
/// Emits the current values of all output variables to the current output primitive.
|
||||||
Id OpEmitVertex();
|
void OpEmitVertex();
|
||||||
|
|
||||||
/// Finish the current primitive and start a new one. No vertex is emitted.
|
/// Finish the current primitive and start a new one. No vertex is emitted.
|
||||||
Id OpEndPrimitive();
|
void OpEndPrimitive();
|
||||||
|
|
||||||
|
/// Emits the current values of all output variables to the current output primitive. After
|
||||||
|
/// execution, the values of all output variables are undefined.
|
||||||
|
void OpEmitStreamVertex(Id stream);
|
||||||
|
|
||||||
|
/// Finish the current primitive and start a new one. No vertex is emitted.
|
||||||
|
void OpEndStreamPrimitive(Id stream);
|
||||||
|
|
||||||
// Barrier
|
// Barrier
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,24 @@ Id Module::OpUndef(Id result_type) {
|
||||||
return *code << OpId{spv::Op::OpUndef, result_type} << EndOp{};
|
return *code << OpId{spv::Op::OpUndef, result_type} << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Module::OpEmitVertex() {
|
void Module::OpEmitVertex() {
|
||||||
code->Reserve(1);
|
code->Reserve(1);
|
||||||
return *code << OpId{spv::Op::OpEmitVertex} << EndOp{};
|
*code << spv::Op::OpEmitVertex << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Module::OpEndPrimitive() {
|
void Module::OpEndPrimitive() {
|
||||||
code->Reserve(1);
|
code->Reserve(1);
|
||||||
return *code << OpId{spv::Op::OpEndPrimitive} << EndOp{};
|
*code << spv::Op::OpEndPrimitive << EndOp{};
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::OpEmitStreamVertex(Id stream) {
|
||||||
|
code->Reserve(2);
|
||||||
|
*code << spv::Op::OpEmitStreamVertex << stream << EndOp{};
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::OpEndStreamPrimitive(Id stream) {
|
||||||
|
code->Reserve(2);
|
||||||
|
*code << spv::Op::OpEndStreamPrimitive << stream << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Sirit
|
} // namespace Sirit
|
||||||
|
|
Loading…
Reference in a new issue