Mesa (master): panfrost: Only advertise INDIRECT_DRAW if the kernel supports HEAP BOs
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 22 20:22:12 UTC 2021
Module: Mesa
Branch: master
Commit: 5742493650e849259601fb5b3bd2367a8f39cc89
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5742493650e849259601fb5b3bd2367a8f39cc89
Author: Boris Brezillon <boris.brezillon at collabora.com>
Date: Wed Apr 21 18:04:34 2021 +0200
panfrost: Only advertise INDIRECT_DRAW if the kernel supports HEAP BOs
The indirect draw implementation uses a HEAP pool to allocate varyings.
Don't advertise INDIRECT_DRAW if the kernel doesn't support allocating
HEAP BOs.
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375>
---
src/gallium/drivers/panfrost/pan_screen.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index 67d25e89951..014de6fbda7 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -104,6 +104,10 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
/* Don't expose MRT related CAPs on GPUs that don't implement them */
bool has_mrt = !(dev->quirks & MIDGARD_SFBD);
+ /* Only kernel drivers >= 1.1 can allocate HEAP BOs */
+ bool has_heap = dev->kernel_version->version_major > 1 ||
+ dev->kernel_version->version_minor >= 1;
+
/* Bifrost is WIP */
switch (param) {
case PIPE_CAP_NPOT_TEXTURES:
@@ -304,7 +308,7 @@ panfrost_get_param(struct pipe_screen *screen, enum pipe_cap param)
return 0;
case PIPE_CAP_DRAW_INDIRECT:
- return is_deqp;
+ return has_heap && is_deqp;
default:
return u_pipe_screen_get_param_defaults(screen, param);
More information about the mesa-commit
mailing list