aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_query.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-05-22 09:32:42 +1000
committerDave Airlie <[email protected]>2019-01-31 11:23:38 +1000
commit9279a28f07fd65fa94831f7f9fb80b35921f6805 (patch)
tree7ca3776a22df8debf1a56032c312b14f86b40acf /src/gallium/drivers/virgl/virgl_query.c
parent38658c6d4dda1df12690c1f4c01b993862d6fe68 (diff)
virgl: ARB_query_buffer_object support
v1.1: fix size define. Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_query.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_query.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_query.c b/src/gallium/drivers/virgl/virgl_query.c
index a75b29c7c9b..23e24c53b02 100644
--- a/src/gallium/drivers/virgl/virgl_query.c
+++ b/src/gallium/drivers/virgl/virgl_query.c
@@ -205,6 +205,22 @@ virgl_set_active_query_state(struct pipe_context *pipe, boolean enable)
{
}
+static void
+virgl_get_query_result_resource(struct pipe_context *ctx,
+ struct pipe_query *q,
+ boolean wait,
+ enum pipe_query_value_type result_type,
+ int index,
+ struct pipe_resource *resource,
+ unsigned offset)
+{
+ struct virgl_context *vctx = virgl_context(ctx);
+ struct virgl_query *query = virgl_query(q);
+ struct virgl_resource *qbo = (struct virgl_resource *)resource;
+
+ virgl_encode_get_query_result_qbo(vctx, query->handle, qbo, wait, result_type, offset, index);
+}
+
void virgl_init_query_functions(struct virgl_context *vctx)
{
vctx->base.render_condition = virgl_render_condition;
@@ -214,4 +230,5 @@ void virgl_init_query_functions(struct virgl_context *vctx)
vctx->base.end_query = virgl_end_query;
vctx->base.get_query_result = virgl_get_query_result;
vctx->base.set_active_query_state = virgl_set_active_query_state;
+ vctx->base.get_query_result_resource = virgl_get_query_result_resource;
}