Mesa (master): nv50: fix vtxbuf cleanup

Ilia Mirkin imirkin at kemper.freedesktop.org
Sat May 20 08:21:04 UTC 2017


Module: Mesa
Branch: master
Commit: 85d21863266ce192a3368ef58f5a17a26ef79c3b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=85d21863266ce192a3368ef58f5a17a26ef79c3b

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Sat May 20 04:17:22 2017 -0400

nv50: fix vtxbuf cleanup

Use a user-buffer-aware cleanup function.

Fixes: c24c3b94ed ("gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytes")
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/gallium/drivers/nouveau/nv50/nv50_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c
index d2c37ac276..1ca6a0a178 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_context.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c
@@ -140,7 +140,7 @@ nv50_context_unreference_resources(struct nv50_context *nv50)
 
    assert(nv50->num_vtxbufs <= PIPE_MAX_ATTRIBS);
    for (i = 0; i < nv50->num_vtxbufs; ++i)
-      pipe_resource_reference(&nv50->vtxbuf[i].buffer.resource, NULL);
+      pipe_vertex_buffer_unreference(&nv50->vtxbuf[i]);
 
    for (s = 0; s < 3; ++s) {
       assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);




More information about the mesa-commit mailing list