Mesa (master): panfrost: move #include to fix compilation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Mar 10 03:02:01 UTC 2019


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

Author: Eric Engestrom <eric.engestrom at intel.com>
Date:   Sat Mar  9 22:27:51 2019 +0000

panfrost: move #include to fix compilation

In standalone.h, the struct gl_context type is not declared by #includ'ing
mtypes.h:

In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24:
src/compiler/glsl/standalone.h:46:14: warning: ‘struct gl_context’ declared inside parameter list will not be visible outside of this definition or declaration
       struct gl_context *ctx);
              ^~~~~~~~~~

This causes the following compilation failure:

src/gallium/drivers/panfrost/midgard/cmdline.c: In function ‘compile_shader’:
src/gallium/drivers/panfrost/midgard/cmdline.c:58:61: error: passing argument 4 of ‘standalone_compile_shader’ from incompatible pointer type [-Werror=incompatible-pointer-types]
         prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
                                                             ^~~~~~~~~~
In file included from src/gallium/drivers/panfrost/midgard/cmdline.c:24:
src/compiler/glsl/standalone.h:43:28: note: expected ‘struct gl_context *’ but argument is of type ‘struct gl_context *’
 struct gl_shader_program * standalone_compile_shader(
                            ^~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: e67e0726372ab65f4104 "panfrost: Implement Midgard shader toolchain"
Cc: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>

---

 src/gallium/drivers/panfrost/midgard/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/midgard/cmdline.c b/src/gallium/drivers/panfrost/midgard/cmdline.c
index acd810b2f34..8d7463d783f 100644
--- a/src/gallium/drivers/panfrost/midgard/cmdline.c
+++ b/src/gallium/drivers/panfrost/midgard/cmdline.c
@@ -21,13 +21,13 @@
  * SOFTWARE.
  */
 
+#include "main/mtypes.h"
 #include "compiler/glsl/standalone.h"
 #include "compiler/glsl/glsl_to_nir.h"
 #include "compiler/nir_types.h"
 #include "midgard_compile.h"
 #include "disassemble.h"
 #include "util/u_dynarray.h"
-#include "main/mtypes.h"
 
 bool c_do_mat_op_to_vec(struct exec_list *instructions);
 




More information about the mesa-commit mailing list