aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_gs.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-08-27 23:56:55 +0100
committerEric Engestrom <[email protected]>2019-09-06 22:19:01 +0100
commit28cb16b6f86718f16219218427b78981a9a4de65 (patch)
tree9a4856a4784d1d6ec207b8b1f8e96ca1400f0bc2 /src/gallium/auxiliary/draw/draw_gs.c
parentef434fbc25c479863b612f67bee6a4f3ef65cd39 (diff)
aux/draw: replace binary HAVE_LLVM checks with LLVM_AVAILABLE
Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_gs.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index a75fe671777..94cfe860b6d 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -29,7 +29,7 @@
#include "draw_private.h"
#include "draw_context.h"
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
#include "draw_llvm.h"
#endif
@@ -239,7 +239,7 @@ static void tgsi_gs_run(struct draw_geometry_shader *shader,
}
}
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
static void
llvm_fetch_gs_input(struct draw_geometry_shader *shader,
@@ -632,7 +632,7 @@ int draw_geometry_shader_run(struct draw_geometry_shader *shader,
shader->input = input;
shader->input_info = input_info;
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
if (shader->draw->llvm) {
shader->gs_output = output_verts[0].verts;
if (max_out_prims > shader->max_out_prims) {
@@ -765,14 +765,14 @@ struct draw_geometry_shader *
draw_create_geometry_shader(struct draw_context *draw,
const struct pipe_shader_state *state)
{
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
boolean use_llvm = draw->llvm != NULL;
struct llvm_geometry_shader *llvm_gs = NULL;
#endif
struct draw_geometry_shader *gs;
unsigned i;
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
if (use_llvm) {
llvm_gs = CALLOC_STRUCT(llvm_geometry_shader);
@@ -804,7 +804,7 @@ draw_create_geometry_shader(struct draw_context *draw,
/* setup the defaults */
gs->max_out_prims = 0;
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
if (use_llvm) {
/* TODO: change the input array to handle the following
vector length, instead of the currently hardcoded
@@ -861,7 +861,7 @@ draw_create_geometry_shader(struct draw_context *draw,
gs->num_vertex_streams = gs->state.stream_output.output[i].stream + 1;
}
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
if (use_llvm) {
int vector_size = gs->vector_length * sizeof(float);
gs->gs_input = align_malloc(sizeof(struct draw_gs_inputs), 16);
@@ -921,7 +921,7 @@ void draw_delete_geometry_shader(struct draw_context *draw,
if (!dgs) {
return;
}
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
if (draw->llvm) {
struct llvm_geometry_shader *shader = llvm_geometry_shader(dgs);
struct draw_gs_llvm_variant_list_item *li;
@@ -957,7 +957,7 @@ void draw_delete_geometry_shader(struct draw_context *draw,
}
-#ifdef HAVE_LLVM
+#ifdef LLVM_AVAILABLE
void draw_gs_set_current_variant(struct draw_geometry_shader *shader,
struct draw_gs_llvm_variant *variant)
{