rsx: Add support for delayed shader discard.

- Noticed a glitch on AMD hw and windows drivers where discard seems to affect entire 4x4 cells.
- Dead fragments (outside the primitive boundary) could have their discards trigger as they do not have proper access to variables.
- This introduces dead fragments along triangle edges, causing a diagonal line pattern across the screen that is very annoying.
This commit is contained in:
kd-11 2019-10-14 01:24:04 +03:00 committed by kd-11
parent 901942f24a
commit 0b2f9f0f17
7 changed files with 84 additions and 49 deletions

View file

@ -1184,7 +1184,7 @@ std::string FragmentProgramDecompiler::Decompile()
case RSX_FP_OPCODE_NOP: break;
case RSX_FP_OPCODE_KIL:
properties.has_discard_op = true;
AddFlowOp("discard");
AddFlowOp("_kill()");
break;
default: