panfrost: Pass compiler-appropriate options
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 8 Apr 2020 23:05:57 +0000 (19:05 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 10 Apr 2020 14:53:54 +0000 (16:53 +0200)
FMAs need to fuse for Bifrost.

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

src/gallium/drivers/panfrost/pan_screen.c

index 0c40ff67c7396f5c54b371eabae87d094c665f9f..866c23adc93dfa3328769889345ad58e2f47d6d8 100644 (file)
@@ -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 *