GS/HW: Use correct vertex colour on target clear

This commit is contained in:
JordanTheToaster authored and lightningterror committed 2025-04-26 23:22:53 +02:00
1 parent d915a0b945
commit 90af9b2f01
1 file changed
+2 -1
+2 -1
View File
@@ -8642,7 +8642,8 @@ ClearType GSRendererHW::IsConstantDirectWriteMemClear()
u32 GSRendererHW::GetConstantDirectWriteMemClearColor() const
{
// Take the vertex colour, but check if the blending would make it black.
u32 vert_color = m_vertex.buff[1].RGBAQ.U32[0];
const u32 vert_index = (m_vt.m_primclass == GS_TRIANGLE_CLASS) ? 2 : 1;
u32 vert_color = m_vertex.buff[m_index.buff[vert_index]].RGBAQ.U32[0];
if (PRIM->ABE && m_context->ALPHA.IsBlack())
vert_color &= 0xFF000000u;