mirror of https://github.com/PCSX2/pcsx2.git
GS: Cleanup variable declarations/initalizations.
GSDevice11, 12, ogl, GSRendererHW.
This commit is contained in:
parent
7d8912f170
commit
73c9279907
|
@ -1297,7 +1297,7 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
|
|||
IAUnmapVertexBuffer();
|
||||
}
|
||||
IASetIndexBuffer(config.indices, config.nindices);
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology;
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology = D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED;
|
||||
switch (config.topology)
|
||||
{
|
||||
case GSHWDrawConfig::Topology::Point: topology = D3D11_PRIMITIVE_TOPOLOGY_POINTLIST; break;
|
||||
|
|
|
@ -342,7 +342,7 @@ bool GSDevice12::DownloadTexture(GSTexture* src, const GSVector4i& rect, GSTextu
|
|||
const u32 height = rect.height();
|
||||
const u32 pitch = Common::AlignUpPow2(width * D3D12::GetTexelSize(static_cast<GSTexture12*>(src)->GetNativeFormat()), D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
|
||||
const u32 size = pitch * height;
|
||||
const u32 level = 0;
|
||||
constexpr u32 level = 0;
|
||||
if (!CheckStagingBufferSize(size))
|
||||
{
|
||||
Console.Error("Can't read back %ux%u", width, height);
|
||||
|
|
|
@ -55,7 +55,7 @@ void GSRendererHW::SetScaling()
|
|||
if (!GSConfig.PCRTCOffsets)
|
||||
{
|
||||
const int videomode = static_cast<int>(GetVideoMode()) - 1;
|
||||
int display_width = (VideoModeDividers[videomode].z + 1) / GetDisplayHMagnification();
|
||||
const int display_width = (VideoModeDividers[videomode].z + 1) / GetDisplayHMagnification();
|
||||
int display_height = VideoModeOffsets[videomode].y;
|
||||
|
||||
if (isinterlaced() && !m_regs->SMODE2.FFMD)
|
||||
|
@ -268,8 +268,8 @@ GSTexture* GSRendererHW::GetOutput(int i, int& y_offset)
|
|||
TEX0.PSM = DISPFB.PSM;
|
||||
|
||||
const int videomode = static_cast<int>(GetVideoMode()) - 1;
|
||||
int display_height = VideoModeOffsets[videomode].y * ((isinterlaced() && !m_regs->SMODE2.FFMD) ? 2 : 1);
|
||||
int fb_height = std::min(GetFramebufferHeight(), display_height) + DISPFB.DBY;
|
||||
const int display_height = VideoModeOffsets[videomode].y * ((isinterlaced() && !m_regs->SMODE2.FFMD) ? 2 : 1);
|
||||
const int fb_height = std::min(GetFramebufferHeight(), display_height) + DISPFB.DBY;
|
||||
// TRACE(_T("[%d] GetOutput %d %05x (%d)\n"), (int)m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM);
|
||||
|
||||
GSTexture* t = NULL;
|
||||
|
@ -361,10 +361,10 @@ void GSRendererHW::Lines2Sprites()
|
|||
|
||||
if (PRIM->TME && !PRIM->FST)
|
||||
{
|
||||
GSVector4 st0 = GSVector4::loadl(&v0.ST.U64);
|
||||
GSVector4 st1 = GSVector4::loadl(&v1.ST.U64);
|
||||
GSVector4 Q = GSVector4(v1.RGBAQ.Q, v1.RGBAQ.Q, v1.RGBAQ.Q, v1.RGBAQ.Q);
|
||||
GSVector4 st = st0.upld(st1) / Q;
|
||||
const GSVector4 st0 = GSVector4::loadl(&v0.ST.U64);
|
||||
const GSVector4 st1 = GSVector4::loadl(&v1.ST.U64);
|
||||
const GSVector4 Q = GSVector4(v1.RGBAQ.Q, v1.RGBAQ.Q, v1.RGBAQ.Q, v1.RGBAQ.Q);
|
||||
const GSVector4 st = st0.upld(st1) / Q;
|
||||
|
||||
GSVector4::storel(&v0.ST.U64, st);
|
||||
GSVector4::storeh(&v1.ST.U64, st);
|
||||
|
@ -801,10 +801,10 @@ void GSRendererHW::InvalidateLocalMem(const GIFRegBITBLTBUF& BITBLTBUF, const GS
|
|||
|
||||
void GSRendererHW::Move()
|
||||
{
|
||||
int sx = m_env.TRXPOS.SSAX;
|
||||
int sy = m_env.TRXPOS.SSAY;
|
||||
int dx = m_env.TRXPOS.DSAX;
|
||||
int dy = m_env.TRXPOS.DSAY;
|
||||
const int sx = m_env.TRXPOS.SSAX;
|
||||
const int sy = m_env.TRXPOS.SSAY;
|
||||
const int dx = m_env.TRXPOS.DSAX;
|
||||
const int dy = m_env.TRXPOS.DSAY;
|
||||
|
||||
const int w = m_env.TRXREG.RRW;
|
||||
const int h = m_env.TRXREG.RRH;
|
||||
|
@ -896,9 +896,9 @@ void GSRendererHW::SwSpriteRender()
|
|||
|
||||
// SW rendering code, mainly taken from GSState::Move(), TRXPOS.DIR{X,Y} management excluded
|
||||
|
||||
int sx = trxpos.SSAX;
|
||||
const int sx = trxpos.SSAX;
|
||||
int sy = trxpos.SSAY;
|
||||
int dx = trxpos.DSAX;
|
||||
const int dx = trxpos.DSAX;
|
||||
int dy = trxpos.DSAY;
|
||||
const int w = trxreg.RRW;
|
||||
const int h = trxreg.RRH;
|
||||
|
@ -1421,8 +1421,8 @@ void GSRendererHW::Draw()
|
|||
m_tc->LookupSource(TEX0, env.TEXA, tmm.coverage, (GSConfig.HWMipmap >= HWMipmapLevel::Basic ||
|
||||
GSConfig.UserHacks_TriFilter == TriFiltering::Forced) ? &hash_lod_range : nullptr);
|
||||
|
||||
int tw = 1 << TEX0.TW;
|
||||
int th = 1 << TEX0.TH;
|
||||
const int tw = 1 << TEX0.TW;
|
||||
const int th = 1 << TEX0.TH;
|
||||
// Texture clamp optimizations (try to move everything to sampler hardware)
|
||||
if (m_context->CLAMP.WMS == CLAMP_REGION_CLAMP && MIP_CLAMP.MINU == 0 && MIP_CLAMP.MAXU == tw - 1)
|
||||
m_context->CLAMP.WMS = CLAMP_CLAMP;
|
||||
|
@ -3136,8 +3136,8 @@ void GSRendererHW::ResetStates()
|
|||
void GSRendererHW::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* tex)
|
||||
{
|
||||
#ifdef ENABLE_OGL_DEBUG
|
||||
GSVector4i area_out = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
||||
GSVector4i area_in = GSVector4i(m_vt.m_min.t.xyxy(m_vt.m_max.t));
|
||||
const GSVector4i area_out = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
||||
const GSVector4i area_in = GSVector4i(m_vt.m_min.t.xyxy(m_vt.m_max.t));
|
||||
|
||||
GL_PUSH("GL Draw from %d (area %d,%d => %d,%d) in %d (Depth %d) (area %d,%d => %d,%d)",
|
||||
tex && tex->m_texture ? tex->m_texture->GetID() : -1,
|
||||
|
|
|
@ -120,7 +120,7 @@ void GSDeviceOGL::GenerateProfilerData()
|
|||
GLuint64 time_start = 0;
|
||||
GLuint64 time_end = 0;
|
||||
std::vector<double> times;
|
||||
const double ms = 0.000001;
|
||||
constexpr double ms = 0.000001;
|
||||
|
||||
const int replay = theApp.GetConfigI("linux_replay");
|
||||
const int first_query = replay > 1 ? m_profiler.last_query / replay : 0;
|
||||
|
@ -380,7 +380,7 @@ bool GSDeviceOGL::Create(HostDisplay* display)
|
|||
m_convert.ps[i].RegisterUniform("EMOD");
|
||||
}
|
||||
|
||||
PSSamplerSelector point;
|
||||
const PSSamplerSelector point;
|
||||
m_convert.pt = GetSamplerID(point);
|
||||
|
||||
PSSamplerSelector bilinear;
|
||||
|
|
Loading…
Reference in New Issue