summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-05-29 12:38:49 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-05-29 12:38:49 +0100
commitbb2e13b9e82b68ec3b9fc56a4c35e7ead8fd138f (patch)
tree65f387b426dcd113f602d9a51ef6fc8d1652200f /src/gallium/drivers
parent82605d7bcd533d7c96cc619c45970efd7229dc3b (diff)
draw: make sure constant buffer data is aligned before passing to aos.c
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i915simple/i915_context.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_draw_arrays.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915simple/i915_context.c b/src/gallium/drivers/i915simple/i915_context.c
index 4bef21619c..c609d16a5a 100644
--- a/src/gallium/drivers/i915simple/i915_context.c
+++ b/src/gallium/drivers/i915simple/i915_context.c
@@ -86,7 +86,9 @@ i915_draw_elements( struct pipe_context *pipe,
draw_set_mapped_constant_buffer(draw,
- i915->current.constants[PIPE_SHADER_VERTEX]);
+ i915->current.constants[PIPE_SHADER_VERTEX],
+ ( i915->current.num_user_constants[PIPE_SHADER_VERTEX] *
+ 4 * sizeof(float) ));
/* draw! */
draw_arrays(i915->draw, prim, start, count);
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index dbecf6865f..d4d5fa744f 100644
--- a/src/gallium/drivers/softpipe/sp_draw_arrays.c
+++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c
@@ -54,7 +54,8 @@ softpipe_map_constant_buffers(struct softpipe_context *sp)
}
draw_set_mapped_constant_buffer(sp->draw,
- sp->mapped_constants[PIPE_SHADER_VERTEX]);
+ sp->mapped_constants[PIPE_SHADER_VERTEX],
+ sp->constants[i].size);
}
static void
@@ -68,7 +69,7 @@ softpipe_unmap_constant_buffers(struct softpipe_context *sp)
*/
draw_flush(sp->draw);
- draw_set_mapped_constant_buffer(sp->draw, NULL);
+ draw_set_mapped_constant_buffer(sp->draw, NULL, 0);
for (i = 0; i < 2; i++) {
if (sp->constants[i].size)