summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/host_shaders/astc_decoder.comp2
-rw-r--r--src/video_core/textures/astc.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/host_shaders/astc_decoder.comp b/src/video_core/host_shaders/astc_decoder.comp
index 703e34587..eaba1b103 100644
--- a/src/video_core/host_shaders/astc_decoder.comp
+++ b/src/video_core/host_shaders/astc_decoder.comp
@@ -763,7 +763,7 @@ void ComputeEndpoints(out uvec4 ep1, out uvec4 ep2, uint color_endpoint_mode) {
763 case 1: { 763 case 1: {
764 READ_UINT_VALUES(2) 764 READ_UINT_VALUES(2)
765 uint L0 = (v[0] >> 2) | (v[1] & 0xC0); 765 uint L0 = (v[0] >> 2) | (v[1] & 0xC0);
766 uint L1 = max(L0 + (v[1] & 0x3F), 0xFFU); 766 uint L1 = min(L0 + (v[1] & 0x3F), 0xFFU);
767 ep1 = uvec4(0xFF, L0, L0, L0); 767 ep1 = uvec4(0xFF, L0, L0, L0);
768 ep2 = uvec4(0xFF, L1, L1, L1); 768 ep2 = uvec4(0xFF, L1, L1, L1);
769 break; 769 break;
diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp
index 6079aa709..9b2177ebd 100644
--- a/src/video_core/textures/astc.cpp
+++ b/src/video_core/textures/astc.cpp
@@ -1217,7 +1217,7 @@ static void ComputeEndpoints(Pixel& ep1, Pixel& ep2, const u32*& colorValues,
1217 case 1: { 1217 case 1: {
1218 READ_UINT_VALUES(2) 1218 READ_UINT_VALUES(2)
1219 u32 L0 = (v[0] >> 2) | (v[1] & 0xC0); 1219 u32 L0 = (v[0] >> 2) | (v[1] & 0xC0);
1220 u32 L1 = std::max(L0 + (v[1] & 0x3F), 0xFFU); 1220 u32 L1 = std::min(L0 + (v[1] & 0x3F), 0xFFU);
1221 ep1 = Pixel(0xFF, L0, L0, L0); 1221 ep1 = Pixel(0xFF, L0, L0, L0);
1222 ep2 = Pixel(0xFF, L1, L1, L1); 1222 ep2 = Pixel(0xFF, L1, L1, L1);
1223 } break; 1223 } break;