diff options
| author | 2022-11-06 15:19:08 +0100 | |
|---|---|---|
| committer | 2022-11-24 20:35:44 +0100 | |
| commit | 7356ab1de6ab7336da426b9176daafb3ebb503f5 (patch) | |
| tree | d5d348714633de2a1788bc0d114b32045f24f7f8 /src/video_core/surface.cpp | |
| parent | MaxwellDMA: Implement BlockLinear to BlockLinear copies. (diff) | |
| download | yuzu-7356ab1de6ab7336da426b9176daafb3ebb503f5.tar.gz yuzu-7356ab1de6ab7336da426b9176daafb3ebb503f5.tar.xz yuzu-7356ab1de6ab7336da426b9176daafb3ebb503f5.zip | |
GPU: Implement additional render target formats.
Diffstat (limited to 'src/video_core/surface.cpp')
| -rw-r--r-- | src/video_core/surface.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 80a7d908f..b618e1a25 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -93,11 +93,14 @@ PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format) { | |||
| 93 | 93 | ||
| 94 | PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) { | 94 | PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) { |
| 95 | switch (format) { | 95 | switch (format) { |
| 96 | case Tegra::RenderTargetFormat::R32B32G32A32_FLOAT: | 96 | case Tegra::RenderTargetFormat::R32G32B32A32_FLOAT: |
| 97 | case Tegra::RenderTargetFormat::R32G32B32X32_FLOAT: | ||
| 97 | return PixelFormat::R32G32B32A32_FLOAT; | 98 | return PixelFormat::R32G32B32A32_FLOAT; |
| 98 | case Tegra::RenderTargetFormat::R32G32B32A32_SINT: | 99 | case Tegra::RenderTargetFormat::R32G32B32A32_SINT: |
| 100 | case Tegra::RenderTargetFormat::R32G32B32X32_SINT: | ||
| 99 | return PixelFormat::R32G32B32A32_SINT; | 101 | return PixelFormat::R32G32B32A32_SINT; |
| 100 | case Tegra::RenderTargetFormat::R32G32B32A32_UINT: | 102 | case Tegra::RenderTargetFormat::R32G32B32A32_UINT: |
| 103 | case Tegra::RenderTargetFormat::R32G32B32X32_UINT: | ||
| 101 | return PixelFormat::R32G32B32A32_UINT; | 104 | return PixelFormat::R32G32B32A32_UINT; |
| 102 | case Tegra::RenderTargetFormat::R16G16B16A16_UNORM: | 105 | case Tegra::RenderTargetFormat::R16G16B16A16_UNORM: |
| 103 | return PixelFormat::R16G16B16A16_UNORM; | 106 | return PixelFormat::R16G16B16A16_UNORM; |
| @@ -127,9 +130,13 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 127 | return PixelFormat::A2B10G10R10_UNORM; | 130 | return PixelFormat::A2B10G10R10_UNORM; |
| 128 | case Tegra::RenderTargetFormat::A2B10G10R10_UINT: | 131 | case Tegra::RenderTargetFormat::A2B10G10R10_UINT: |
| 129 | return PixelFormat::A2B10G10R10_UINT; | 132 | return PixelFormat::A2B10G10R10_UINT; |
| 133 | case Tegra::RenderTargetFormat::A2R10G10B10_UNORM: | ||
| 134 | return PixelFormat::A2R10G10B10_UNORM; | ||
| 130 | case Tegra::RenderTargetFormat::A8B8G8R8_UNORM: | 135 | case Tegra::RenderTargetFormat::A8B8G8R8_UNORM: |
| 136 | case Tegra::RenderTargetFormat::X8B8G8R8_UNORM: | ||
| 131 | return PixelFormat::A8B8G8R8_UNORM; | 137 | return PixelFormat::A8B8G8R8_UNORM; |
| 132 | case Tegra::RenderTargetFormat::A8B8G8R8_SRGB: | 138 | case Tegra::RenderTargetFormat::A8B8G8R8_SRGB: |
| 139 | case Tegra::RenderTargetFormat::X8B8G8R8_SRGB: | ||
| 133 | return PixelFormat::A8B8G8R8_SRGB; | 140 | return PixelFormat::A8B8G8R8_SRGB; |
| 134 | case Tegra::RenderTargetFormat::A8B8G8R8_SNORM: | 141 | case Tegra::RenderTargetFormat::A8B8G8R8_SNORM: |
| 135 | return PixelFormat::A8B8G8R8_SNORM; | 142 | return PixelFormat::A8B8G8R8_SNORM; |
| @@ -158,6 +165,7 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 158 | case Tegra::RenderTargetFormat::R5G6B5_UNORM: | 165 | case Tegra::RenderTargetFormat::R5G6B5_UNORM: |
| 159 | return PixelFormat::R5G6B5_UNORM; | 166 | return PixelFormat::R5G6B5_UNORM; |
| 160 | case Tegra::RenderTargetFormat::A1R5G5B5_UNORM: | 167 | case Tegra::RenderTargetFormat::A1R5G5B5_UNORM: |
| 168 | case Tegra::RenderTargetFormat::X1R5G5B5_UNORM: | ||
| 161 | return PixelFormat::A1R5G5B5_UNORM; | 169 | return PixelFormat::A1R5G5B5_UNORM; |
| 162 | case Tegra::RenderTargetFormat::R8G8_UNORM: | 170 | case Tegra::RenderTargetFormat::R8G8_UNORM: |
| 163 | return PixelFormat::R8G8_UNORM; | 171 | return PixelFormat::R8G8_UNORM; |