summaryrefslogtreecommitdiff
path: root/src/video_core/textures/convert.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-07-21 00:13:04 -0400
committerGravatar GitHub2020-07-21 00:13:04 -0400
commit3d13d7f48f3bf7c1fb7b7673e963aa3e54db2838 (patch)
tree3214c882ce18526a3e57223ae96f06e7083369f2 /src/video_core/textures/convert.cpp
parentMerge pull request #4168 from ReinUsesLisp/global-memory (diff)
parentvideo_core: Rearrange pixel format names (diff)
downloadyuzu-3d13d7f48f3bf7c1fb7b7673e963aa3e54db2838.tar.gz
yuzu-3d13d7f48f3bf7c1fb7b7673e963aa3e54db2838.tar.xz
yuzu-3d13d7f48f3bf7c1fb7b7673e963aa3e54db2838.zip
Merge pull request #4324 from ReinUsesLisp/formats
video_core: Fix, add and rename pixel formats
Diffstat (limited to 'src/video_core/textures/convert.cpp')
-rw-r--r--src/video_core/textures/convert.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/textures/convert.cpp b/src/video_core/textures/convert.cpp
index f3efa7eb0..962921483 100644
--- a/src/video_core/textures/convert.cpp
+++ b/src/video_core/textures/convert.cpp
@@ -35,7 +35,7 @@ void SwapS8Z24ToZ24S8(u8* data, u32 width, u32 height) {
35 S8Z24 s8z24_pixel{}; 35 S8Z24 s8z24_pixel{};
36 Z24S8 z24s8_pixel{}; 36 Z24S8 z24s8_pixel{};
37 constexpr auto bpp{ 37 constexpr auto bpp{
38 VideoCore::Surface::GetBytesPerPixel(VideoCore::Surface::PixelFormat::S8Z24)}; 38 VideoCore::Surface::GetBytesPerPixel(VideoCore::Surface::PixelFormat::S8_UINT_D24_UNORM)};
39 for (std::size_t y = 0; y < height; ++y) { 39 for (std::size_t y = 0; y < height; ++y) {
40 for (std::size_t x = 0; x < width; ++x) { 40 for (std::size_t x = 0; x < width; ++x) {
41 const std::size_t offset{bpp * (y * width + x)}; 41 const std::size_t offset{bpp * (y * width + x)};
@@ -73,7 +73,7 @@ void ConvertFromGuestToHost(u8* in_data, u8* out_data, PixelFormat pixel_format,
73 in_data, width, height, depth, block_width, block_height); 73 in_data, width, height, depth, block_width, block_height);
74 std::copy(rgba8_data.begin(), rgba8_data.end(), out_data); 74 std::copy(rgba8_data.begin(), rgba8_data.end(), out_data);
75 75
76 } else if (convert_s8z24 && pixel_format == PixelFormat::S8Z24) { 76 } else if (convert_s8z24 && pixel_format == PixelFormat::S8_UINT_D24_UNORM) {
77 Tegra::Texture::ConvertS8Z24ToZ24S8(in_data, width, height); 77 Tegra::Texture::ConvertS8Z24ToZ24S8(in_data, width, height);
78 } 78 }
79} 79}
@@ -85,7 +85,7 @@ void ConvertFromHostToGuest(u8* data, PixelFormat pixel_format, u32 width, u32 h
85 static_cast<u32>(pixel_format)); 85 static_cast<u32>(pixel_format));
86 UNREACHABLE(); 86 UNREACHABLE();
87 87
88 } else if (convert_s8z24 && pixel_format == PixelFormat::S8Z24) { 88 } else if (convert_s8z24 && pixel_format == PixelFormat::S8_UINT_D24_UNORM) {
89 Tegra::Texture::ConvertZ24S8ToS8Z24(data, width, height); 89 Tegra::Texture::ConvertZ24S8ToS8Z24(data, width, height);
90 } 90 }
91} 91}