Mesa (gallium-0.2): cell: compile fix: pipe_constant_buffer no longer has size field
Brian Paul
brianp at kemper.freedesktop.org
Sat Feb 7 20:05:51 UTC 2009
Module: Mesa
Branch: gallium-0.2
Commit: c2a8d73d5aa0e17fa790d4ccf404422e9e9ac119
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2a8d73d5aa0e17fa790d4ccf404422e9e9ac119
Author: Brian Paul <brianp at vmware.com>
Date: Sat Feb 7 12:59:40 2009 -0700
cell: compile fix: pipe_constant_buffer no longer has size field
---
src/gallium/drivers/cell/ppu/cell_draw_arrays.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
index 67949b7..644496d 100644
--- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
+++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
@@ -51,7 +51,7 @@ cell_map_constant_buffers(struct cell_context *sp)
struct pipe_winsys *ws = sp->pipe.winsys;
uint i;
for (i = 0; i < 2; i++) {
- if (sp->constants[i].size) {
+ if (sp->constants[i].buffer && sp->constants[i].buffer->size) {
sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
PIPE_BUFFER_USAGE_CPU_READ);
cell_flush_buffer_range(sp, sp->mapped_constants[i],
@@ -61,7 +61,7 @@ cell_map_constant_buffers(struct cell_context *sp)
draw_set_mapped_constant_buffer(sp->draw,
sp->mapped_constants[PIPE_SHADER_VERTEX],
- sp->constants[PIPE_SHADER_VERTEX].size);
+ sp->constants[PIPE_SHADER_VERTEX].buffer->size);
}
static void
@@ -70,7 +70,7 @@ cell_unmap_constant_buffers(struct cell_context *sp)
struct pipe_winsys *ws = sp->pipe.winsys;
uint i;
for (i = 0; i < 2; i++) {
- if (sp->constants[i].size)
+ if (sp->constants[i].buffer && sp->constants[i].buffer->size)
ws->buffer_unmap(ws, sp->constants[i].buffer);
sp->mapped_constants[i] = NULL;
}
More information about the mesa-commit
mailing list