Mesa (master): panfrost: Pass compiler-appropriate options

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 10 15:11:42 UTC 2020


Module: Mesa
Branch: master
Commit: 23620d183035b068fe7dbda99fdc629264ca2d9e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23620d183035b068fe7dbda99fdc629264ca2d9e

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Wed Apr  8 19:05:57 2020 -0400

panfrost: Pass compiler-appropriate options

FMAs need to fuse for Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>

---

 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 0c40ff67c73..866c23adc93 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -52,6 +52,7 @@
 
 #include "pan_context.h"
 #include "midgard/midgard_compile.h"
+#include "bifrost/bifrost_compile.h"
 #include "panfrost-quirks.h"
 
 static const struct debug_named_value debug_options[] = {
@@ -701,7 +702,10 @@ panfrost_screen_get_compiler_options(struct pipe_screen *pscreen,
                                      enum pipe_shader_ir ir,
                                      enum pipe_shader_type shader)
 {
-        return &midgard_nir_options;
+        if (pan_device(pscreen)->quirks & IS_BIFROST)
+                return &bifrost_nir_options;
+        else
+                return &midgard_nir_options;
 }
 
 struct pipe_screen *



More information about the mesa-commit mailing list