Module: Mesa Branch: master Commit: f4c240f34d4d2cc73e8914ac9696ad0f1f456064 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4c240f34d4d2cc73e8914ac9696ad0f1f456064
Author: Vinson Lee <[email protected]> Date: Wed Nov 11 13:27:05 2020 -0800 microsoft/compiler: Add struct glsl_type forward declaration. This patch fixes this build error. In file included from ../src/microsoft/compiler/dxil_enums.c:24: ../src/microsoft/compiler/dxil_enums.h:323:58: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration 323 | enum dxil_component_type dxil_get_comp_type(const struct glsl_type *type); | ^~~~~~~~~ ../src/microsoft/compiler/dxil_enums.h:325:71: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration 325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type); | ^~~~~~~~~ ../src/microsoft/compiler/dxil_enums.h:327:61: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration 327 | enum dxil_resource_kind dxil_get_resource_kind(const struct glsl_type *type); | ^~~~~~~~~ ../src/microsoft/compiler/dxil_enums.c:31:30: error: conflicting types for 'dxil_get_prog_sig_comp_type' 31 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/microsoft/compiler/dxil_enums.c:24: ../src/microsoft/compiler/dxil_enums.h:325:30: note: previous declaration of 'dxil_get_prog_sig_comp_type' was here 325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: b9c61379ab4 ("microsoft/compiler: translate nir to dxil") Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Jesse Natalie <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7562> --- src/microsoft/compiler/dxil_enums.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/microsoft/compiler/dxil_enums.h b/src/microsoft/compiler/dxil_enums.h index 921b5644e97..4ec0c42d190 100644 --- a/src/microsoft/compiler/dxil_enums.h +++ b/src/microsoft/compiler/dxil_enums.h @@ -320,6 +320,8 @@ enum dxil_sync_scope { extern "C" { #endif +struct glsl_type; + enum dxil_component_type dxil_get_comp_type(const struct glsl_type *type); enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
