diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-30 09:31:48 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-07-13 06:01:09 +0200 |
commit | 977d6c46f334493852c5c31ff824a871e94188a1 (patch) | |
tree | d7a9105d1bd9d93b8f0b2dc6a66c188b9e14d89a /src/video_core | |
parent | video_core: Implement RG32_SINT render target (diff) | |
download | yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar.gz yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar.bz2 yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar.lz yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar.xz yuzu-977d6c46f334493852c5c31ff824a871e94188a1.tar.zst yuzu-977d6c46f334493852c5c31ff824a871e94188a1.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/gpu.h | 1 | ||||
-rw-r--r-- | src/video_core/morton.cpp | 2 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_device.cpp | 1 | ||||
-rw-r--r-- | src/video_core/surface.cpp | 2 | ||||
-rw-r--r-- | src/video_core/surface.h | 5 |
7 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index b0a2ad21b..e3ab786e5 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -55,6 +55,7 @@ enum class RenderTargetFormat : u32 { RGBA8_UNORM = 0xD5, RGBA8_SRGB = 0xD6, RGBA8_SNORM = 0xD7, + RGBA8_SINT = 0xD8, RGBA8_UINT = 0xD9, RG16_UNORM = 0xDA, RG16_SNORM = 0xDB, diff --git a/src/video_core/morton.cpp b/src/video_core/morton.cpp index f932df53f..452e1f01e 100644 --- a/src/video_core/morton.cpp +++ b/src/video_core/morton.cpp @@ -43,6 +43,7 @@ static void MortonCopy(u32 stride, u32 block_height, u32 height, u32 block_depth static constexpr ConversionArray morton_to_linear_fns = { MortonCopy<true, PixelFormat::ABGR8U>, MortonCopy<true, PixelFormat::ABGR8S>, + MortonCopy<true, PixelFormat::ABGR8I>, MortonCopy<true, PixelFormat::ABGR8UI>, MortonCopy<true, PixelFormat::B5G6R5U>, MortonCopy<true, PixelFormat::A2B10G10R10U>, @@ -130,6 +131,7 @@ static constexpr ConversionArray morton_to_linear_fns = { static constexpr ConversionArray linear_to_morton_fns = { MortonCopy<false, PixelFormat::ABGR8U>, MortonCopy<false, PixelFormat::ABGR8S>, + MortonCopy<false, PixelFormat::ABGR8I>, MortonCopy<false, PixelFormat::ABGR8UI>, MortonCopy<false, PixelFormat::B5G6R5U>, MortonCopy<false, PixelFormat::A2B10G10R10U>, diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 1d7824324..396b85e40 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -43,6 +43,7 @@ struct FormatTuple { constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format_tuples = {{ {GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}, // ABGR8U {GL_RGBA8_SNORM, GL_RGBA, GL_BYTE}, // ABGR8S + {GL_RGBA8I, GL_RGBA_INTEGER, GL_BYTE}, // ABGR8I {GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE}, // ABGR8UI {GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV}, // B5G6R5U {GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV}, // A2B10G10R10U diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 4086d1bb6..fe3b73a99 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp @@ -119,6 +119,7 @@ struct FormatTuple { } constexpr tex_format_tuples[] = { {VK_FORMAT_A8B8G8R8_UNORM_PACK32, Attachable | Storage}, // ABGR8U {VK_FORMAT_A8B8G8R8_SNORM_PACK32, Attachable | Storage}, // ABGR8S + {VK_FORMAT_A8B8G8R8_SINT_PACK32, Attachable | Storage}, // ABGR8I {VK_FORMAT_A8B8G8R8_UINT_PACK32, Attachable | Storage}, // ABGR8UI {VK_FORMAT_B5G6R5_UNORM_PACK16}, // B5G6R5U {VK_FORMAT_A2B10G10R10_UNORM_PACK32, Attachable | Storage}, // A2B10G10R10U diff --git a/src/video_core/renderer_vulkan/vk_device.cpp b/src/video_core/renderer_vulkan/vk_device.cpp index e1128efe6..7ae4005a8 100644 --- a/src/video_core/renderer_vulkan/vk_device.cpp +++ b/src/video_core/renderer_vulkan/vk_device.cpp @@ -77,6 +77,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties( VK_FORMAT_A8B8G8R8_UNORM_PACK32, VK_FORMAT_A8B8G8R8_UINT_PACK32, VK_FORMAT_A8B8G8R8_SNORM_PACK32, + VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, VK_FORMAT_B5G6R5_UNORM_PACK16, VK_FORMAT_A2B10G10R10_UNORM_PACK32, diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 13e598972..0db995367 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp @@ -124,6 +124,8 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) return PixelFormat::RGBA8_SRGB; case Tegra::RenderTargetFormat::RGBA8_SNORM: return PixelFormat::ABGR8S; + case Tegra::RenderTargetFormat::RGBA8_SINT: + return PixelFormat::ABGR8I; case Tegra::RenderTargetFormat::RGBA8_UINT: return PixelFormat::ABGR8UI; case Tegra::RenderTargetFormat::RG16_UNORM: diff --git a/src/video_core/surface.h b/src/video_core/surface.h index 3e9dd797a..6f3162986 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h @@ -17,6 +17,7 @@ namespace VideoCore::Surface { enum class PixelFormat { ABGR8U, ABGR8S, + ABGR8I, ABGR8UI, B5G6R5U, A2B10G10R10U, @@ -136,6 +137,7 @@ enum class SurfaceTarget { constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{ 0, // ABGR8U 0, // ABGR8S + 0, // ABGR8I 0, // ABGR8UI 0, // B5G6R5U 0, // A2B10G10R10U @@ -239,6 +241,7 @@ inline constexpr u32 GetCompressionFactor(PixelFormat format) { constexpr std::array<u32, MaxPixelFormat> block_width_table = {{ 1, // ABGR8U 1, // ABGR8S + 1, // ABGR8I 1, // ABGR8UI 1, // B5G6R5U 1, // A2B10G10R10U @@ -334,6 +337,7 @@ static constexpr u32 GetDefaultBlockWidth(PixelFormat format) { constexpr std::array<u32, MaxPixelFormat> block_height_table = {{ 1, // ABGR8U 1, // ABGR8S + 1, // ABGR8I 1, // ABGR8UI 1, // B5G6R5U 1, // A2B10G10R10U @@ -429,6 +433,7 @@ static constexpr u32 GetDefaultBlockHeight(PixelFormat format) { constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ 32, // ABGR8U 32, // ABGR8S + 32, // ABGR8I 32, // ABGR8UI 16, // B5G6R5U 32, // A2B10G10R10U |