Mesa (master): llvmpipe: Fix alignment.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Dec 4 19:35:05 UTC 2012


Module: Mesa
Branch: master
Commit: 294d8a71efe0d85d7212c9b0f465e8637cc25e77
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=294d8a71efe0d85d7212c9b0f465e8637cc25e77

Author: José Fonseca <jfonseca at vmware.com>
Date:   Tue Dec  4 19:09:28 2012 +0000

llvmpipe: Fix alignment.

My understanding and actual implementation of how the pixels are being
fetch differed.

This fixes bug 57863.

Trivial.

---

 src/gallium/drivers/llvmpipe/lp_state_fs.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index c56ce9e..f89f952 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1337,7 +1337,12 @@ generate_unswizzled_blend(struct gallivm_state *gallivm,
    mask_type.length = fs_type.length;
 
    /* Compute the alignment of the destination pointer in bytes */
+#if 0
    dst_alignment = (block_width * out_format_desc->block.bits + 7)/(out_format_desc->block.width * 8);
+#else
+   /* FIXME -- currently we're fetching pixels one by one, instead of row by row */
+   dst_alignment = (1 * out_format_desc->block.bits + 7)/(out_format_desc->block.width * 8);
+#endif
    /* Force power-of-two alignment by extracting only the least-significant-bit */
    dst_alignment = 1 << (ffs(dst_alignment) - 1);
    /* Resource base and stride pointers are aligned to 16 bytes, so that's the maximum alignment we can guarantee */




More information about the mesa-commit mailing list