From 457d8bba09f9d2592cbda7038d0c36439a31df18 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 8 Sep 2025 16:23:07 -0400 Subject: [PATCH] Fix gl_pipeline_depth cvar max 2 is a valid value, but it was overwriting when >= 2. I was able to test that 2+ works, even without any code changes, by using `+gl_pipeline_depth 2` on command line. Some weird order of operations doesn't change the value back before the renderer checks its value. (Which, tbh, is kind of scary? But I don't have to spoons to investigate right now, or if it matters for anything else.) --- src/common/rendering/v_video.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/rendering/v_video.cpp b/src/common/rendering/v_video.cpp index c19cbcdff..c53bbf187 100644 --- a/src/common/rendering/v_video.cpp +++ b/src/common/rendering/v_video.cpp @@ -77,7 +77,15 @@ CVAR(Bool, r_skipmats, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL // 0 means 'no pipelining' for non GLES2 and 4 elements for GLES2 CUSTOM_CVAR(Int, gl_pipeline_depth, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { - if (self < 0 || self >= HW_MAX_PIPELINE_BUFFERS) self = 0; + if (self < 0) + { + self = 0; + } + else if (self > HW_MAX_PIPELINE_BUFFERS) + { + self = HW_MAX_PIPELINE_BUFFERS; + } + Printf("Changing the pipeline depth requires a restart for " GAMENAME ".\n"); }