diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-04-30 16:45:16 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-05-02 12:16:25 -0400 |
commit | 3df4d692f3282f134bb154af41be0512897d8571 (patch) | |
tree | ec986278c8c882e45fb555b7b42d024988c7d1cb /src/gallium/drivers/nouveau/nv50/nv50_context.c | |
parent | b0d02db7e02d3007bd5635278fbcd11d84c914e5 (diff) | |
download | external_mesa3d-3df4d692f3282f134bb154af41be0512897d8571.zip external_mesa3d-3df4d692f3282f134bb154af41be0512897d8571.tar.gz external_mesa3d-3df4d692f3282f134bb154af41be0512897d8571.tar.bz2 |
nouveau: add ARB_buffer_storage support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_context.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_context.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index ae1fcc5..52e14bf 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -57,6 +57,26 @@ nv50_texture_barrier(struct pipe_context *pipe) PUSH_DATA (push, 0x20); } +static void +nv50_memory_barrier(struct pipe_context *pipe, unsigned flags) +{ + struct nv50_context *nv50 = nv50_context(pipe); + int i; + + if (flags & PIPE_BARRIER_MAPPED_BUFFER) { + for (i = 0; i < nv50->num_vtxbufs; ++i) { + if (!nv50->vtxbuf[i].buffer) + continue; + if (nv50->vtxbuf[i].buffer->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) + nv50->base.vbo_dirty = TRUE; + } + + if (nv50->idxbuf.buffer && + nv50->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) + nv50->base.vbo_dirty = TRUE; + } +} + void nv50_default_kick_notify(struct nouveau_pushbuf *push) { @@ -249,6 +269,7 @@ nv50_create(struct pipe_screen *pscreen, void *priv) pipe->flush = nv50_flush; pipe->texture_barrier = nv50_texture_barrier; + pipe->memory_barrier = nv50_memory_barrier; pipe->get_sample_position = nv50_context_get_sample_position; if (!screen->cur_ctx) { |