mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
iris: Properly unreference extra VBOs for draw parameters
bound_vertex_buffers doesn't include extra draw parameters buffers. Tracking this correctly is kind of complicated, and iris_destroy_state isn't exactly in a hot path, so just loop over all VBO bindings. Fixes:4122665dd9(iris: Enable ARB_shader_draw_parameters support) Reported-by: Sergii Romantsov <sergii.romantsov@globallogic.com> (cherry picked from commitface221283)
This commit is contained in:
parent
3e15620451
commit
aa89c0a2bd
1 changed files with 3 additions and 3 deletions
|
|
@ -5845,11 +5845,11 @@ iris_destroy_state(struct iris_context *ice)
|
|||
pipe_resource_reference(&ice->draw.draw_params_res, NULL);
|
||||
pipe_resource_reference(&ice->draw.derived_draw_params_res, NULL);
|
||||
|
||||
uint64_t bound_vbs = ice->state.bound_vertex_buffers;
|
||||
while (bound_vbs) {
|
||||
const int i = u_bit_scan64(&bound_vbs);
|
||||
/* Loop over all VBOs, including ones for draw parameters */
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(genx->vertex_buffers); i++) {
|
||||
pipe_resource_reference(&genx->vertex_buffers[i].resource, NULL);
|
||||
}
|
||||
|
||||
free(ice->state.genx);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue