From 9be4fd8b91a6d93f037c78d49cda9220310a380f Mon Sep 17 00:00:00 2001 From: GPUCode <47210458+GPUCode@users.noreply.github.com> Date: Mon, 11 Sep 2023 19:34:41 +0300 Subject: [PATCH] gl_rasterizer: Bind null surface when unit is disabled (#6967) --- src/video_core/renderer_opengl/gl_rasterizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index a06bc8606..15f3b1984 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -484,7 +484,8 @@ void RasterizerOpenGL::SyncTextureUnits(const Framebuffer* framebuffer) { // If the texture unit is disabled unbind the corresponding gl unit if (!texture.enabled) { - state.texture_units[texture_index].texture_2d = 0; + const Surface& null_surface = res_cache.GetSurface(VideoCore::NULL_SURFACE_ID); + state.texture_units[texture_index].texture_2d = null_surface.Handle(); continue; }