mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-25 17:05:42 +01:00
Add DemoteToHelperInvocation support
This commit is contained in:
parent
4b1ff612c4
commit
0ef6e807ab
@ -287,13 +287,16 @@ public:
|
|||||||
std::span<const Id> labels);
|
std::span<const Id> labels);
|
||||||
|
|
||||||
/// Returns with no value from a function with void return type.
|
/// Returns with no value from a function with void return type.
|
||||||
Id OpReturn();
|
void OpReturn();
|
||||||
|
|
||||||
/// Return a value from a function.
|
/// Return a value from a function.
|
||||||
Id OpReturnValue(Id value);
|
Id OpReturnValue(Id value);
|
||||||
|
|
||||||
/// Fragment-shader discard.
|
/// Fragment-shader discard.
|
||||||
Id OpKill();
|
void OpKill();
|
||||||
|
|
||||||
|
/// Demote fragment shader invocation to a helper invocation
|
||||||
|
void OpDemoteToHelperInvocationEXT();
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@ Id Module::OpSwitch(Id selector, Id default_label, std::span<const Literal> lite
|
|||||||
return *code << EndOp{};
|
return *code << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Module::OpReturn() {
|
void Module::OpReturn() {
|
||||||
code->Reserve(1);
|
code->Reserve(1);
|
||||||
return *code << spv::Op::OpReturn << EndOp{};
|
*code << spv::Op::OpReturn << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Module::OpReturnValue(Id value) {
|
Id Module::OpReturnValue(Id value) {
|
||||||
@ -72,9 +72,14 @@ Id Module::OpReturnValue(Id value) {
|
|||||||
return *code << spv::Op::OpReturnValue << value << EndOp{};
|
return *code << spv::Op::OpReturnValue << value << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
Id Module::OpKill() {
|
void Module::OpKill() {
|
||||||
code->Reserve(1);
|
code->Reserve(1);
|
||||||
return *code << spv::Op::OpKill << EndOp{};
|
*code << spv::Op::OpKill << EndOp{};
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::OpDemoteToHelperInvocationEXT() {
|
||||||
|
code->Reserve(1);
|
||||||
|
*code << spv::Op::OpDemoteToHelperInvocationEXT << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Sirit
|
} // namespace Sirit
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
|
|
||||||
#pragma optimize("", off)
|
|
||||||
|
|
||||||
namespace Sirit {
|
namespace Sirit {
|
||||||
|
|
||||||
#define DEFINE_IMAGE_OP(opcode) \
|
#define DEFINE_IMAGE_OP(opcode) \
|
||||||
|
Loading…
Reference in New Issue
Block a user