diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-01 11:28:47 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-01 12:00:45 +0100 |
commit | 27e46611f04108765fa99890822a474820d5c563 (patch) | |
tree | 1c4a98fc2895da0543e54c2f3a1989114e958ae1 /src/gallium/drivers/softpipe/sp_draw_arrays.c | |
parent | c9ed86a96483063f3d6789ed16645a3dca77d726 (diff) |
softpipe: use CPU flags for mapping
But when creating surfaces, adjust incoming flags from GPU->CPU usage.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_draw_arrays.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_draw_arrays.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index 355c120d18..6c58f9909d 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -50,7 +50,7 @@ softpipe_map_constant_buffers(struct softpipe_context *sp) for (i = 0; i < 2; i++) { if (sp->constants[i].size) sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer, - PIPE_BUFFER_USAGE_GPU_READ); + PIPE_BUFFER_USAGE_CPU_READ); } draw_set_mapped_constant_buffer(sp->draw, @@ -133,14 +133,14 @@ softpipe_draw_elements(struct pipe_context *pipe, void *buf = pipe->winsys->buffer_map(pipe->winsys, sp->vertex_buffer[i].buffer, - PIPE_BUFFER_USAGE_GPU_READ); + PIPE_BUFFER_USAGE_CPU_READ); draw_set_mapped_vertex_buffer(draw, i, buf); } /* Map index buffer, if present */ if (indexBuffer) { void *mapped_indexes = pipe->winsys->buffer_map(pipe->winsys, indexBuffer, - PIPE_BUFFER_USAGE_GPU_READ); + PIPE_BUFFER_USAGE_CPU_READ); draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes); } else { |