From 2670b951e13eab51e47e45263cd3ac4e44fa1ff5 Mon Sep 17 00:00:00 2001 From: trimental Date: Sat, 8 Jan 2022 01:36:01 +0800 Subject: [PATCH] Fix software renderer for empty texture addresses (#5893) --- src/video_core/swrasterizer/rasterizer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video_core/swrasterizer/rasterizer.cpp b/src/video_core/swrasterizer/rasterizer.cpp index 4cd8bbc91..c52523924 100644 --- a/src/video_core/swrasterizer/rasterizer.cpp +++ b/src/video_core/swrasterizer/rasterizer.cpp @@ -323,7 +323,10 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve if (!texture.enabled) continue; - DEBUG_ASSERT(0 != texture.config.address); + if (texture.config.address == 0) { + texture_color[i] = {0, 0, 0, 255}; + continue; + } int coordinate_i = (i == 2 && regs.texturing.main_config.texture2_use_coord1) ? 1 : i;