summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/gpu.h1
-rw-r--r--src/video_core/morton.cpp2
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp1
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp1
-rw-r--r--src/video_core/renderer_vulkan/vk_device.cpp1
-rw-r--r--src/video_core/surface.cpp2
-rw-r--r--src/video_core/surface.h5
7 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 2b92ab0ea..1e5d2ffcc 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -76,6 +76,7 @@ enum class RenderTargetFormat : u32 {
76 R16_FLOAT = 0xF2, 76 R16_FLOAT = 0xF2,
77 R8_UNORM = 0xF3, 77 R8_UNORM = 0xF3,
78 R8_SNORM = 0xF4, 78 R8_SNORM = 0xF4,
79 R8_SINT = 0xF5,
79 R8_UINT = 0xF6, 80 R8_UINT = 0xF6,
80}; 81};
81 82
diff --git a/src/video_core/morton.cpp b/src/video_core/morton.cpp
index 9b569afc8..790360d4d 100644
--- a/src/video_core/morton.cpp
+++ b/src/video_core/morton.cpp
@@ -49,6 +49,7 @@ static constexpr ConversionArray morton_to_linear_fns = {
49 MortonCopy<true, PixelFormat::A1B5G5R5U>, 49 MortonCopy<true, PixelFormat::A1B5G5R5U>,
50 MortonCopy<true, PixelFormat::R8U>, 50 MortonCopy<true, PixelFormat::R8U>,
51 MortonCopy<true, PixelFormat::R8S>, 51 MortonCopy<true, PixelFormat::R8S>,
52 MortonCopy<true, PixelFormat::R8I>,
52 MortonCopy<true, PixelFormat::R8UI>, 53 MortonCopy<true, PixelFormat::R8UI>,
53 MortonCopy<true, PixelFormat::RGBA16F>, 54 MortonCopy<true, PixelFormat::RGBA16F>,
54 MortonCopy<true, PixelFormat::RGBA16U>, 55 MortonCopy<true, PixelFormat::RGBA16U>,
@@ -133,6 +134,7 @@ static constexpr ConversionArray linear_to_morton_fns = {
133 MortonCopy<false, PixelFormat::A1B5G5R5U>, 134 MortonCopy<false, PixelFormat::A1B5G5R5U>,
134 MortonCopy<false, PixelFormat::R8U>, 135 MortonCopy<false, PixelFormat::R8U>,
135 MortonCopy<false, PixelFormat::R8S>, 136 MortonCopy<false, PixelFormat::R8S>,
137 MortonCopy<false, PixelFormat::R8I>,
136 MortonCopy<false, PixelFormat::R8UI>, 138 MortonCopy<false, PixelFormat::R8UI>,
137 MortonCopy<false, PixelFormat::RGBA16F>, 139 MortonCopy<false, PixelFormat::RGBA16F>,
138 MortonCopy<false, PixelFormat::RGBA16S>, 140 MortonCopy<false, PixelFormat::RGBA16S>,
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 6319b0006..553db1cb1 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -49,6 +49,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format
49 {GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, // A1B5G5R5U 49 {GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV}, // A1B5G5R5U
50 {GL_R8, GL_RED, GL_UNSIGNED_BYTE}, // R8U 50 {GL_R8, GL_RED, GL_UNSIGNED_BYTE}, // R8U
51 {GL_R8_SNORM, GL_RED, GL_BYTE}, // R8S 51 {GL_R8_SNORM, GL_RED, GL_BYTE}, // R8S
52 {GL_R8I, GL_RED_INTEGER, GL_BYTE}, // R8I
52 {GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE}, // R8UI 53 {GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE}, // R8UI
53 {GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT}, // RGBA16F 54 {GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT}, // RGBA16F
54 {GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT}, // RGBA16U 55 {GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT}, // RGBA16U
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index 1f3f79380..645cb92ca 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -125,6 +125,7 @@ struct FormatTuple {
125 {VK_FORMAT_A1R5G5B5_UNORM_PACK16, Attachable}, // A1B5G5R5U (flipped with swizzle) 125 {VK_FORMAT_A1R5G5B5_UNORM_PACK16, Attachable}, // A1B5G5R5U (flipped with swizzle)
126 {VK_FORMAT_R8_UNORM, Attachable | Storage}, // R8U 126 {VK_FORMAT_R8_UNORM, Attachable | Storage}, // R8U
127 {VK_FORMAT_R8_SNORM, Attachable | Storage}, // R8S 127 {VK_FORMAT_R8_SNORM, Attachable | Storage}, // R8S
128 {VK_FORMAT_R8_SINT, Attachable | Storage}, // R8I
128 {VK_FORMAT_R8_UINT, Attachable | Storage}, // R8UI 129 {VK_FORMAT_R8_UINT, Attachable | Storage}, // R8UI
129 {VK_FORMAT_R16G16B16A16_SFLOAT, Attachable | Storage}, // RGBA16F 130 {VK_FORMAT_R16G16B16A16_SFLOAT, Attachable | Storage}, // RGBA16F
130 {VK_FORMAT_R16G16B16A16_UNORM, Attachable | Storage}, // RGBA16U 131 {VK_FORMAT_R16G16B16A16_UNORM, Attachable | Storage}, // RGBA16U
diff --git a/src/video_core/renderer_vulkan/vk_device.cpp b/src/video_core/renderer_vulkan/vk_device.cpp
index c4889ac88..59c5f9ea5 100644
--- a/src/video_core/renderer_vulkan/vk_device.cpp
+++ b/src/video_core/renderer_vulkan/vk_device.cpp
@@ -99,6 +99,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(
99 VK_FORMAT_R8G8_UINT, 99 VK_FORMAT_R8G8_UINT,
100 VK_FORMAT_R8_UNORM, 100 VK_FORMAT_R8_UNORM,
101 VK_FORMAT_R8_SNORM, 101 VK_FORMAT_R8_SNORM,
102 VK_FORMAT_R8_SINT,
102 VK_FORMAT_R8_UINT, 103 VK_FORMAT_R8_UINT,
103 VK_FORMAT_B10G11R11_UFLOAT_PACK32, 104 VK_FORMAT_B10G11R11_UFLOAT_PACK32,
104 VK_FORMAT_R32_SFLOAT, 105 VK_FORMAT_R32_SFLOAT,
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 6e9b496d3..f132f1b43 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -166,6 +166,8 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format)
166 return PixelFormat::R8U; 166 return PixelFormat::R8U;
167 case Tegra::RenderTargetFormat::R8_SNORM: 167 case Tegra::RenderTargetFormat::R8_SNORM:
168 return PixelFormat::R8S; 168 return PixelFormat::R8S;
169 case Tegra::RenderTargetFormat::R8_SINT:
170 return PixelFormat::R8I;
169 case Tegra::RenderTargetFormat::R8_UINT: 171 case Tegra::RenderTargetFormat::R8_UINT:
170 return PixelFormat::R8UI; 172 return PixelFormat::R8UI;
171 default: 173 default:
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index def206740..a6cac3bf9 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -23,6 +23,7 @@ enum class PixelFormat {
23 A1B5G5R5U, 23 A1B5G5R5U,
24 R8U, 24 R8U,
25 R8S, 25 R8S,
26 R8I,
26 R8UI, 27 R8UI,
27 RGBA16F, 28 RGBA16F,
28 RGBA16U, 29 RGBA16U,
@@ -139,6 +140,7 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{
139 0, // A1B5G5R5U 140 0, // A1B5G5R5U
140 0, // R8U 141 0, // R8U
141 0, // R8S 142 0, // R8S
143 0, // R8I
142 0, // R8UI 144 0, // R8UI
143 0, // RGBA16F 145 0, // RGBA16F
144 0, // RGBA16U 146 0, // RGBA16U
@@ -239,6 +241,7 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{
239 1, // A1B5G5R5U 241 1, // A1B5G5R5U
240 1, // R8U 242 1, // R8U
241 1, // R8S 243 1, // R8S
244 1, // R8I
242 1, // R8UI 245 1, // R8UI
243 1, // RGBA16F 246 1, // RGBA16F
244 1, // RGBA16U 247 1, // RGBA16U
@@ -331,6 +334,7 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{
331 1, // A1B5G5R5U 334 1, // A1B5G5R5U
332 1, // R8U 335 1, // R8U
333 1, // R8S 336 1, // R8S
337 1, // R8I
334 1, // R8UI 338 1, // R8UI
335 1, // RGBA16F 339 1, // RGBA16F
336 1, // RGBA16U 340 1, // RGBA16U
@@ -423,6 +427,7 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{
423 16, // A1B5G5R5U 427 16, // A1B5G5R5U
424 8, // R8U 428 8, // R8U
425 8, // R8S 429 8, // R8S
430 8, // R8I
426 8, // R8UI 431 8, // R8UI
427 64, // RGBA16F 432 64, // RGBA16F
428 64, // RGBA16U 433 64, // RGBA16U