summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorAmeer J <52414509+ameerj@users.noreply.github.com>2023-08-06 18:18:55 +0200
committerAmeer J <52414509+ameerj@users.noreply.github.com>2023-08-06 20:54:58 +0200
commit31a0cff0367bddb51785145fba1089b625e06b62 (patch)
tree0ef4092d8895a945d4419a4438dfadd6abbd20f3 /src/video_core
parentundo uint (diff)
downloadyuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar.gz
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar.bz2
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar.lz
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar.xz
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.tar.zst
yuzu-31a0cff0367bddb51785145fba1089b625e06b62.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/host_shaders/astc_decoder.comp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/video_core/host_shaders/astc_decoder.comp b/src/video_core/host_shaders/astc_decoder.comp
index 547cd881f..9d9532a98 100644
--- a/src/video_core/host_shaders/astc_decoder.comp
+++ b/src/video_core/host_shaders/astc_decoder.comp
@@ -809,18 +809,15 @@ uint UnquantizeTexelWeight(EncodingData val) {
const uint A = ReplicateBitTo7((bitval & 1));
uint B = 0, C = 0, D = 0;
uint result = 0;
+ const uint bitlen_0_results[5] = {0, 16, 32, 48, 64};
switch (encoding) {
case JUST_BITS:
- result = FastReplicateTo6(bitval, bitlen);
- break;
+ return FastReplicateTo6(bitval, bitlen);
case TRIT: {
D = QuintTritValue(val);
switch (bitlen) {
- case 0: {
- const uint results[3] = {0, 32, 63};
- result = results[D];
- break;
- }
+ case 0:
+ return bitlen_0_results[D * 2];
case 1: {
C = 50;
break;
@@ -845,11 +842,8 @@ uint UnquantizeTexelWeight(EncodingData val) {
case QUINT: {
D = QuintTritValue(val);
switch (bitlen) {
- case 0: {
- const uint results[5] = {0, 16, 32, 47, 63};
- result = results[D];
- break;
- }
+ case 0:
+ return bitlen_0_results[D];
case 1: {
C = 28;
break;