prevents sampling if it's a depth texture that is bound

This commit is contained in:
Bigfoot71 2026-03-18 22:38:49 +01:00
parent 073b94ffc3
commit 57d4ff4b65

1
src/external/rlsw.h vendored
View File

@ -3800,6 +3800,7 @@ static void sw_immediate_begin(SWdraw mode)
uint32_t state = RLSW.userState; uint32_t state = RLSW.userState;
if (!sw_is_texture_complete(RLSW.depthBuffer)) state &= ~SW_STATE_DEPTH_TEST; if (!sw_is_texture_complete(RLSW.depthBuffer)) state &= ~SW_STATE_DEPTH_TEST;
if (!sw_is_texture_complete(RLSW.boundTexture)) state &= ~SW_STATE_TEXTURE_2D; 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 // Initialize required values
RLSW.primitive.hasColorAlpha = false; RLSW.primitive.hasColorAlpha = false;