summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/galahad
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/galahad')
-rw-r--r--src/gallium/drivers/galahad/glhd_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index 7a856ef5e1..5531f579ec 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -119,6 +119,16 @@ galahad_create_query(struct pipe_context *_pipe,
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ if (query_type == PIPE_QUERY_OCCLUSION_COUNTER &&
+ !pipe->screen->get_param(pipe->screen, PIPE_CAP_OCCLUSION_QUERY)) {
+ glhd_error("Occlusion query requested but not supported");
+ }
+
+ if (query_type == PIPE_QUERY_TIME_ELAPSED &&
+ !pipe->screen->get_param(pipe->screen, PIPE_CAP_TIMER_QUERY)) {
+ glhd_error("Timer query requested but not supported");
+ }
+
return pipe->create_query(pipe,
query_type);
}