summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-08-29 20:34:01 +0100
committerJosé Fonseca <[email protected]>2009-08-30 12:37:03 +0100
commit379304a72cf332e2d570b13663bb447ec7a12940 (patch)
treed68949abc0c20e543435cdad45be293b0abfeb81 /src/gallium
parentd336ef410afddfdfb665dae7001c2995e2d2a70d (diff)
llvmpipe: Eliminate internal pipe_buffer_map/unmap usage.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 0f75afc79be..89772e62d31 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -37,6 +37,7 @@
#include "pipe/p_inlines.h"
#include "util/u_prim.h"
+#include "lp_buffer.h"
#include "lp_context.h"
#include "lp_state.h"
@@ -129,18 +130,13 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe,
* Map vertex buffers
*/
for (i = 0; i < lp->num_vertex_buffers; i++) {
- void *buf
- = pipe_buffer_map(pipe->screen,
- lp->vertex_buffer[i].buffer,
- PIPE_BUFFER_USAGE_CPU_READ);
+ void *buf = llvmpipe_buffer(lp->vertex_buffer[i].buffer)->data;
draw_set_mapped_vertex_buffer(draw, i, buf);
}
/* Map index buffer, if present */
if (indexBuffer) {
- void *mapped_indexes
- = pipe_buffer_map(pipe->screen, indexBuffer,
- PIPE_BUFFER_USAGE_CPU_READ);
+ void *mapped_indexes = llvmpipe_buffer(indexBuffer)->data;
draw_set_mapped_element_buffer_range(draw, indexSize,
min_index,
max_index,
@@ -160,11 +156,9 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe,
*/
for (i = 0; i < lp->num_vertex_buffers; i++) {
draw_set_mapped_vertex_buffer(draw, i, NULL);
- pipe_buffer_unmap(pipe->screen, lp->vertex_buffer[i].buffer);
}
if (indexBuffer) {
draw_set_mapped_element_buffer(draw, 0, NULL);
- pipe_buffer_unmap(pipe->screen, indexBuffer);
}