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

Maybe shave a bit

parent 55048743
...@@ -65,9 +65,9 @@ swizzle_bpp4_align16(int width, int height, int source_stride, int block_pitch, ...@@ -65,9 +65,9 @@ swizzle_bpp4_align16(int width, int height, int source_stride, int block_pitch,
uint32_t *ldest) uint32_t *ldest)
{ {
for (int y = 0; y < height; ++y) { for (int y = 0; y < height; ++y) {
int block_y = y >> 4; int block_y = y & ~(0x0f);
int rem_y = y & 0x0f; int rem_y = y & 0x0f;
uint32_t *block_start_s = ldest + (block_y * block_pitch * 256); uint32_t *block_start_s = ldest + (block_y * block_pitch);
const uint32_t *source_start = pixels + (y * source_stride); const uint32_t *source_start = pixels + (y * source_stride);
const uint32_t *source_end = source_start + width; const uint32_t *source_end = source_start + width;
...@@ -90,7 +90,7 @@ trans_texture_swizzle(int width, int height, int bytes_per_pixel, int source_str ...@@ -90,7 +90,7 @@ trans_texture_swizzle(int width, int height, int bytes_per_pixel, int source_str
/* Use fast path if available */ /* Use fast path if available */
if (bytes_per_pixel == 4 /* && (ALIGN(width, 16) == width) */) { if (bytes_per_pixel == 4 /* && (ALIGN(width, 16) == width) */) {
swizzle_bpp4_align16(width, height, source_stride >> 2, block_pitch, (const uint32_t *) pixels, (uint32_t *) ldest); swizzle_bpp4_align16(width, height, source_stride >> 2, (block_pitch * 256 >> 4), (const uint32_t *) pixels, (uint32_t *) ldest);
return; return;
} }
......
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