GS-HW: Remove debug message, partial Clang format GSRendererHW.cpp

This commit is contained in:
refractionpcsx2 2023-02-23 23:21:53 +00:00
parent 17f137f8be
commit c12b412e87
1 changed files with 29 additions and 31 deletions

View File

@ -173,7 +173,6 @@ void GSRendererHW::VSync(u32 field, bool registers_written)
{
iter++;
}
}
}
}
@ -484,7 +483,7 @@ void GSRendererHW::ConvertSpriteTextureShuffle(bool& write_ba, bool& read_ba)
int maxvert = 0;
int minvert = 4096;
for (u32 i = 0; i < count; i ++)
for (u32 i = 0; i < count; i++)
{
int YCord = 0;
@ -847,7 +846,7 @@ void GSRendererHW::InvalidateLocalMem(const GIFRegBITBLTBUF& BITBLTBUF, const GS
// If the format, and location doesn't match, but also the upload is at least the size of the target, don't preload.
if (iter->blit.DBP < incoming_end && GSUtil::HasSharedBits(iter->blit.DPSM, BITBLTBUF.SPSM) && ee_write_end > BITBLTBUF.SBP && iter->draw == s_n)
{
DevCon.Warning("Download from same draw as write address %x, skipping invalidation", BITBLTBUF.SBP);
//DevCon.Warning("Download from same draw as write address %x, skipping invalidation", BITBLTBUF.SBP);
return;
}
}
@ -1603,9 +1602,7 @@ void GSRendererHW::Draw()
tmm = GetTextureMinMax(TEX0, MIP_CLAMP, m_vt.IsLinear());
m_src = tex_psm.depth ? m_tc->LookupDepthSource(TEX0, env.TEXA, MIP_CLAMP, tmm.coverage) :
m_tc->LookupSource(TEX0, env.TEXA, MIP_CLAMP, tmm.coverage, (GSConfig.HWMipmap >= HWMipmapLevel::Basic ||
GSConfig.TriFilter == TriFiltering::Forced) ? &hash_lod_range : nullptr);
m_tc->LookupSource(TEX0, env.TEXA, MIP_CLAMP, tmm.coverage, (GSConfig.HWMipmap >= HWMipmapLevel::Basic || GSConfig.TriFilter == TriFiltering::Forced) ? &hash_lod_range : nullptr);
}
GSVector2i unscaled_target_size;
@ -2773,8 +2770,7 @@ void GSRendererHW::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER, bool&
// BLEND_C_CLR1 with Ad, BLEND_C_CLR3 Cs > 0.5f will require sw blend.
// BLEND_C_CLR1 with As/F, BLEND_C_CLR2_AF, BLEND_C_CLR2_AS can be done in hw.
const bool clr_blend = !!(blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS | BLEND_C_CLR3));
bool clr_blend1_2 = (blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS))
&& (m_conf.ps.blend_c != 1) // Make sure it isn't an Ad case
bool clr_blend1_2 = (blend_flag & (BLEND_C_CLR1 | BLEND_C_CLR2_AF | BLEND_C_CLR2_AS)) && (m_conf.ps.blend_c != 1) // Make sure it isn't an Ad case
&& !m_env.PABE.PABE // No PABE as it will require sw blending.
&& (m_env.COLCLAMP.CLAMP) // Let's add a colclamp check too, hw blend will clamp to 0-1.
&& !(one_barrier || m_conf.require_full_barrier); // Also don't run if there are barriers present.
@ -3251,7 +3247,7 @@ void GSRendererHW::EmulateTextureSampler(const GSTextureCache::Source* tex)
// Redundant clamp tests are restricted to local memory/1x sources only, if we're from a target,
// we keep the shader clamp. See #5851 on github, and the note in Draw().
[[maybe_unused]] static constexpr const char* clamp_modes[] = { "REPEAT", "CLAMP", "REGION_CLAMP", "REGION_REPEAT" };
[[maybe_unused]] static constexpr const char* clamp_modes[] = {"REPEAT", "CLAMP", "REGION_CLAMP", "REGION_REPEAT"};
const bool redundant_wms = !tex->m_target && IsRedundantClamp(m_context->CLAMP.WMS, m_context->CLAMP.MINU,
m_context->CLAMP.MAXU, tex->m_TEX0.TW);
const bool redundant_wmt = !tex->m_target && IsRedundantClamp(m_context->CLAMP.WMT, m_context->CLAMP.MINV,
@ -4109,7 +4105,8 @@ void GSRendererHW::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc
bool GSRendererHW::HasEEUpload(GSVector4i r)
{
std::vector<GSState::GSUploadQueue>::iterator iter;
for (iter = m_draw_transfers.begin(); iter != m_draw_transfers.end(); ) {
for (iter = m_draw_transfers.begin(); iter != m_draw_transfers.end();)
{
if (iter->draw == (s_n - 1) && iter->blit.DBP == m_context->TEX0.TBP0 && GSUtil::HasSharedBits(iter->blit.DPSM, m_context->TEX0.PSM))
{
GSVector4i rect = r;
@ -4190,9 +4187,10 @@ GSRendererHW::CLUTDrawTestResult GSRendererHW::PossibleCLUTDraw()
// Make sure it's a division of 8 in width to avoid bad draws. Points will go from 0-7 inclusive, but sprites etc will do 0-16 exclusive.
int draw_divder_match = false;
const int valid_sizes[] = { 8, 16, 32, 64 };
const int valid_sizes[] = {8, 16, 32, 64};
for (int i = 0; i < 4; i++) {
for (int i = 0; i < 4; i++)
{
draw_divder_match = ((m_vt.m_primclass == GS_POINT_CLASS) ? ((static_cast<int>(m_vt.m_max.p.x + 1) & ~1) == valid_sizes[i]) : (static_cast<int>(m_vt.m_max.p.x) == valid_sizes[i]));
if (draw_divder_match)
@ -4242,7 +4240,7 @@ GSRendererHW::CLUTDrawTestResult GSRendererHW::PossibleCLUTDraw()
}
else
{
if(HasEEUpload(r))
if (HasEEUpload(r))
return CLUTDrawTestResult::CLUTDrawOnCPU;
}