summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/translate
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2017-08-24 10:40:28 -0600
committerBrian Paul <[email protected]>2017-08-25 20:26:52 -0600
commitd819b1fcec02be5e0cfc87b6246833a2a2d5f034 (patch)
tree451c207d8fa99b9a4efadaed142bd8e17d4c43cd /src/gallium/auxiliary/translate
parent42d62e61bc06ac4d51c75405769a66291728560e (diff)
gallium/vbuf: fix buffer reference bugs
In two places we called pipe_resource_reference() to remove a reference to a vertex buffer resource. But we neglected to check if the buffer was a user buffer and not a pipe_resource. This caused us to pass an invalid pipe_resource pointer to pipe_resource_reference(). Instead of calling pipe_resource_reference(&vbuf->resource, NULL), use pipe_vertex_buffer_unreference(&vbuf) which checks the is_user_buffer field and does the right thing. Also, explicity set the is_user_buffer field to false after setting the vbuf->resource pointer to out_buffer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102377 Reviewed-by: Marek Olšák <[email protected]> Tested-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/translate')
0 files changed, 0 insertions, 0 deletions