diff --git a/pcsx2/GS/GSClut.cpp b/pcsx2/GS/GSClut.cpp index 927d3b805d..988043f675 100644 --- a/pcsx2/GS/GSClut.cpp +++ b/pcsx2/GS/GSClut.cpp @@ -139,7 +139,7 @@ bool GSClut::InvalidateRange(u32 start_block, u32 end_block, bool is_draw) GIFRegTEX0 next_cbp; next_cbp.U64 = m_write.next_tex0; - if ((next_cbp.CBP + 3) >= start_block && end_block >= next_cbp.CBP) + if ((next_cbp.CBP + 3U) >= start_block && end_block >= next_cbp.CBP) { m_write.dirty |= is_draw ? 2 : 1; } diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index 35822b1a78..28bba9c10c 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -2978,7 +2978,7 @@ __forceinline void GSState::CLUTAutoFlush() if (m_mem.m_clut.IsInvalid() & 2) return; - int n = 1; + size_t n = 1; switch (PRIM->PRIM) { @@ -3002,7 +3002,7 @@ __forceinline void GSState::CLUTAutoFlush() break; } - if ((m_index.tail > 0 || (m_vertex.tail == n-1)) && (GSLocalMemory::m_psm[m_context->TEX0.PSM].pal == 0 || !PRIM->TME)) + if ((m_index.tail > 0 || (m_vertex.tail == n - 1)) && (GSLocalMemory::m_psm[m_context->TEX0.PSM].pal == 0 || !PRIM->TME)) { const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[m_context->FRAME.PSM]; @@ -3460,7 +3460,7 @@ __forceinline void GSState::VertexKick(u32 skip) GSVector4i draw_coord; const GSVector2i offset = GSVector2i(m_context->XYOFFSET.OFX, m_context->XYOFFSET.OFY); - for (int i = 0; i < n; i++) + for (size_t i = 0; i < n; i++) { const GSVertex* v = &m_vertex.buff[m_index.buff[(m_index.tail - n) + i]]; draw_coord.x = (static_cast(v->XYZ.X) - offset.x) >> 4; diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index dd329d4382..bb67c45be2 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -3937,8 +3937,6 @@ bool GSRendererHW::PossibleCLUTDraw() return false; // Max size for a CLUT/Current page size. - constexpr float clut_width = 16.0f; - constexpr float clut_height = 16.0f; constexpr float min_clut_width = 7.0f; constexpr float min_clut_height = 1.0f; const float page_width = static_cast(psm.pgs.x); @@ -4017,7 +4015,7 @@ bool GSRendererHW::PossibleCLUTDrawAggressive() if (m_vt.m_eq.z != 0x1) return false; - if (!((m_vt.m_primclass == GS_POINT_CLASS || m_vt.m_primclass == GS_LINE_CLASS) || ((m_mem.m_clut.GetCLUTCBP() >> 5) >= m_context->FRAME.FBP && (m_context->FRAME.FBP + 1) >= (m_mem.m_clut.GetCLUTCBP() >> 5) && m_vt.m_primclass == GS_SPRITE_CLASS))) + if (!((m_vt.m_primclass == GS_POINT_CLASS || m_vt.m_primclass == GS_LINE_CLASS) || ((m_mem.m_clut.GetCLUTCBP() >> 5) >= m_context->FRAME.FBP && (m_context->FRAME.FBP + 1U) >= (m_mem.m_clut.GetCLUTCBP() >> 5) && m_vt.m_primclass == GS_SPRITE_CLASS))) return false; // Avoid invalidating anything here, we just want to avoid the thing being drawn on the GPU.