summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-26 02:18:29 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-02-26 02:18:29 +0100
commit3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a (patch)
treeec98c427b35fbea3212c59db370d0df35341572d
parentMerge pull request #575 from linkmauve/xdg (diff)
parentVideo core: Fix pixelation/blockiness in textures. (diff)
downloadyuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar.gz
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar.bz2
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar.lz
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar.xz
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.tar.zst
yuzu-3342679b33dc836ad1cb4ed39b53b0ed1eaaca1a.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 0beb72e6b..795449423 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -333,9 +333,9 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
// Interleave the lower 3 bits of each coordinate to get the intra-block offsets, which are
// arranged in a Z-order curve. More details on the bit manipulation at:
// https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/
- unsigned int i = (x | (y << 8)) & 0x0707; // ---- -210
- i = (i ^ (i << 2)) & 0x1313; // ---2 --10
- i = (i ^ (i << 1)) & 0x1515; // ---2 -1-0
+ unsigned int i = (x & 7) | ((y & 7) << 8); // ---- -210
+ i = (i ^ (i << 2)) & 0x1313; // ---2 --10
+ i = (i ^ (i << 1)) & 0x1515; // ---2 -1-0
i = (i | (i >> 7)) & 0x3F;
if (info.format != Regs::TextureFormat::ETC1 &&