diff options
| author | 2022-10-23 17:25:18 -0700 | |
|---|---|---|
| committer | 2022-10-23 17:25:18 -0700 | |
| commit | 0313ee77936a696f9135a31ac0b644e6ffe49ae8 (patch) | |
| tree | b9e4a934447468338c60add33375409341f5bc7d /src/video_core/textures | |
| parent | Merge pull request #9095 from FernandoS27/meat-good-vegetable-bad (diff) | |
| parent | CMakeLists: Disable -Wbraced-scalar-init on Clang (diff) | |
| download | yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.gz yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.tar.xz yuzu-0313ee77936a696f9135a31ac0b644e6ffe49ae8.zip | |
Merge pull request #9105 from Morph1984/warnings
general: Treat more warnings as errors
Diffstat (limited to 'src/video_core/textures')
| -rw-r--r-- | src/video_core/textures/astc.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index 15b9d4182..69a32819a 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp | |||
| @@ -1661,8 +1661,8 @@ void Decompress(std::span<const uint8_t> data, uint32_t width, uint32_t height, | |||
| 1661 | for (u32 z = 0; z < depth; ++z) { | 1661 | for (u32 z = 0; z < depth; ++z) { |
| 1662 | const u32 depth_offset = z * height * width * 4; | 1662 | const u32 depth_offset = z * height * width * 4; |
| 1663 | for (u32 y_index = 0; y_index < rows; ++y_index) { | 1663 | for (u32 y_index = 0; y_index < rows; ++y_index) { |
| 1664 | auto decompress_stride = [data, width, height, depth, block_width, block_height, output, | 1664 | auto decompress_stride = [data, width, height, block_width, block_height, output, rows, |
| 1665 | rows, cols, z, depth_offset, y_index] { | 1665 | cols, z, depth_offset, y_index] { |
| 1666 | const u32 y = y_index * block_height; | 1666 | const u32 y = y_index * block_height; |
| 1667 | for (u32 x_index = 0; x_index < cols; ++x_index) { | 1667 | for (u32 x_index = 0; x_index < cols; ++x_index) { |
| 1668 | const u32 block_index = (z * rows * cols) + (y_index * cols) + x_index; | 1668 | const u32 block_index = (z * rows * cols) + (y_index * cols) + x_index; |
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 52d067a2d..fd1a4b987 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -21,7 +21,7 @@ constexpr u32 pdep(u32 value) { | |||
| 21 | u32 m = mask; | 21 | u32 m = mask; |
| 22 | for (u32 bit = 1; m; bit += bit) { | 22 | for (u32 bit = 1; m; bit += bit) { |
| 23 | if (value & bit) | 23 | if (value & bit) |
| 24 | result |= m & -m; | 24 | result |= m & (~m + 1); |
| 25 | m &= m - 1; | 25 | m &= m - 1; |
| 26 | } | 26 | } |
| 27 | return result; | 27 | return result; |