mirror of https://github.com/PCSX2/pcsx2.git
parent
cfe2f9e6b4
commit
8e60d2c72e
|
@ -46,7 +46,7 @@ public:
|
||||||
UNorm8, ///< A8UNorm texture for paletted textures and the OSD font
|
UNorm8, ///< A8UNorm texture for paletted textures and the OSD font
|
||||||
UInt16, ///< UInt16 texture for reading back 16-bit depth
|
UInt16, ///< UInt16 texture for reading back 16-bit depth
|
||||||
UInt32, ///< UInt32 texture for reading back 24 and 32-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
|
BC1, ///< BC1, aka DXT1 compressed texture for replacements
|
||||||
BC2, ///< BC2, aka DXT2/3 compressed texture for replacements
|
BC2, ///< BC2, aka DXT2/3 compressed texture for replacements
|
||||||
BC3, ///< BC3, aka DXT4/5 compressed texture for replacements
|
BC3, ///< BC3, aka DXT4/5 compressed texture for replacements
|
||||||
|
|
|
@ -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::UNorm8: dxformat = DXGI_FORMAT_A8_UNORM; break;
|
||||||
case GSTexture::Format::UInt16: dxformat = DXGI_FORMAT_R16_UINT; break;
|
case GSTexture::Format::UInt16: dxformat = DXGI_FORMAT_R16_UINT; break;
|
||||||
case GSTexture::Format::UInt32: dxformat = DXGI_FORMAT_R32_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::BC1: dxformat = DXGI_FORMAT_BC1_UNORM; break;
|
||||||
case GSTexture::Format::BC2: dxformat = DXGI_FORMAT_BC2_UNORM; break;
|
case GSTexture::Format::BC2: dxformat = DXGI_FORMAT_BC2_UNORM; break;
|
||||||
case GSTexture::Format::BC3: dxformat = DXGI_FORMAT_BC3_UNORM; break;
|
case GSTexture::Format::BC3: dxformat = DXGI_FORMAT_BC3_UNORM; break;
|
||||||
|
|
|
@ -931,7 +931,7 @@ void GSDeviceOGL::InitPrimDateTexture(GSTexture* rt, const GSVector4i& area)
|
||||||
|
|
||||||
// Create a texture to avoid the useless clean@0
|
// Create a texture to avoid the useless clean@0
|
||||||
if (m_date.t == NULL)
|
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
|
// Clean with the max signed value
|
||||||
const int max_int = 0x7FFFFFFF;
|
const int max_int = 0x7FFFFFFF;
|
||||||
|
|
|
@ -189,7 +189,7 @@ GSTextureOGL::GSTextureOGL(Type type, int width, int height, int levels, Format
|
||||||
switch (m_format)
|
switch (m_format)
|
||||||
{
|
{
|
||||||
// 1 Channel integer
|
// 1 Channel integer
|
||||||
case Format::Int32:
|
case Format::PrimID:
|
||||||
gl_fmt = GL_R32I;
|
gl_fmt = GL_R32I;
|
||||||
m_int_format = GL_RED_INTEGER;
|
m_int_format = GL_RED_INTEGER;
|
||||||
m_int_type = GL_INT;
|
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::Color:
|
||||||
case Format::UInt32:
|
case Format::UInt32:
|
||||||
case Format::Int32:
|
case Format::PrimID:
|
||||||
m_sparse &= GLLoader::found_compatible_GL_ARB_sparse_texture2;
|
m_sparse &= GLLoader::found_compatible_GL_ARB_sparse_texture2;
|
||||||
SetGpuPageSize(GSVector2i(127, 127));
|
SetGpuPageSize(GSVector2i(127, 127));
|
||||||
break;
|
break;
|
||||||
|
@ -645,7 +645,7 @@ bool GSTextureOGL::Save(const std::string& fn)
|
||||||
|
|
||||||
fmt = GSPng::RGB_A_PNG;
|
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
|
// Note: 4.5 function used for accurate DATE
|
||||||
// barely used outside of dev and not sparse anyway
|
// barely used outside of dev and not sparse anyway
|
||||||
|
|
|
@ -283,7 +283,7 @@ bool GSDeviceVK::CheckFeatures()
|
||||||
m_features.line_expand ? "hardware" : "geometry shaders");
|
m_features.line_expand ? "hardware" : "geometry shaders");
|
||||||
|
|
||||||
// Check texture format support before we try to create them.
|
// Check texture format support before we try to create them.
|
||||||
for (u32 fmt = static_cast<u32>(GSTexture::Format::Color); fmt < static_cast<u32>(GSTexture::Format::Int32); fmt++)
|
for (u32 fmt = static_cast<u32>(GSTexture::Format::Color); fmt < static_cast<u32>(GSTexture::Format::PrimID); fmt++)
|
||||||
{
|
{
|
||||||
const VkFormat vkfmt = LookupNativeFormat(static_cast<GSTexture::Format>(fmt));
|
const VkFormat vkfmt = LookupNativeFormat(static_cast<GSTexture::Format>(fmt));
|
||||||
const VkFormatFeatureFlags bits = (static_cast<GSTexture::Format>(fmt) == GSTexture::Format::DepthStencil) ?
|
const VkFormatFeatureFlags bits = (static_cast<GSTexture::Format>(fmt) == GSTexture::Format::DepthStencil) ?
|
||||||
|
@ -1492,11 +1492,10 @@ bool GSDeviceVK::CompileConvertPipelines()
|
||||||
for (u32 clear = 0; clear < 2; clear++)
|
for (u32 clear = 0; clear < 2; clear++)
|
||||||
{
|
{
|
||||||
m_date_image_setup_render_passes[ds][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,
|
ds ? LookupNativeFormat(GSTexture::Format::DepthStencil) : VK_FORMAT_UNDEFINED,
|
||||||
VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_STORE,
|
VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_STORE_OP_STORE,
|
||||||
ds ? (clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD) :
|
ds ? (clear ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_LOAD) : VK_ATTACHMENT_LOAD_OP_DONT_CARE,
|
||||||
VK_ATTACHMENT_LOAD_OP_DONT_CARE,
|
|
||||||
ds ? VK_ATTACHMENT_STORE_OP_STORE : VK_ATTACHMENT_STORE_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());
|
const GSVector2i rtsize(config.rt->GetSize());
|
||||||
GSTextureVK* image =
|
GSTextureVK* image =
|
||||||
static_cast<GSTextureVK*>(CreateRenderTarget(rtsize.x, rtsize.y, GSTexture::Format::Int32, false));
|
static_cast<GSTextureVK*>(CreateRenderTarget(rtsize.x, rtsize.y, GSTexture::Format::PrimID, false));
|
||||||
if (!image)
|
if (!image)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue