summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/cell/spu/spu_vertex_fetch.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-04 18:05:37 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-04 18:05:37 -0700
commit5db1593c78192b764ad2ef7bdc5182d8ec4aed7c (patch)
tree3933e394cc5b3f938160493e1d7075e96aec3584 /src/mesa/pipe/cell/spu/spu_vertex_fetch.c
parent684d320ea2e7ec03d01275a544068cc6b45e1e9a (diff)
Cell: fix some alignment issues by aligning commands to 8-byte boundaries
Contributed by Ian Romanick. Also, temporarily disable inlined vertex buffers. They need to be 16-byte aligned...
Diffstat (limited to 'src/mesa/pipe/cell/spu/spu_vertex_fetch.c')
-rw-r--r--src/mesa/pipe/cell/spu/spu_vertex_fetch.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/pipe/cell/spu/spu_vertex_fetch.c b/src/mesa/pipe/cell/spu/spu_vertex_fetch.c
index 1e846868e3..5b0f2a6470 100644
--- a/src/mesa/pipe/cell/spu/spu_vertex_fetch.c
+++ b/src/mesa/pipe/cell/spu/spu_vertex_fetch.c
@@ -431,9 +431,8 @@ static void generic_vertex_fetch(struct spu_vs_context *draw,
/* loop over vertex attributes (vertex shader inputs)
*/
for (attr = 0; attr < nr_attrs; attr++) {
-
- const unsigned pitch = draw->vertex_fetch.pitch[attr];
- const ubyte *src = draw->vertex_fetch.src_ptr[attr];
+ const unsigned pitch = draw->vertex_fetch.pitch[attr];
+ const uint64_t src = draw->vertex_fetch.src_ptr[attr];
const spu_fetch_func fetch = draw->vertex_fetch.fetch[attr];
unsigned i;
float p[4][4];
@@ -447,7 +446,7 @@ static void generic_vertex_fetch(struct spu_vs_context *draw,
*/
for (i = 0; i < count; i++) {
uint8_t buffer[32] ALIGN16_ATTRIB;
- const unsigned long addr = src + (elts[i] * pitch);
+ const uint64_t addr = src + (elts[i] * pitch);
const unsigned size = ((addr & 0x0f) == 0) ? 16 : 32;
mfc_get(buffer, addr & ~0x0f, size, TAG_VERTEX_BUFFER, 0, 0);