diff options
| -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 { | |||
| 55 | RGBA8_UNORM = 0xD5, | 55 | RGBA8_UNORM = 0xD5, |
| 56 | RGBA8_SRGB = 0xD6, | 56 | RGBA8_SRGB = 0xD6, |
| 57 | RGBA8_SNORM = 0xD7, | 57 | RGBA8_SNORM = 0xD7, |
| 58 | RGBA8_SINT = 0xD8, | ||
| 58 | RGBA8_UINT = 0xD9, | 59 | RGBA8_UINT = 0xD9, |
| 59 | RG16_UNORM = 0xDA, | 60 | RG16_UNORM = 0xDA, |
| 60 | RG16_SNORM = 0xDB, | 61 | 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 | |||
| 43 | static constexpr ConversionArray morton_to_linear_fns = { | 43 | static constexpr ConversionArray morton_to_linear_fns = { |
| 44 | MortonCopy<true, PixelFormat::ABGR8U>, | 44 | MortonCopy<true, PixelFormat::ABGR8U>, |
| 45 | MortonCopy<true, PixelFormat::ABGR8S>, | 45 | MortonCopy<true, PixelFormat::ABGR8S>, |
| 46 | MortonCopy<true, PixelFormat::ABGR8I>, | ||
| 46 | MortonCopy<true, PixelFormat::ABGR8UI>, | 47 | MortonCopy<true, PixelFormat::ABGR8UI>, |
| 47 | MortonCopy<true, PixelFormat::B5G6R5U>, | 48 | MortonCopy<true, PixelFormat::B5G6R5U>, |
| 48 | MortonCopy<true, PixelFormat::A2B10G10R10U>, | 49 | MortonCopy<true, PixelFormat::A2B10G10R10U>, |
| @@ -130,6 +131,7 @@ static constexpr ConversionArray morton_to_linear_fns = { | |||
| 130 | static constexpr ConversionArray linear_to_morton_fns = { | 131 | static constexpr ConversionArray linear_to_morton_fns = { |
| 131 | MortonCopy<false, PixelFormat::ABGR8U>, | 132 | MortonCopy<false, PixelFormat::ABGR8U>, |
| 132 | MortonCopy<false, PixelFormat::ABGR8S>, | 133 | MortonCopy<false, PixelFormat::ABGR8S>, |
| 134 | MortonCopy<false, PixelFormat::ABGR8I>, | ||
| 133 | MortonCopy<false, PixelFormat::ABGR8UI>, | 135 | MortonCopy<false, PixelFormat::ABGR8UI>, |
| 134 | MortonCopy<false, PixelFormat::B5G6R5U>, | 136 | MortonCopy<false, PixelFormat::B5G6R5U>, |
| 135 | MortonCopy<false, PixelFormat::A2B10G10R10U>, | 137 | 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 { | |||
| 43 | constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format_tuples = {{ | 43 | constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format_tuples = {{ |
| 44 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}, // ABGR8U | 44 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV}, // ABGR8U |
| 45 | {GL_RGBA8_SNORM, GL_RGBA, GL_BYTE}, // ABGR8S | 45 | {GL_RGBA8_SNORM, GL_RGBA, GL_BYTE}, // ABGR8S |
| 46 | {GL_RGBA8I, GL_RGBA_INTEGER, GL_BYTE}, // ABGR8I | ||
| 46 | {GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE}, // ABGR8UI | 47 | {GL_RGBA8UI, GL_RGBA_INTEGER, GL_UNSIGNED_BYTE}, // ABGR8UI |
| 47 | {GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV}, // B5G6R5U | 48 | {GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV}, // B5G6R5U |
| 48 | {GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV}, // A2B10G10R10U | 49 | {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 { | |||
| 119 | } constexpr tex_format_tuples[] = { | 119 | } constexpr tex_format_tuples[] = { |
| 120 | {VK_FORMAT_A8B8G8R8_UNORM_PACK32, Attachable | Storage}, // ABGR8U | 120 | {VK_FORMAT_A8B8G8R8_UNORM_PACK32, Attachable | Storage}, // ABGR8U |
| 121 | {VK_FORMAT_A8B8G8R8_SNORM_PACK32, Attachable | Storage}, // ABGR8S | 121 | {VK_FORMAT_A8B8G8R8_SNORM_PACK32, Attachable | Storage}, // ABGR8S |
| 122 | {VK_FORMAT_A8B8G8R8_SINT_PACK32, Attachable | Storage}, // ABGR8I | ||
| 122 | {VK_FORMAT_A8B8G8R8_UINT_PACK32, Attachable | Storage}, // ABGR8UI | 123 | {VK_FORMAT_A8B8G8R8_UINT_PACK32, Attachable | Storage}, // ABGR8UI |
| 123 | {VK_FORMAT_B5G6R5_UNORM_PACK16}, // B5G6R5U | 124 | {VK_FORMAT_B5G6R5_UNORM_PACK16}, // B5G6R5U |
| 124 | {VK_FORMAT_A2B10G10R10_UNORM_PACK32, Attachable | Storage}, // A2B10G10R10U | 125 | {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( | |||
| 77 | VK_FORMAT_A8B8G8R8_UNORM_PACK32, | 77 | VK_FORMAT_A8B8G8R8_UNORM_PACK32, |
| 78 | VK_FORMAT_A8B8G8R8_UINT_PACK32, | 78 | VK_FORMAT_A8B8G8R8_UINT_PACK32, |
| 79 | VK_FORMAT_A8B8G8R8_SNORM_PACK32, | 79 | VK_FORMAT_A8B8G8R8_SNORM_PACK32, |
| 80 | VK_FORMAT_A8B8G8R8_SINT_PACK32, | ||
| 80 | VK_FORMAT_A8B8G8R8_SRGB_PACK32, | 81 | VK_FORMAT_A8B8G8R8_SRGB_PACK32, |
| 81 | VK_FORMAT_B5G6R5_UNORM_PACK16, | 82 | VK_FORMAT_B5G6R5_UNORM_PACK16, |
| 82 | VK_FORMAT_A2B10G10R10_UNORM_PACK32, | 83 | 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) | |||
| 124 | return PixelFormat::RGBA8_SRGB; | 124 | return PixelFormat::RGBA8_SRGB; |
| 125 | case Tegra::RenderTargetFormat::RGBA8_SNORM: | 125 | case Tegra::RenderTargetFormat::RGBA8_SNORM: |
| 126 | return PixelFormat::ABGR8S; | 126 | return PixelFormat::ABGR8S; |
| 127 | case Tegra::RenderTargetFormat::RGBA8_SINT: | ||
| 128 | return PixelFormat::ABGR8I; | ||
| 127 | case Tegra::RenderTargetFormat::RGBA8_UINT: | 129 | case Tegra::RenderTargetFormat::RGBA8_UINT: |
| 128 | return PixelFormat::ABGR8UI; | 130 | return PixelFormat::ABGR8UI; |
| 129 | case Tegra::RenderTargetFormat::RG16_UNORM: | 131 | 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 { | |||
| 17 | enum class PixelFormat { | 17 | enum class PixelFormat { |
| 18 | ABGR8U, | 18 | ABGR8U, |
| 19 | ABGR8S, | 19 | ABGR8S, |
| 20 | ABGR8I, | ||
| 20 | ABGR8UI, | 21 | ABGR8UI, |
| 21 | B5G6R5U, | 22 | B5G6R5U, |
| 22 | A2B10G10R10U, | 23 | A2B10G10R10U, |
| @@ -136,6 +137,7 @@ enum class SurfaceTarget { | |||
| 136 | constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{ | 137 | constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{ |
| 137 | 0, // ABGR8U | 138 | 0, // ABGR8U |
| 138 | 0, // ABGR8S | 139 | 0, // ABGR8S |
| 140 | 0, // ABGR8I | ||
| 139 | 0, // ABGR8UI | 141 | 0, // ABGR8UI |
| 140 | 0, // B5G6R5U | 142 | 0, // B5G6R5U |
| 141 | 0, // A2B10G10R10U | 143 | 0, // A2B10G10R10U |
| @@ -239,6 +241,7 @@ inline constexpr u32 GetCompressionFactor(PixelFormat format) { | |||
| 239 | constexpr std::array<u32, MaxPixelFormat> block_width_table = {{ | 241 | constexpr std::array<u32, MaxPixelFormat> block_width_table = {{ |
| 240 | 1, // ABGR8U | 242 | 1, // ABGR8U |
| 241 | 1, // ABGR8S | 243 | 1, // ABGR8S |
| 244 | 1, // ABGR8I | ||
| 242 | 1, // ABGR8UI | 245 | 1, // ABGR8UI |
| 243 | 1, // B5G6R5U | 246 | 1, // B5G6R5U |
| 244 | 1, // A2B10G10R10U | 247 | 1, // A2B10G10R10U |
| @@ -334,6 +337,7 @@ static constexpr u32 GetDefaultBlockWidth(PixelFormat format) { | |||
| 334 | constexpr std::array<u32, MaxPixelFormat> block_height_table = {{ | 337 | constexpr std::array<u32, MaxPixelFormat> block_height_table = {{ |
| 335 | 1, // ABGR8U | 338 | 1, // ABGR8U |
| 336 | 1, // ABGR8S | 339 | 1, // ABGR8S |
| 340 | 1, // ABGR8I | ||
| 337 | 1, // ABGR8UI | 341 | 1, // ABGR8UI |
| 338 | 1, // B5G6R5U | 342 | 1, // B5G6R5U |
| 339 | 1, // A2B10G10R10U | 343 | 1, // A2B10G10R10U |
| @@ -429,6 +433,7 @@ static constexpr u32 GetDefaultBlockHeight(PixelFormat format) { | |||
| 429 | constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ | 433 | constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ |
| 430 | 32, // ABGR8U | 434 | 32, // ABGR8U |
| 431 | 32, // ABGR8S | 435 | 32, // ABGR8S |
| 436 | 32, // ABGR8I | ||
| 432 | 32, // ABGR8UI | 437 | 32, // ABGR8UI |
| 433 | 16, // B5G6R5U | 438 | 16, // B5G6R5U |
| 434 | 32, // A2B10G10R10U | 439 | 32, // A2B10G10R10U |