summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-02-10 19:22:57 +0000
committerKeith Whitwell <keithw@vmware.com>2009-02-10 19:22:57 +0000
commit9c9ba66fbae8089e9423f6b09ad1091cccf9b006 (patch)
tree81ecce3d6b19e5b77fcf31e5f081e1c546f398b9 /src/gallium/drivers/cell/ppu/cell_draw_arrays.c
parentebb864da9e98003be9ea388013ae4385d341e46f (diff)
parent1e8177ee178b131afa86d874b062a8ae3fae0cca (diff)
Merge commit 'origin/gallium-0.2' into gallium-0.2
Conflicts: src/gallium/state_trackers/wgl/icd/stw_icd.c
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_draw_arrays.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_draw_arrays.c6
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 67949b73dd..644496db40 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;
}