The index buffer handle saved in the hw_state structure could
be invalid after the index buffer is destroyed. Instead of
rebinding the index buffer using the saved index buffer handle,
we will reset the index buffer handle in the hw_state structure
to force resending of the index buffer.
Fixes bug
1593320
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
if (ret != PIPE_OK)
return ret;
- /* Rebind index buffer */
- if (svga->state.hw_draw.ib) {
- struct svga_winsys_context *swc = svga->swc;
- ret = swc->resource_rebind(swc, svga->state.hw_draw.ib, NULL, SVGA_RELOC_READ);
- if (ret != PIPE_OK)
- return ret;
- }
+ /* Force rebinding the index buffer when needed */
+ svga->state.hw_draw.ib = NULL;
}
ret = validate_sampler_resources(svga);