summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_context.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-08 07:01:12 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-13 09:42:48 -0700
commit7c224c10083e5a3cb109dd559497e846dd5d3ea2 (patch)
tree32427f2996e0d98371073287381fb3d7382022cf /src/gallium/drivers/panfrost/pan_context.h
parent72d086fc361b80b36eae3b111f7535af43153ba1 (diff)
panfrost: Implement callbacks for PRIMITIVES queries
We're just going to compute them in the driver but let's get the structures setup to handle them. Implementation from v3d. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_context.h')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h
index 1277629382a..3eac35023ce 100644
--- a/src/gallium/drivers/panfrost/pan_context.h
+++ b/src/gallium/drivers/panfrost/pan_context.h
@@ -79,8 +79,16 @@ struct panfrost_query {
unsigned type;
unsigned index;
- /* Memory for the GPU to writeback the value of the query */
- struct panfrost_transfer transfer;
+ union {
+ /* For computed queries. 64-bit to prevent overflow */
+ struct {
+ uint64_t start;
+ uint64_t end;
+ };
+
+ /* Memory for the GPU to writeback the value of the query */
+ struct panfrost_transfer transfer;
+ };
};
struct panfrost_fence {
@@ -123,6 +131,9 @@ struct panfrost_context {
struct panfrost_memory tiler_dummy;
struct panfrost_memory depth_stencil_buffer;
+ bool active_queries;
+ uint64_t prims_generated;
+ uint64_t tf_prims_generated;
struct panfrost_query *occlusion_query;
/* Each draw has corresponding vertex and tiler payloads */