[Mesa-dev] [PATCH 1/4] graw: provide static inline draw_create_vs_llvm() for !HAVE_LLVM

Emil Velikov emil.l.velikov at gmail.com
Mon Jan 16 16:25:41 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Allows us to drop the ifdef guard from the code and paves a way towards
fixing incremental builds whist toggling the configure gallium llvm
switch.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/gallium/auxiliary/draw/draw_vs.c | 2 --
 src/gallium/auxiliary/draw/draw_vs.h | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c
index 415c4fa949..48a1a34ee6 100644
--- a/src/gallium/auxiliary/draw/draw_vs.c
+++ b/src/gallium/auxiliary/draw/draw_vs.c
@@ -59,11 +59,9 @@ draw_create_vertex_shader(struct draw_context *draw,
       tgsi_dump(shader->tokens, 0);
    }
 
-#if HAVE_LLVM
    if (draw->pt.middle.llvm) {
       vs = draw_create_vs_llvm(draw, shader);
    }
-#endif
 
    if (!vs) {
       vs = draw_create_vs_exec( draw, shader );
diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h
index 6a900224c1..6e8d65db9d 100644
--- a/src/gallium/auxiliary/draw/draw_vs.h
+++ b/src/gallium/auxiliary/draw/draw_vs.h
@@ -167,6 +167,10 @@ struct draw_vertex_shader;
 struct draw_vertex_shader *
 draw_create_vs_llvm(struct draw_context *draw,
 		    const struct pipe_shader_state *state);
+#else
+static inline struct draw_vertex_shader *
+draw_create_vs_llvm(struct draw_context *draw,
+		    const struct pipe_shader_state *state) { return NULL; }
 #endif
 
 
-- 
2.11.0



More information about the mesa-dev mailing list