panfrost: move #include to fix compilation
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 9 Mar 2019 22:27:51 +0000 (22:27 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Sat, 9 Mar 2019 22:37:40 +0000 (22:37 +0000)
commite6ba67dd65c890237dd11ef43505d982431e5cc0
tree0e36802b25e39e98a2fa06293dca159b68ff5a31
parentd4d29c0455bf8540de3c006dd213ae1ccf2bc361
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@rosenzweig.io>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
src/gallium/drivers/panfrost/midgard/cmdline.c