aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_pipe_query.c
diff options
context:
space:
mode:
authorNeha Bhende <[email protected]>2016-06-28 12:59:19 -0700
committerBrian Paul <[email protected]>2016-06-30 12:45:09 -0600
commit7988513ac3d86ba367fbe44e73fe483ff96aaa29 (patch)
tree11d834c70c72821dd33098b7fbb3152f3364bddc /src/gallium/drivers/svga/svga_pipe_query.c
parent52f297d144de69d494b5573920c33902063d3628 (diff)
svga: Fix failures caused in fedora 24
SVGA_3D_CMD_DX_GENRATE_MIPMAP & SVGA_3D_CMD_DX_SET_PREDICATION commands are not presents in fedora 24 kernel module. Because of this reason application like supertuxkart are not running. v2: Add few comments and code modifications suggested by Brian P. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_query.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_query.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c
index 4febf9bd510..65e58fe0e68 100644
--- a/src/gallium/drivers/svga/svga_pipe_query.c
+++ b/src/gallium/drivers/svga/svga_pipe_query.c
@@ -1219,13 +1219,19 @@ svga_render_condition(struct pipe_context *pipe, struct pipe_query *q,
sws->fence_finish(sws, sq->fence, SVGA_FENCE_FLAG_QUERY);
}
}
-
- ret = SVGA3D_vgpu10_SetPredication(svga->swc, queryId,
- (uint32) condition);
- if (ret != PIPE_OK) {
- svga_context_flush(svga, NULL);
+ /*
+ * if the kernel module doesn't support the predication command,
+ * we'll just render unconditionally.
+ * This is probably acceptable for the typical case of occlusion culling.
+ */
+ if (sws->have_set_predication_cmd) {
ret = SVGA3D_vgpu10_SetPredication(svga->swc, queryId,
(uint32) condition);
+ if (ret != PIPE_OK) {
+ svga_context_flush(svga, NULL);
+ ret = SVGA3D_vgpu10_SetPredication(svga->swc, queryId,
+ (uint32) condition);
+ }
}
}