Commit ec29cb4d authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Shuffle some bits around

parent fe6fbfdb
......@@ -67,10 +67,10 @@ trans_generate_space_filler_indices()
for (int q = 0; q < 2; ++q) {
space_filler_packed4_skip[y][q] =
(space_filler[y][(q*8) + 0] << 0) |
(space_filler[y][(q*8) + 2] << 8) |
(space_filler[y][(q*8) + 4] << 16) |
(space_filler[y][(q*8) + 6] << 24);
(space_filler[y][(q*8) + 0]>>1 << 0) |
(space_filler[y][(q*8) + 2]>>1 << 8) |
(space_filler[y][(q*8) + 4]>>1 << 16) |
(space_filler[y][(q*8) + 6]>>1 << 24);
}
space_filler_one[y] = space_bits_4(y);
......@@ -95,10 +95,10 @@ swizzle_bpp1_align16(int width, int height, int source_stride, int block_pitch,
for (; source_start < source_end; block_start_s += 16*16, source_start += 16) {
const uint32_t *src_32 = (const uint32_t *) source_start;
for (int q = 0; q < 2; ++q) {
uint32_t srcA = src_32[q*2];
uint32_t srcB = src_32[q*2 + 1];
uint32_t spaced = space_filler_packed4_skip[rem_y][q];
for (int q = 0; q < 4; q += 2) {
uint32_t srcA = src_32[q];
uint32_t srcB = src_32[q + 1];
uint32_t spaced = space_filler_packed4_skip[rem_y][q>>1];
uint16_t *bs = (uint16_t *) block_start_s;
int spacedA = (spaced >> 0) & 0xFF;
......@@ -106,10 +106,10 @@ swizzle_bpp1_align16(int width, int height, int source_stride, int block_pitch,
int spacedC = (spaced >> 16) & 0xFF;
int spacedD = (spaced >> 24) & 0xFF;
bs[spacedA >> 1] = (srcA >> 0) & 0xFFFF;
bs[spacedB >> 1] = (srcA >> 16) & 0xFFFF;
bs[spacedC >> 1] = (srcB >> 0) & 0xFFFF;
bs[spacedD >> 1] = (srcB >> 16) & 0xFFFF;
bs[spacedA] = (srcA >> 0) & 0xFFFF;
bs[spacedB] = (srcA >> 16) & 0xFFFF;
bs[spacedC] = (srcB >> 0) & 0xFFFF;
bs[spacedD] = (srcB >> 16) & 0xFFFF;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment