Skip to content

Commit

Permalink
GPU/HW: Fix draw call count spiking in some scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 15, 2025
1 parent 3687697 commit 45b500b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/gpu_hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu_hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 45b500b

Please sign in to comment.