From 9c34ac27a2c0dcc68270750415f675f4320f6522 Mon Sep 17 00:00:00 2001 From: Filoppi Date: Tue, 15 Apr 2025 06:53:53 +0300 Subject: [PATCH] GS: Polish spacing and comments --- pcsx2/GS/Renderers/DX11/GSDevice11.cpp | 12 ------------ .../GS/Renderers/HW/GSTextureReplacementLoaders.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 09f1097b77..1c2ecdca7d 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -1307,7 +1307,6 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* else { ds = GSVector2i(m_window_info.surface_width, m_window_info.surface_height); - } // om @@ -1318,8 +1317,6 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* OMSetBlendState(bs, 0); - - // ia const float left = dRect.x * 2 / ds.x - 1.0f; @@ -1336,7 +1333,6 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* }; - IASetVertexBuffer(vertices, sizeof(vertices[0]), std::size(vertices)); IASetInputLayout(m_convert.il.get()); IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -1345,7 +1341,6 @@ void GSDevice11::StretchRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* VSSetShader(m_convert.vs.get(), nullptr); - // ps PSSetShaderResource(0, sTex); @@ -1382,8 +1377,6 @@ void GSDevice11::PresentRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* OMSetDepthStencilState(m_convert.dss.get(), 0); OMSetBlendState(m_convert.bs[D3D11_COLOR_WRITE_ENABLE_ALL].get(), 0); - - // ia const float left = dRect.x * 2 / ds.x - 1.0f; @@ -1399,8 +1392,6 @@ void GSDevice11::PresentRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* {GSVector4(right, bottom, 0.5f, 1.0f), GSVector2(sRect.z, sRect.w)}, }; - - IASetVertexBuffer(vertices, sizeof(vertices[0]), std::size(vertices)); IASetInputLayout(m_present.il.get()); IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); @@ -1409,7 +1400,6 @@ void GSDevice11::PresentRect(GSTexture* sTex, const GSVector4& sRect, GSTexture* VSSetShader(m_present.vs.get(), nullptr); - // ps PSSetShaderResource(0, sTex); @@ -2182,8 +2172,6 @@ void GSDevice11::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* vert // DrawPrimitive(); - - // } void* GSDevice11::IAMapVertexBuffer(u32 stride, u32 count) diff --git a/pcsx2/GS/Renderers/HW/GSTextureReplacementLoaders.cpp b/pcsx2/GS/Renderers/HW/GSTextureReplacementLoaders.cpp index e94a4e67cd..212e02326f 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureReplacementLoaders.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureReplacementLoaders.cpp @@ -465,7 +465,7 @@ static bool ParseDDSHeader(std::FILE* fp, DDSLoadInfo* info) } const GSDevice::FeatureSupport features(g_gs_device->Features()); - if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '1') || dxt10_format == 71) + if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '1') || dxt10_format == 71 /*DXGI_FORMAT_BC1_UNORM*/) { info->format = GSTexture::Format::BC1; info->block_size = 4; @@ -473,7 +473,7 @@ static bool ParseDDSHeader(std::FILE* fp, DDSLoadInfo* info) if (!features.dxt_textures) return false; } - else if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '2') || header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '3') || dxt10_format == 74) + else if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '2') || header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '3') || dxt10_format == 74 /*DXGI_FORMAT_BC2_UNORM*/) { info->format = GSTexture::Format::BC2; info->block_size = 4; @@ -481,7 +481,7 @@ static bool ParseDDSHeader(std::FILE* fp, DDSLoadInfo* info) if (!features.dxt_textures) return false; } - else if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '4') || header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '5') || dxt10_format == 77) + else if (header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '4') || header.ddspf.dwFourCC == MAKEFOURCC('D', 'X', 'T', '5') || dxt10_format == 77 /*DXGI_FORMAT_BC3_UNORM*/) { info->format = GSTexture::Format::BC3; info->block_size = 4; @@ -489,7 +489,7 @@ static bool ParseDDSHeader(std::FILE* fp, DDSLoadInfo* info) if (!features.dxt_textures) return false; } - else if (dxt10_format == 98) + else if (dxt10_format == 98 /*DXGI_FORMAT_BC7_UNORM*/) { info->format = GSTexture::Format::BC7; info->block_size = 4;