diff options
author | Ilia Mirkin <[email protected]> | 2015-05-24 11:56:21 -0400 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-06-03 11:52:25 +0100 |
commit | 2d610edf5c998de8297ce1d0f3034efbbcf76ee5 (patch) | |
tree | 08d0bfea0411522ed6d2cb17d7edd104979f3ffb /src | |
parent | 0f7c9815a0897ce7da1b87a4695d2c9f867da527 (diff) |
nv30/draw: avoid leaving stale pointers in draw state
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.5 10.6" <[email protected]>
(cherry picked from commit 89585edf3c01c94b62d163adf0209568efa68568)
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_draw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c index 13aad7a4e09..145a78e0280 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c @@ -400,16 +400,16 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) void *map = nv04_resource(nv30->vertprog.constbuf)->data; draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, map, nv30->vertprog.constbuf_nr); + } else { + draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, NULL, 0); } } for (i = 0; i < nv30->num_vtxbufs; i++) { const void *map = nv30->vtxbuf[i].user_buffer; if (!map) { - if (!nv30->vtxbuf[i].buffer) { - continue; - } - map = pipe_buffer_map(pipe, nv30->vtxbuf[i].buffer, + if (nv30->vtxbuf[i].buffer) + map = pipe_buffer_map(pipe, nv30->vtxbuf[i].buffer, PIPE_TRANSFER_UNSYNCHRONIZED | PIPE_TRANSFER_READ, &transfer[i]); } |