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

Author: Charmaine Lee <[email protected]>
Date:   Tue Jan 26 11:12:09 2016 -0800

svga: Fix the index buffer rebind regression

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 <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>

---

 src/gallium/drivers/svga/svga_draw.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_draw.c 
b/src/gallium/drivers/svga/svga_draw.c
index 96f8238..0b9ea88 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -464,13 +464,8 @@ draw_vgpu10(struct svga_hwtnl *hwtnl,
       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);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to