mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 09:54:54 +00:00
recompiler: added support for discard on export with masked EXEC
This commit is contained in:
parent
1b94f07a6a
commit
f041276b04
12 changed files with 47 additions and 5 deletions
|
@ -45,6 +45,7 @@ void EmitSetVccHi(EmitContext& ctx);
|
|||
void EmitPrologue(EmitContext& ctx);
|
||||
void EmitEpilogue(EmitContext& ctx);
|
||||
void EmitDiscard(EmitContext& ctx);
|
||||
void EmitDiscardCond(EmitContext& ctx, Id condition);
|
||||
void EmitBarrier(EmitContext& ctx);
|
||||
void EmitWorkgroupMemoryBarrier(EmitContext& ctx);
|
||||
void EmitDeviceMemoryBarrier(EmitContext& ctx);
|
||||
|
|
|
@ -14,6 +14,17 @@ void EmitDiscard(EmitContext& ctx) {
|
|||
ctx.OpDemoteToHelperInvocationEXT();
|
||||
}
|
||||
|
||||
void EmitDiscardCond(EmitContext& ctx, Id condition) {
|
||||
const Id kill_label{ctx.OpLabel()};
|
||||
const Id merge_label{ctx.OpLabel()};
|
||||
ctx.OpSelectionMerge(merge_label, spv::SelectionControlMask::MaskNone);
|
||||
ctx.OpBranchConditional(condition, kill_label, merge_label);
|
||||
ctx.AddLabel(kill_label);
|
||||
ctx.OpDemoteToHelperInvocationEXT();
|
||||
ctx.OpBranch(merge_label);
|
||||
ctx.AddLabel(merge_label);
|
||||
}
|
||||
|
||||
void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
|
||||
throw NotImplementedException("Geometry streams");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue