Mesa (master): r600g: Fix build with opencl and radeonsi disabled

Tom Stellard tstellar at kemper.freedesktop.org
Fri Oct 31 21:28:56 UTC 2014


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

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Fri Oct 31 16:26:52 2014 -0400

r600g: Fix build with opencl and radeonsi disabled

---

 src/gallium/drivers/r600/evergreen_compute.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 7a17d1e..90fdd79 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -47,9 +47,9 @@
 #include "compute_memory_pool.h"
 #include "sb/sb_public.h"
 #ifdef HAVE_OPENCL
-#include "radeon_llvm_util.h"
+#include "radeon/radeon_llvm_util.h"
 #endif
-#include "radeon_elf_util.h"
+#include "radeon/radeon_elf_util.h"
 #include <inttypes.h>
 
 /**
@@ -199,6 +199,7 @@ void *evergreen_create_compute_state(
 {
 	struct r600_context *ctx = (struct r600_context *)ctx_;
 	struct r600_pipe_compute *shader = CALLOC_STRUCT(r600_pipe_compute);
+#ifdef HAVE_OPENCL
 	const struct pipe_llvm_program_header * header;
 	const char *code;
 	void *p;
@@ -208,7 +209,6 @@ void *evergreen_create_compute_state(
 	header = cso->prog;
 	code = cso->prog + sizeof(struct pipe_llvm_program_header);
 #if HAVE_LLVM < 0x0306
-#ifdef HAVE_OPENCL
         (void)use_kill;
 	(void)p;
 	shader->llvm_ctx = LLVMContextCreate();
@@ -224,7 +224,6 @@ void *evergreen_create_compute_state(
 				shader->llvm_ctx, i, code, header->num_bytes);
 		}
 	}
-#endif
 #else
 	memset(&shader->binary, 0, sizeof(shader->binary));
 	radeon_elf_read(code, header->num_bytes, &shader->binary, true);
@@ -236,6 +235,7 @@ void *evergreen_create_compute_state(
 	memcpy(p, shader->bc.bytecode, shader->bc.ndw * 4);
 	ctx->b.ws->buffer_unmap(shader->code_bo->cs_buf);
 #endif
+#endif
 
 	shader->ctx = (struct r600_context*)ctx;
 	shader->local_size = cso->req_local_mem;
@@ -569,11 +569,11 @@ static void evergreen_launch_grid(
 		uint32_t pc, const void *input)
 {
 	struct r600_context *ctx = (struct r600_context *)ctx_;
+#ifdef HAVE_OPENCL
 	struct r600_pipe_compute *shader = ctx->cs_shader_state.shader;
 	boolean use_kill;
 
 #if HAVE_LLVM < 0x0306
-#ifdef HAVE_OPENCL
 	struct r600_kernel *kernel = &shader->kernels[pc];
 	(void)use_kill;
         if (!kernel->code_bo) {
@@ -605,7 +605,6 @@ static void evergreen_launch_grid(
                 memcpy(p, kernel->bc.bytecode, kernel->bc.ndw * 4);
                 ctx->b.ws->buffer_unmap(kernel->code_bo->cs_buf);
         }
-#endif
 	shader->active_kernel = kernel;
 	ctx->cs_shader_state.kernel_index = pc;
 #else
@@ -613,6 +612,7 @@ static void evergreen_launch_grid(
 	/* Get the config information for this kernel. */
 	r600_shader_binary_read_config(&shader->binary, &shader->bc, pc, &use_kill);
 #endif
+#endif
 
 	COMPUTE_DBG(ctx->screen, "*** evergreen_launch_grid: pc = %u\n", pc);
 




More information about the mesa-commit mailing list