summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-02-22 08:53:47 -0700
committerBrian Paul <brianp@vmware.com>2016-02-22 12:14:48 -0700
commit9de3b0273d4fc01f5fdb5e9c9301a42575694d88 (patch)
tree452e9096beffbabfea50ab7fe49549ba54a47942 /src/gallium
parent571bd9ac4280b0d3c10281e9899afb33bc67d589 (diff)
downloadexternal_mesa3d-9de3b0273d4fc01f5fdb5e9c9301a42575694d88.zip
external_mesa3d-9de3b0273d4fc01f5fdb5e9c9301a42575694d88.tar.gz
external_mesa3d-9de3b0273d4fc01f5fdb5e9c9301a42575694d88.tar.bz2
svga: unbind index buffer when drawing non-indexed primitives
Silences a warning reported by the svga3d device. v2: also null-out the index buffer pointer Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_draw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 80526ed..fe6cf71 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -590,6 +590,16 @@ draw_vgpu10(struct svga_hwtnl *hwtnl,
}
else {
/* non-indexed drawing */
+ if (svga->state.hw_draw.ib_format != SVGA3D_FORMAT_INVALID) {
+ /* Unbind previously bound index buffer */
+ ret = SVGA3D_vgpu10_SetIndexBuffer(svga->swc, NULL,
+ SVGA3D_FORMAT_INVALID, 0);
+ if (ret != PIPE_OK)
+ return ret;
+ svga->state.hw_draw.ib_format = SVGA3D_FORMAT_INVALID;
+ svga->state.hw_draw.ib = NULL;
+ }
+
if (instance_count > 1) {
ret = SVGA3D_vgpu10_DrawInstanced(svga->swc,
vcount,