mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
Turn the ANV vertex-shader storage barrier off by default on every GPU; players opt in with anv_vs_barrier = 1 (#927)
The barrier costs about 5% of the frame rate on an Iris Xe and was only tested there. TOTK_ANV_VS_BARRIER and anv_vs_barrier still force it on with 1 and off with 0. docs/settings.md says what it fixes, what it costs and that only Intel GPUs with Mesa ANV on Linux are affected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3026d91e31
commit
d98996b6e2
2 files changed
+4
-3
No files matched your search
@@ -3332,12 +3332,13 @@ static void bi_done(VkExec *ex, const VkPipeInfo *info, const VkPipeState *s, co
|
||||
// the sampler cache is invalidated first: the half-resolution particle pass drew campfire smoke and clouds as white or
|
||||
// dark blobs and turned the sky white for single frames (#927). A by-region barrier before such a draw removes it
|
||||
// (0 of 1460 frames broken against 57 of 779, about 2 fps of 40 on an Iris Xe); a stall alone or the attachment flush
|
||||
// alone does not. TOTK_ANV_VS_BARRIER=0/1 forces it off or on.
|
||||
// alone does not. The barrier costs about 5% of the frame rate on an Iris Xe and was only tested there, so it is off
|
||||
// on every GPU by default; TOTK_ANV_VS_BARRIER=1 (ini: anv_vs_barrier = 1) turns it on, 0 keeps it off.
|
||||
static int anv_vs_barrier(void) {
|
||||
static int on = -1;
|
||||
if (on < 0) {
|
||||
const char *e = cfg_get("TOTK_ANV_VS_BARRIER");
|
||||
on = e && *e ? strcmp(e, "0") != 0 : vk_caps.mesa && vk_ctx()->props.vendorID == 0x8086;
|
||||
on = e && *e && strcmp(e, "0") != 0;
|
||||
rt_log("vk_exec: barrier before vertex-stage storage reads in a pass %s", on ? "on" : "off");
|
||||
}
|
||||
return on;
|
||||
|
||||
Reference in new issue
Block a user