summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv30
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-05-24 11:56:21 -0400
committerIlia Mirkin <[email protected]>2015-05-25 14:11:16 -0400
commit89585edf3c01c94b62d163adf0209568efa68568 (patch)
tree890e767b212dc1bc1f2ea9daa84453833130b485 /src/gallium/drivers/nouveau/nv30
parentcc3d2755577dab8c930f0bccff2756cb92aef8bc (diff)
nv30/draw: avoid leaving stale pointers in draw state
Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.5 10.6" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_draw.c8
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 74f0d66df95..8db15c6c059 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]);
}