summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv10
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-01-29 21:43:15 -0500
committerZack Rusin <[email protected]>2009-01-29 21:43:15 -0500
commitb3028acd98e2b7fd09344f9005c5b20bba91262c (patch)
tree78fcf2c5088b69e2fd4f31bea305a36581080e56 /src/gallium/drivers/nv10
parent444e98de31c5456008a4b3568373db02ddc5385f (diff)
gallium: give the screen priority when it comes to buffer allocations
allows the driver to overwrite buffer allocation, first step on the way to making winsys interface internal to the drivers. state trackers and the code above it will go through the screen
Diffstat (limited to 'src/gallium/drivers/nv10')
-rw-r--r--src/gallium/drivers/nv10/nv10_miptree.c2
-rw-r--r--src/gallium/drivers/nv10/nv10_prim_vbuf.c6
-rw-r--r--src/gallium/drivers/nv10/nv10_screen.c4
-rw-r--r--src/gallium/drivers/nv10/nv10_state.c4
-rw-r--r--src/gallium/drivers/nv10/nv10_vbo.c8
5 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/nv10/nv10_miptree.c b/src/gallium/drivers/nv10/nv10_miptree.c
index f8c021261bc..384f89c3918 100644
--- a/src/gallium/drivers/nv10/nv10_miptree.c
+++ b/src/gallium/drivers/nv10/nv10_miptree.c
@@ -65,7 +65,7 @@ nv10_miptree_create(struct pipe_screen *screen, const struct pipe_texture *pt)
nv10_miptree_layout(mt);
- mt->buffer = ws->buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
+ mt->buffer = ws->_buffer_create(ws, 256, PIPE_BUFFER_USAGE_PIXEL,
mt->total_size);
if (!mt->buffer) {
FREE(mt);
diff --git a/src/gallium/drivers/nv10/nv10_prim_vbuf.c b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
index e7e81d3dff8..bdffaacf78c 100644
--- a/src/gallium/drivers/nv10/nv10_prim_vbuf.c
+++ b/src/gallium/drivers/nv10/nv10_prim_vbuf.c
@@ -111,11 +111,11 @@ nv10_vbuf_render_allocate_vertices( struct vbuf_render *render,
size_t size = (size_t)vertex_size * (size_t)nr_vertices;
assert(!nv10_render->buffer);
- nv10_render->buffer = winsys->buffer_create(winsys, 64, PIPE_BUFFER_USAGE_VERTEX, size);
+ nv10_render->buffer = winsys->_buffer_create(winsys, 64, PIPE_BUFFER_USAGE_VERTEX, size);
nv10->dirty |= NV10_NEW_VTXARRAYS;
- return winsys->buffer_map(winsys,
+ return winsys->_buffer_map(winsys,
nv10_render->buffer,
PIPE_BUFFER_USAGE_CPU_WRITE);
}
@@ -187,7 +187,7 @@ nv10_vbuf_render_release_vertices( struct vbuf_render *render,
struct pipe_screen *pscreen = &nv10->screen->pipe;
assert(nv10_render->buffer);
- winsys->buffer_unmap(winsys, nv10_render->buffer);
+ winsys->_buffer_unmap(winsys, nv10_render->buffer);
pipe_buffer_reference(pscreen, &nv10_render->buffer, NULL);
}
diff --git a/src/gallium/drivers/nv10/nv10_screen.c b/src/gallium/drivers/nv10/nv10_screen.c
index 4d9fbd4b5f6..333e0b3252f 100644
--- a/src/gallium/drivers/nv10/nv10_screen.c
+++ b/src/gallium/drivers/nv10/nv10_screen.c
@@ -122,7 +122,7 @@ nv10_surface_map(struct pipe_screen *screen, struct pipe_surface *surface,
struct pipe_winsys *ws = screen->winsys;
void *map;
- map = ws->buffer_map(ws, surface->buffer, flags);
+ map = ws->_buffer_map(ws, surface->buffer, flags);
if (!map)
return NULL;
@@ -134,7 +134,7 @@ nv10_surface_unmap(struct pipe_screen *screen, struct pipe_surface *surface)
{
struct pipe_winsys *ws = screen->winsys;
- ws->buffer_unmap(ws, surface->buffer);
+ ws->_buffer_unmap(ws, surface->buffer);
}
static void
diff --git a/src/gallium/drivers/nv10/nv10_state.c b/src/gallium/drivers/nv10/nv10_state.c
index 119af66dfd0..f84d45a7309 100644
--- a/src/gallium/drivers/nv10/nv10_state.c
+++ b/src/gallium/drivers/nv10/nv10_state.c
@@ -468,12 +468,12 @@ nv10_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index,
if (buf) {
void *mapped;
if (buf->buffer && buf->buffer->size &&
- (mapped = ws->buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
+ (mapped = ws->_buffer_map(ws, buf->buffer, PIPE_BUFFER_USAGE_CPU_READ)))
{
memcpy(nv10->constbuf[shader], mapped, buf->buffer->size);
nv10->constbuf_nr[shader] =
buf->buffer->size / (4 * sizeof(float));
- ws->buffer_unmap(ws, buf->buffer);
+ ws->_buffer_unmap(ws, buf->buffer);
}
}
}
diff --git a/src/gallium/drivers/nv10/nv10_vbo.c b/src/gallium/drivers/nv10/nv10_vbo.c
index d0e788ac036..a6b80e40507 100644
--- a/src/gallium/drivers/nv10/nv10_vbo.c
+++ b/src/gallium/drivers/nv10/nv10_vbo.c
@@ -25,7 +25,7 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
if (nv10->vtxbuf[i].buffer) {
void *buf
- = pipe->winsys->buffer_map(pipe->winsys,
+ = pipe->winsys->_buffer_map(pipe->winsys,
nv10->vtxbuf[i].buffer,
PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_vertex_buffer(draw, i, buf);
@@ -34,7 +34,7 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
/* Map index buffer, if present */
if (indexBuffer) {
void *mapped_indexes
- = pipe->winsys->buffer_map(pipe->winsys, indexBuffer,
+ = pipe->winsys->_buffer_map(pipe->winsys, indexBuffer,
PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
}
@@ -55,12 +55,12 @@ boolean nv10_draw_elements( struct pipe_context *pipe,
*/
for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
if (nv10->vtxbuf[i].buffer) {
- pipe->winsys->buffer_unmap(pipe->winsys, nv10->vtxbuf[i].buffer);
+ pipe->winsys->_buffer_unmap(pipe->winsys, nv10->vtxbuf[i].buffer);
draw_set_mapped_vertex_buffer(draw, i, NULL);
}
}
if (indexBuffer) {
- pipe->winsys->buffer_unmap(pipe->winsys, indexBuffer);
+ pipe->winsys->_buffer_unmap(pipe->winsys, indexBuffer);
draw_set_mapped_element_buffer(draw, 0, NULL);
}