summaryrefslogtreecommitdiff
path: root/src/video_core/textures/decoders.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-20 21:22:20 -0400
committerGravatar FernandoS272019-06-20 21:24:47 -0400
commitd1812316e1b0f03af2ba10d4fe04be728e72725c (patch)
tree10fb4e292fdfc9346246895dc80343edc3ed766f /src/video_core/textures/decoders.cpp
parentshader_cache: Correct versioning and size calculation. (diff)
downloadyuzu-d1812316e1b0f03af2ba10d4fe04be728e72725c.tar.gz
yuzu-d1812316e1b0f03af2ba10d4fe04be728e72725c.tar.xz
yuzu-d1812316e1b0f03af2ba10d4fe04be728e72725c.zip
texture_cache: Style and Corrections
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
-rw-r--r--src/video_core/textures/decoders.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 9a2f4198a..7e8295944 100644
--- a/src/video_core/textures/decoders.cpp
+++ b/src/video_core/textures/decoders.cpp
@@ -256,7 +256,8 @@ std::vector<u8> UnswizzleTexture(u8* address, u32 tile_size_x, u32 tile_size_y,
256} 256}
257 257
258void SwizzleSubrect(u32 subrect_width, u32 subrect_height, u32 source_pitch, u32 swizzled_width, 258void SwizzleSubrect(u32 subrect_width, u32 subrect_height, u32 source_pitch, u32 swizzled_width,
259 u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height_bit) { 259 u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data,
260 u32 block_height_bit) {
260 const u32 block_height = 1U << block_height_bit; 261 const u32 block_height = 1U << block_height_bit;
261 const u32 image_width_in_gobs{(swizzled_width * bytes_per_pixel + (gob_size_x - 1)) / 262 const u32 image_width_in_gobs{(swizzled_width * bytes_per_pixel + (gob_size_x - 1)) /
262 gob_size_x}; 263 gob_size_x};
@@ -278,8 +279,8 @@ void SwizzleSubrect(u32 subrect_width, u32 subrect_height, u32 source_pitch, u32
278} 279}
279 280
280void UnswizzleSubrect(u32 subrect_width, u32 subrect_height, u32 dest_pitch, u32 swizzled_width, 281void UnswizzleSubrect(u32 subrect_width, u32 subrect_height, u32 dest_pitch, u32 swizzled_width,
281 u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data, u32 block_height_bit, 282 u32 bytes_per_pixel, u8* swizzled_data, u8* unswizzled_data,
282 u32 offset_x, u32 offset_y) { 283 u32 block_height_bit, u32 offset_x, u32 offset_y) {
283 const u32 block_height = 1U << block_height_bit; 284 const u32 block_height = 1U << block_height_bit;
284 for (u32 line = 0; line < subrect_height; ++line) { 285 for (u32 line = 0; line < subrect_height; ++line) {
285 const u32 y2 = line + offset_y; 286 const u32 y2 = line + offset_y;