Skip to content
Snippets Groups Projects
Commit 7a0d7e76 authored by Ameer J's avatar Ameer J
Browse files

small_block opt

parent fd2051b4
No related branches found
No related tags found
No related merge requests found
...@@ -264,8 +264,8 @@ uint Hash52(uint p) { ...@@ -264,8 +264,8 @@ uint Hash52(uint p) {
return p; return p;
} }
uint Select2DPartition(uint seed, uint x, uint y, uint partition_count, bool small_block) { uint Select2DPartition(uint seed, uint x, uint y, uint partition_count) {
if (small_block) { if ((block_dims.y * block_dims.x) < 32) {
x <<= 1; x <<= 1;
y <<= 1; y <<= 1;
} }
...@@ -1222,8 +1222,7 @@ void DecompressBlock(ivec3 coord) { ...@@ -1222,8 +1222,7 @@ void DecompressBlock(ivec3 coord) {
for (uint i = 0; i < block_dims.x; i++) { for (uint i = 0; i < block_dims.x; i++) {
uint local_partition = 0; uint local_partition = 0;
if (num_partitions > 1) { if (num_partitions > 1) {
local_partition = Select2DPartition(partition_index, i, j, num_partitions, local_partition = Select2DPartition(partition_index, i, j, num_partitions);
(block_dims.y * block_dims.x) < 32);
} }
const uvec4 C0 = ReplicateByteTo16(endpoints0[local_partition]); const uvec4 C0 = ReplicateByteTo16(endpoints0[local_partition]);
const uvec4 C1 = ReplicateByteTo16(endpoints1[local_partition]); const uvec4 C1 = ReplicateByteTo16(endpoints1[local_partition]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment