diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-07-30 18:11:55 +0200 |
---|---|---|
committer | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-08-06 20:54:57 +0200 |
commit | e0c59c7b0b1f082a884414acc5006b243df29e57 (patch) | |
tree | 22d495738e2d136fa648cbdbe81a7b17abd8a298 /src/video_core | |
parent | restrict (diff) | |
download | yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.gz yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.bz2 yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.lz yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.xz yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.zst yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/host_shaders/astc_decoder.comp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/video_core/host_shaders/astc_decoder.comp b/src/video_core/host_shaders/astc_decoder.comp index a622d89a9..55b23201a 100644 --- a/src/video_core/host_shaders/astc_decoder.comp +++ b/src/video_core/host_shaders/astc_decoder.comp @@ -360,6 +360,11 @@ uint StreamBits(uint num_bits) { return ret; } +void SkipBits(uint num_bits) { + const int int_bits = int(num_bits); + total_bitsread += int_bits; +} + uint StreamColorBits(uint num_bits) { uint ret = 0; int int_bits = int(num_bits); @@ -1071,15 +1076,15 @@ void FillError(ivec3 coord) { } void FillVoidExtentLDR(ivec3 coord) { - StreamBits(52); - uint r_u = StreamBits(16); - uint g_u = StreamBits(16); - uint b_u = StreamBits(16); - uint a_u = StreamBits(16); - float a = float(a_u) / 65535.0f; - float r = float(r_u) / 65535.0f; - float g = float(g_u) / 65535.0f; - float b = float(b_u) / 65535.0f; + SkipBits(52); + const uint r_u = StreamBits(16); + const uint g_u = StreamBits(16); + const uint b_u = StreamBits(16); + const uint a_u = StreamBits(16); + const float a = float(a_u) / 65535.0f; + const float r = float(r_u) / 65535.0f; + const float g = float(g_u) / 65535.0f; + const float b = float(b_u) / 65535.0f; for (uint j = 0; j < block_dims.y; j++) { for (uint i = 0; i < block_dims.x; i++) { imageStore(dest_image, coord + ivec3(i, j, 0), vec4(r, g, b, a)); |