panfrost: Use transient memory for occlusion queries
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 12 Jul 2019 23:38:11 +0000 (16:38 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 15 Jul 2019 15:03:34 +0000 (08:03 -0700)
These only last a frame anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_context.c

index 710752f6cb5dde39d8b2b2e0fe5e4acc71269873..d8faaa39bc255f4f3a6f103b9bd093c3ca52feba 100644 (file)
@@ -2538,7 +2538,7 @@ panfrost_begin_query(struct pipe_context *pipe, struct pipe_query *q)
         case PIPE_QUERY_OCCLUSION_PREDICATE:
         case PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE: {
                 /* Allocate a word for the query results to be stored */
-                query->transfer = panfrost_allocate_chunk(ctx, sizeof(unsigned), HEAP_DESCRIPTOR);
+                query->transfer = panfrost_allocate_transient(ctx, sizeof(unsigned));
 
                 ctx->occlusion_query = query;