From 45b500bc2c5fb06ced4fd6a83d80fb7bfba7c25d Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 15 Jan 2025 22:50:29 +1000 Subject: [PATCH] GPU/HW: Fix draw call count spiking in some scenarios --- src/core/gpu_hw.cpp | 2 +- src/core/gpu_hw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 845a3e1af9..f61428716a 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -3684,7 +3684,7 @@ void GPU_HW::PrepareDraw(const GPUBackendDrawCommand* cmd) if (texture_mode != m_batch.texture_mode || transparency_mode != m_batch.transparency_mode || (transparency_mode == GPUTransparencyMode::BackgroundMinusForeground && !m_allow_shader_blend) || dithering_enable != m_batch.dithering || m_texture_window_bits != cmd->window || - m_batch_ubo_data.u_set_mask_while_drawing != BoolToUInt32(cmd->set_mask_while_drawing) || + m_batch.set_mask_while_drawing != cmd->set_mask_while_drawing || (texture_mode == BatchTextureMode::PageTexture && m_texture_cache_key != texture_cache_key)) { FlushRender(); diff --git a/src/core/gpu_hw.h b/src/core/gpu_hw.h index 8ce46da41d..1e998d56df 100644 --- a/src/core/gpu_hw.h +++ b/src/core/gpu_hw.h @@ -139,7 +139,7 @@ class GPU_HW final : public GPUBackend GPUTransparencyMode transparency_mode; bool dithering; bool interlacing; - bool set_mask_while_drawing; + bool set_mask_while_drawing; // NOTE: could be replaced with ubo u_set_mask_while drawing if needed bool check_mask_before_draw; bool use_depth_buffer; bool sprite_mode;