summaryrefslogtreecommitdiffstats
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 e3ab786e5..4a47862ce 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -43,6 +43,7 @@ enum class RenderTargetFormat : u32 {
RGBA32_UINT = 0xC2,
RGBA16_UNORM = 0xC6,
RGBA16_SNORM = 0xC7,
+ RGBA16_SINT = 0xC8,
RGBA16_UINT = 0xC9,
RGBA16_FLOAT = 0xCA,
RG32_FLOAT = 0xCB,
diff --git a/src/video_core/morton.cpp b/src/video_core/morton.cpp
index 452e1f01e..c7c8f2238 100644
--- a/src/video_core/morton.cpp
+++ b/src/video_core/morton.cpp
@@ -55,6 +55,7 @@ static constexpr ConversionArray morton_to_linear_fns = {
MortonCopy<true, PixelFormat::RGBA16F>,
MortonCopy<true, PixelFormat::RGBA16U>,
MortonCopy<true, PixelFormat::RGBA16S>,
+ MortonCopy<true, PixelFormat::RGBA16I>,
MortonCopy<true, PixelFormat::RGBA16UI>,
MortonCopy<true, PixelFormat::R11FG11FB10F>,
MortonCopy<true, PixelFormat::RGBA32UI>,
@@ -142,6 +143,7 @@ static constexpr ConversionArray linear_to_morton_fns = {
MortonCopy<false, PixelFormat::R8UI>,
MortonCopy<false, PixelFormat::RGBA16F>,
MortonCopy<false, PixelFormat::RGBA16S>,
+ MortonCopy<false, PixelFormat::RGBA16I>,
MortonCopy<false, PixelFormat::RGBA16U>,
MortonCopy<false, PixelFormat::RGBA16UI>,
MortonCopy<false, PixelFormat::R11FG11FB10F>,
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 396b85e40..ff67ac813 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -55,6 +55,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format
{GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT}, // RGBA16F
{GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT}, // RGBA16U
{GL_RGBA16_SNORM, GL_RGBA, GL_SHORT}, // RGBA16S
+ {GL_RGBA16I, GL_RGBA_INTEGER, GL_SHORT}, // RGBA16I
{GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT}, // RGBA16UI
{GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV}, // R11FG11FB10F
{GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT}, // RGBA32UI
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index fe3b73a99..e79e0645d 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -131,6 +131,7 @@ struct FormatTuple {
{VK_FORMAT_R16G16B16A16_SFLOAT, Attachable | Storage}, // RGBA16F
{VK_FORMAT_R16G16B16A16_UNORM, Attachable | Storage}, // RGBA16U
{VK_FORMAT_R16G16B16A16_SNORM, Attachable | Storage}, // RGBA16S
+ {VK_FORMAT_R16G16B16A16_SINT, Attachable | Storage}, // RGBA16I
{VK_FORMAT_R16G16B16A16_UINT, Attachable | Storage}, // RGBA16UI
{VK_FORMAT_B10G11R11_UFLOAT_PACK32, Attachable | Storage}, // R11FG11FB10F
{VK_FORMAT_R32G32B32A32_UINT, Attachable | Storage}, // RGBA32UI
diff --git a/src/video_core/renderer_vulkan/vk_device.cpp b/src/video_core/renderer_vulkan/vk_device.cpp
index 7ae4005a8..a61a94c6c 100644
--- a/src/video_core/renderer_vulkan/vk_device.cpp
+++ b/src/video_core/renderer_vulkan/vk_device.cpp
@@ -87,6 +87,7 @@ std::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(
VK_FORMAT_R32G32_SFLOAT,
VK_FORMAT_R32G32_SINT,
VK_FORMAT_R32G32_UINT,
+ VK_FORMAT_R16G16B16A16_SINT,
VK_FORMAT_R16G16B16A16_UINT,
VK_FORMAT_R16G16B16A16_SNORM,
VK_FORMAT_R16G16B16A16_UNORM,
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index 0db995367..9c19e2838 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -100,6 +100,8 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format)
return PixelFormat::RGBA16U;
case Tegra::RenderTargetFormat::RGBA16_SNORM:
return PixelFormat::RGBA16S;
+ case Tegra::RenderTargetFormat::RGBA16_SINT:
+ return PixelFormat::RGBA16I;
case Tegra::RenderTargetFormat::RGBA16_UINT:
return PixelFormat::RGBA16UI;
case Tegra::RenderTargetFormat::RGBA16_FLOAT:
diff --git a/src/video_core/surface.h b/src/video_core/surface.h
index 6f3162986..27d447cb9 100644
--- a/src/video_core/surface.h
+++ b/src/video_core/surface.h
@@ -29,6 +29,7 @@ enum class PixelFormat {
RGBA16F,
RGBA16U,
RGBA16S,
+ RGBA16I,
RGBA16UI,
R11FG11FB10F,
RGBA32UI,
@@ -149,6 +150,7 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{
0, // RGBA16F
0, // RGBA16U
0, // RGBA16S
+ 0, // RGBA16I
0, // RGBA16UI
0, // R11FG11FB10F
0, // RGBA32UI
@@ -253,6 +255,7 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{
1, // RGBA16F
1, // RGBA16U
1, // RGBA16S
+ 1, // RGBA16I
1, // RGBA16UI
1, // R11FG11FB10F
1, // RGBA32UI
@@ -349,6 +352,7 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{
1, // RGBA16F
1, // RGBA16U
1, // RGBA16S
+ 1, // RGBA16I
1, // RGBA16UI
1, // R11FG11FB10F
1, // RGBA32UI
@@ -445,6 +449,7 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{
64, // RGBA16F
64, // RGBA16U
64, // RGBA16S
+ 64, // RGBA16I
64, // RGBA16UI
32, // R11FG11FB10F
128, // RGBA32UI