summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c8
-rw-r--r--src/gallium/drivers/nv50/nv50_query.c8
-rw-r--r--src/gallium/drivers/nv50/nv50_vbo.c8
3 files changed, 14 insertions, 10 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 9d6427e2bc8..5f7d06dbecb 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -2235,7 +2235,7 @@ nv50_program_upload_data(struct nv50_context *nv50, float *map,
static void
nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
{
- struct pipe_winsys *ws = nv50->pipe.winsys;
+ struct pipe_screen *pscreen = nv50->pipe.screen;
if (!p->data[0] && p->immd_nr) {
struct nouveau_resource *heap = nv50->screen->immd_heap[0];
@@ -2274,13 +2274,13 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p)
if (p->param_nr) {
unsigned cbuf = NV50_CB_PVP;
- float *map = ws->buffer_map(ws, nv50->constbuf[p->type],
- PIPE_BUFFER_USAGE_CPU_READ);
+ float *map = pipe_buffer_map(pscreen, nv50->constbuf[p->type],
+ PIPE_BUFFER_USAGE_CPU_READ);
if (p->type == PIPE_SHADER_FRAGMENT)
cbuf = NV50_CB_PFP;
nv50_program_upload_data(nv50, map, p->data[1]->start,
p->param_nr, cbuf);
- ws->buffer_unmap(ws, nv50->constbuf[p->type]);
+ pipe_buffer_unmap(pscreen, nv50->constbuf[p->type]);
}
}
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c
index c77ffe84e73..f57540150a8 100644
--- a/src/gallium/drivers/nv50/nv50_query.c
+++ b/src/gallium/drivers/nv50/nv50_query.c
@@ -105,7 +105,7 @@ static boolean
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
boolean wait, uint64_t *result)
{
- struct pipe_winsys *ws = pipe->winsys;
+ struct pipe_screen *pscreen = pipe->screen;
struct nv50_query *q = nv50_query(pq);
/*XXX: Want to be able to return FALSE here instead of blocking
@@ -113,11 +113,11 @@ nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
*/
if (!q->ready) {
- uint32_t *map = ws->buffer_map(ws, q->buffer,
- PIPE_BUFFER_USAGE_CPU_READ);
+ uint32_t *map = pipe_buffer_map(pscreen, q->buffer,
+ PIPE_BUFFER_USAGE_CPU_READ);
q->result = map[1];
q->ready = TRUE;
- ws->buffer_unmap(ws, q->buffer);
+ pipe_buffer_unmap(pscreen, q->buffer);
}
*result = q->result;
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index a9b53a0f2e3..f81929f2387 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -22,6 +22,7 @@
#include "pipe/p_context.h"
#include "pipe/p_state.h"
+#include "pipe/p_inlines.h"
#include "nv50_context.h"
@@ -165,8 +166,10 @@ nv50_draw_elements(struct pipe_context *pipe,
struct nv50_context *nv50 = nv50_context(pipe);
struct nouveau_channel *chan = nv50->screen->tesla->channel;
struct nouveau_grobj *tesla = nv50->screen->tesla;
- struct pipe_winsys *ws = pipe->winsys;
- void *map = ws->buffer_map(ws, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
+ struct pipe_screen *pscreen = pipe->screen;
+ void *map;
+
+ map = pipe_buffer_map(pscreen, indexBuffer, PIPE_BUFFER_USAGE_CPU_READ);
nv50_state_validate(nv50);
@@ -193,6 +196,7 @@ nv50_draw_elements(struct pipe_context *pipe,
BEGIN_RING(chan, tesla, NV50TCL_VERTEX_END, 1);
OUT_RING (chan, 0);
+ pipe_buffer_unmap(pscreen, indexBuffer);
pipe->flush(pipe, 0, NULL);
return TRUE;
}