From 57d4ff4b6538fc0ed47465be0840419e45bc5109 Mon Sep 17 00:00:00 2001 From: Bigfoot71 Date: Wed, 18 Mar 2026 22:38:49 +0100 Subject: [PATCH] prevents sampling if it's a depth texture that is bound --- src/external/rlsw.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/external/rlsw.h b/src/external/rlsw.h index 6e3a8c46a..8c7c2fbf8 100644 --- a/src/external/rlsw.h +++ b/src/external/rlsw.h @@ -3800,6 +3800,7 @@ static void sw_immediate_begin(SWdraw mode) uint32_t state = RLSW.userState; if (!sw_is_texture_complete(RLSW.depthBuffer)) state &= ~SW_STATE_DEPTH_TEST; if (!sw_is_texture_complete(RLSW.boundTexture)) state &= ~SW_STATE_TEXTURE_2D; + else if (sw_pixel_is_depth_format(RLSW.boundTexture->format)) state &= ~SW_STATE_TEXTURE_2D; // Initialize required values RLSW.primitive.hasColorAlpha = false;