summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/panfrost/pan_screen.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-07-15 11:30:35 -0700
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-07-15 16:12:55 -0700
commitfae790ecfcd0f73c6512e52a2e430ed1ce7f5b12 (patch)
tree9b8bf7874d11ff3d902c949a5ae00103f6d0fcab /src/gallium/drivers/panfrost/pan_screen.h
parent0ba508d7a3b6a006b5b8db1e865d33efc8d0abd5 (diff)
panfrost: Allocate UBOs on the stack, not the heap
Saves a call to calloc (the maximum size is small and known at compile-time) and fixes a leak. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_screen.h')
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index 3a0e544c1a6..a0c6e2df63d 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -42,6 +42,9 @@ struct panfrost_context;
struct panfrost_resource;
struct panfrost_screen;
+/* Driver limits */
+#define PAN_MAX_CONST_BUFFERS 16
+
/* Flags for allocated memory */
/* This memory region is executable */