diff options
| author | 2023-07-30 12:11:55 -0400 | |
|---|---|---|
| committer | 2023-08-06 14:54:57 -0400 | |
| commit | e0c59c7b0b1f082a884414acc5006b243df29e57 (patch) | |
| tree | 22d495738e2d136fa648cbdbe81a7b17abd8a298 /src | |
| parent | restrict (diff) | |
| download | yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.gz yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.tar.xz yuzu-e0c59c7b0b1f082a884414acc5006b243df29e57.zip | |
skip bits
Diffstat (limited to 'src')
| -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) { | |||
| 360 | return ret; | 360 | return ret; |
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | void SkipBits(uint num_bits) { | ||
| 364 | const int int_bits = int(num_bits); | ||
| 365 | total_bitsread += int_bits; | ||
| 366 | } | ||
| 367 | |||
| 363 | uint StreamColorBits(uint num_bits) { | 368 | uint StreamColorBits(uint num_bits) { |
| 364 | uint ret = 0; | 369 | uint ret = 0; |
| 365 | int int_bits = int(num_bits); | 370 | int int_bits = int(num_bits); |
| @@ -1071,15 +1076,15 @@ void FillError(ivec3 coord) { | |||
| 1071 | } | 1076 | } |
| 1072 | 1077 | ||
| 1073 | void FillVoidExtentLDR(ivec3 coord) { | 1078 | void FillVoidExtentLDR(ivec3 coord) { |
| 1074 | StreamBits(52); | 1079 | SkipBits(52); |
| 1075 | uint r_u = StreamBits(16); | 1080 | const uint r_u = StreamBits(16); |
| 1076 | uint g_u = StreamBits(16); | 1081 | const uint g_u = StreamBits(16); |
| 1077 | uint b_u = StreamBits(16); | 1082 | const uint b_u = StreamBits(16); |
| 1078 | uint a_u = StreamBits(16); | 1083 | const uint a_u = StreamBits(16); |
| 1079 | float a = float(a_u) / 65535.0f; | 1084 | const float a = float(a_u) / 65535.0f; |
| 1080 | float r = float(r_u) / 65535.0f; | 1085 | const float r = float(r_u) / 65535.0f; |
| 1081 | float g = float(g_u) / 65535.0f; | 1086 | const float g = float(g_u) / 65535.0f; |
| 1082 | float b = float(b_u) / 65535.0f; | 1087 | const float b = float(b_u) / 65535.0f; |
| 1083 | for (uint j = 0; j < block_dims.y; j++) { | 1088 | for (uint j = 0; j < block_dims.y; j++) { |
| 1084 | for (uint i = 0; i < block_dims.x; i++) { | 1089 | for (uint i = 0; i < block_dims.x; i++) { |
| 1085 | imageStore(dest_image, coord + ivec3(i, j, 0), vec4(r, g, b, a)); | 1090 | imageStore(dest_image, coord + ivec3(i, j, 0), vec4(r, g, b, a)); |