Give fragment shaders that set NVN control byte 0x718 early fragment tests, as MacNativeGames ae8f4f4 does: the request carries early_fragment_tests and the translator passes it to Ryujinx as EarlyZForce

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-26 14:45:03 +03:00
1 parent 679c6771df
commit be759ca618
2 files changed
+8 -1

No files matched your search

+4
View File
@@ -874,6 +874,10 @@ static size_t build_request(char *o0, const char *hex, const char *stage, const
else memcpy(l, control + 0x748, 12);
o += sprintf(o, ",\"local\":[%u,%u,%u]", l[0], l[1], l[2]);
}
/* Control byte +0x718 of a fragment shader: early fragment tests (the NVN driver's early-Z-force, MacNativeGames
ae8f4f4). Without it a shader that stores to memory is depth-tested late, and the G-buffer draws' EQUAL test
after the depth prepass fails along contour lines. Already part of the code hash (the whole control section). */
if (!strcmp(stage, "ps") && (control[0x718] & 1)) o += sprintf(o, ",\"early_fragment_tests\":true");
int si = !strcmp(stage, "vs") ? 0 : !strcmp(stage, "cs") ? 2 : 1; // gfx_shader_set_host answers
if (!host_f64) o += sprintf(o, ",\"softfloat64\":true");
if (host_sbuf) o += sprintf(o, ",\"sbuf_align\":%u", host_sbuf);