diff options
author | Charmaine Lee <[email protected]> | 2016-01-19 20:25:39 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-03-21 13:37:40 -0600 |
commit | 47cfc83440c3030999a08c0b5fccae860294608c (patch) | |
tree | 5e653b7d0ba4675fbee5a0f74f144591202daddd /src/gallium/drivers/svga/svga_draw.c | |
parent | 299f8ca0a7f723dfbf757385c8c7c221c3b87683 (diff) |
svga: rebind index buffer
Similar to other resources, current index buffer needs to be
rebound at the first draw of the current command buffer to make
sure the buffer is available for the draw command.
Fixes bug 1587263.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_draw.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index fe6cf71a6e5..3eda09acc7c 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -458,6 +458,14 @@ draw_vgpu10(struct svga_hwtnl *hwtnl, ret = svga_rebind_shaders(svga); 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; + } } ret = validate_sampler_resources(svga); |