summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2018-02-22 13:22:11 -0700
committerBrian Paul <[email protected]>2018-03-02 12:23:50 -0700
commitb871a77316f301ae0262fb38036e3583c2a464c8 (patch)
tree21a75a0d4eb37fa271ea5d43fc2471da3a2754e0 /src/gallium
parent72df3a7a3957a13c4a667ffb2295ced7b91e5620 (diff)
svga: check svga_have_vgpu10() in svga_delete_blend_state()
We were calling SVGA3D_vgpu10_DestroyBlendState() when vgpu10 was not enabled (bs->id==0 by default), resulting in lots of device errors. Reviewed-by: Neha Bhende<[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_blend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blend.c b/src/gallium/drivers/svga/svga_pipe_blend.c
index a29fbd3ac28..04855fa7c95 100644
--- a/src/gallium/drivers/svga/svga_pipe_blend.c
+++ b/src/gallium/drivers/svga/svga_pipe_blend.c
@@ -361,7 +361,7 @@ static void svga_delete_blend_state(struct pipe_context *pipe,
struct svga_blend_state *bs =
(struct svga_blend_state *) blend;
- if (bs->id != SVGA3D_INVALID_ID) {
+ if (svga_have_vgpu10(svga) && bs->id != SVGA3D_INVALID_ID) {
enum pipe_error ret;
ret = SVGA3D_vgpu10_DestroyBlendState(svga->swc, bs->id);