diff --git a/pcsx2/GS/Renderers/Common/GSTexture.h b/pcsx2/GS/Renderers/Common/GSTexture.h index fe4a914dcc..65ac015119 100644 --- a/pcsx2/GS/Renderers/Common/GSTexture.h +++ b/pcsx2/GS/Renderers/Common/GSTexture.h @@ -46,7 +46,7 @@ public: UNorm8, ///< A8UNorm texture for paletted textures and the OSD font UInt16, ///< UInt16 texture for reading back 16-bit depth UInt32, ///< UInt32 texture for reading back 24 and 32-bit depth - Int32, ///< Int32 texture for date emulation + PrimID, ///< Prim ID tracking texture for date emulation BC1, ///< BC1, aka DXT1 compressed texture for replacements BC2, ///< BC2, aka DXT2/3 compressed texture for replacements BC3, ///< BC3, aka DXT4/5 compressed texture for replacements diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index ff45ef128c..c17ee67c85 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -451,7 +451,7 @@ GSTexture* GSDevice11::CreateSurface(GSTexture::Type type, int width, int height case GSTexture::Format::UNorm8: dxformat = DXGI_FORMAT_A8_UNORM; break; case GSTexture::Format::UInt16: dxformat = DXGI_FORMAT_R16_UINT; break; case GSTexture::Format::UInt32: dxformat = DXGI_FORMAT_R32_UINT; break; - case GSTexture::Format::Int32: dxformat = DXGI_FORMAT_R32_SINT; break; + case GSTexture::Format::PrimID: dxformat = DXGI_FORMAT_R32_SINT; break; case GSTexture::Format::BC1: dxformat = DXGI_FORMAT_BC1_UNORM; break; case GSTexture::Format::BC2: dxformat = DXGI_FORMAT_BC2_UNORM; break; case GSTexture::Format::BC3: dxformat = DXGI_FORMAT_BC3_UNORM; break; diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index 2c0546893b..011554b5fd 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -931,7 +931,7 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt, const GSVector4i& area) // Create a texture to avoid the useless clean@0 if (m_date.t == NULL) - m_date.t = CreateTexture(rtsize.x, rtsize.y, false, GSTexture::Format::Int32); + m_date.t = CreateTexture(rtsize.x, rtsize.y, false, GSTexture::Format::PrimID); // Clean with the max signed value const int max_int = 0x7FFFFFFF; diff --git a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp index cc49691d63..63a4b9ac46 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSTextureOGL.cpp @@ -189,7 +189,7 @@ GSTextureOGL::GSTextureOGL(Type type, int width, int height, int levels, Format switch (m_format) { // 1 Channel integer - case Format::Int32: + case Format::PrimID: gl_fmt = GL_R32I; m_int_format = GL_RED_INTEGER; m_int_type = GL_INT; @@ -311,7 +311,7 @@ GSTextureOGL::GSTextureOGL(Type type, int width, int height, int levels, Format case Format::Color: case Format::UInt32: - case Format::Int32: + case Format::PrimID: m_sparse &= GLLoader::found_compatible_GL_ARB_sparse_texture2; SetGpuPageSize(GSVector2i(127, 127)); break; @@ -645,7 +645,7 @@ bool GSTextureOGL::Save(const std::string& fn) fmt = GSPng::RGB_A_PNG; } - else if (m_format == Format::Int32) + else if (m_format == Format::PrimID) { // Note: 4.5 function used for accurate DATE // barely used outside of dev and not sparse anyway diff --git a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp index bffeff671a..3f74c4f326 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp @@ -283,12 +283,12 @@ bool GSDeviceVK::CheckFeatures() m_features.line_expand ? "hardware" : "geometry shaders"); // Check texture format support before we try to create them. - for (u32 fmt = static_cast(GSTexture::Format::Color); fmt < static_cast(GSTexture::Format::Int32); fmt++) + for (u32 fmt = static_cast(GSTexture::Format::Color); fmt < static_cast(GSTexture::Format::PrimID); fmt++) { const VkFormat vkfmt = LookupNativeFormat(static_cast(fmt)); const VkFormatFeatureFlags bits = (static_cast(fmt) == GSTexture::Format::DepthStencil) ? - (VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) : - (VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT); + (VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) : + (VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT | VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT); VkFormatProperties props = {}; vkGetPhysicalDeviceFormatProperties(g_vulkan_context->GetPhysicalDevice(), vkfmt, &props); @@ -1492,11 +1492,10 @@ bool GSDeviceVK::CompileConvertPipelines() for (u32 clear = 0; clear < 2; clear++) { m_date_image_setup_render_passes[ds][clear] = - g_vulkan_context->GetRenderPass(LookupNativeFormat(GSTexture::Format::Int32), + g_vulkan_context->GetRenderPass(LookupNativeFormat(GSTexture::Format::PrimID), ds ? LookupNativeFormat(GSTexture::Format::DepthStencil) : VK_FORMAT_UNDEFINED, VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_STORE, - ds ? (clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD) : - VK_ATTACHMENT_LOAD_OP_DONT_CARE, + ds ? (clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD) : VK_ATTACHMENT_LOAD_OP_DONT_CARE, ds ? VK_ATTACHMENT_STORE_OP_STORE : VK_ATTACHMENT_STORE_OP_DONT_CARE); } } @@ -2732,7 +2731,7 @@ GSTextureVK* GSDeviceVK::SetupPrimitiveTrackingDATE(GSHWDrawConfig& config, Pipe const GSVector2i rtsize(config.rt->GetSize()); GSTextureVK* image = - static_cast(CreateRenderTarget(rtsize.x, rtsize.y, GSTexture::Format::Int32, false)); + static_cast(CreateRenderTarget(rtsize.x, rtsize.y, GSTexture::Format::PrimID, false)); if (!image) return nullptr;