diff options
| author | 2022-11-24 21:48:41 -0500 | |
|---|---|---|
| committer | 2022-11-24 21:48:41 -0500 | |
| commit | 20b62dbd30e597c6d3700a22fbde5bd10169dfb2 (patch) | |
| tree | fa6c840b3ba16eb261a30ef50a34a5d0f07587c6 /src/video_core/surface.cpp | |
| parent | Merge pull request #9312 from FernandoS27/pokemomma (diff) | |
| parent | Fermi2D: Cleanup and address feedback. (diff) | |
| download | yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.gz yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.xz yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.zip | |
Merge pull request #9194 from FernandoS27/yfc-fermi2d
YFC - Fermi2D: Rework blit engine and add a software blitter.
Diffstat (limited to 'src/video_core/surface.cpp')
| -rw-r--r-- | src/video_core/surface.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 6bd133d10..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; |
| @@ -118,16 +121,22 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 118 | case Tegra::RenderTargetFormat::R16G16B16X16_FLOAT: | 121 | case Tegra::RenderTargetFormat::R16G16B16X16_FLOAT: |
| 119 | return PixelFormat::R16G16B16X16_FLOAT; | 122 | return PixelFormat::R16G16B16X16_FLOAT; |
| 120 | case Tegra::RenderTargetFormat::A8R8G8B8_UNORM: | 123 | case Tegra::RenderTargetFormat::A8R8G8B8_UNORM: |
| 124 | case Tegra::RenderTargetFormat::X8R8G8B8_UNORM: | ||
| 121 | return PixelFormat::B8G8R8A8_UNORM; | 125 | return PixelFormat::B8G8R8A8_UNORM; |
| 122 | case Tegra::RenderTargetFormat::A8R8G8B8_SRGB: | 126 | case Tegra::RenderTargetFormat::A8R8G8B8_SRGB: |
| 127 | case Tegra::RenderTargetFormat::X8R8G8B8_SRGB: | ||
| 123 | return PixelFormat::B8G8R8A8_SRGB; | 128 | return PixelFormat::B8G8R8A8_SRGB; |
| 124 | case Tegra::RenderTargetFormat::A2B10G10R10_UNORM: | 129 | case Tegra::RenderTargetFormat::A2B10G10R10_UNORM: |
| 125 | return PixelFormat::A2B10G10R10_UNORM; | 130 | return PixelFormat::A2B10G10R10_UNORM; |
| 126 | case Tegra::RenderTargetFormat::A2B10G10R10_UINT: | 131 | case Tegra::RenderTargetFormat::A2B10G10R10_UINT: |
| 127 | return PixelFormat::A2B10G10R10_UINT; | 132 | return PixelFormat::A2B10G10R10_UINT; |
| 133 | case Tegra::RenderTargetFormat::A2R10G10B10_UNORM: | ||
| 134 | return PixelFormat::A2R10G10B10_UNORM; | ||
| 128 | case Tegra::RenderTargetFormat::A8B8G8R8_UNORM: | 135 | case Tegra::RenderTargetFormat::A8B8G8R8_UNORM: |
| 136 | case Tegra::RenderTargetFormat::X8B8G8R8_UNORM: | ||
| 129 | return PixelFormat::A8B8G8R8_UNORM; | 137 | return PixelFormat::A8B8G8R8_UNORM; |
| 130 | case Tegra::RenderTargetFormat::A8B8G8R8_SRGB: | 138 | case Tegra::RenderTargetFormat::A8B8G8R8_SRGB: |
| 139 | case Tegra::RenderTargetFormat::X8B8G8R8_SRGB: | ||
| 131 | return PixelFormat::A8B8G8R8_SRGB; | 140 | return PixelFormat::A8B8G8R8_SRGB; |
| 132 | case Tegra::RenderTargetFormat::A8B8G8R8_SNORM: | 141 | case Tegra::RenderTargetFormat::A8B8G8R8_SNORM: |
| 133 | return PixelFormat::A8B8G8R8_SNORM; | 142 | return PixelFormat::A8B8G8R8_SNORM; |
| @@ -156,6 +165,7 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 156 | case Tegra::RenderTargetFormat::R5G6B5_UNORM: | 165 | case Tegra::RenderTargetFormat::R5G6B5_UNORM: |
| 157 | return PixelFormat::R5G6B5_UNORM; | 166 | return PixelFormat::R5G6B5_UNORM; |
| 158 | case Tegra::RenderTargetFormat::A1R5G5B5_UNORM: | 167 | case Tegra::RenderTargetFormat::A1R5G5B5_UNORM: |
| 168 | case Tegra::RenderTargetFormat::X1R5G5B5_UNORM: | ||
| 159 | return PixelFormat::A1R5G5B5_UNORM; | 169 | return PixelFormat::A1R5G5B5_UNORM; |
| 160 | case Tegra::RenderTargetFormat::R8G8_UNORM: | 170 | case Tegra::RenderTargetFormat::R8G8_UNORM: |
| 161 | return PixelFormat::R8G8_UNORM; | 171 | return PixelFormat::R8G8_UNORM; |