diff options
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 16 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.h | 10 |
3 files changed, 20 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index cf5aa08cad2..cbd3f0e8c64 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -91,6 +91,22 @@ struct r600_common_context; +struct radeon_shader_binary { + /** Shader code */ + unsigned char *code; + unsigned code_size; + + /** Config/Context register state that accompanies this shader. + * This is a stream of dword pairs. First dword contains the + * register address, the second dword contains the value.*/ + unsigned char *config; + unsigned config_size; + + /** Set to 1 if the disassembly for this binary has been dumped to + * stderr. */ + int disassembled; +}; + struct r600_resource { struct u_resource b; diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index 92e7dbc7756..4e0aaea0ebc 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c @@ -24,6 +24,7 @@ * */ #include "radeon_llvm_emit.h" +#include "r600_pipe_common.h" #include "util/u_memory.h" #include <llvm-c/Target.h> @@ -85,7 +86,7 @@ static LLVMTargetRef get_r600_target() { * * @returns 0 for success, 1 for failure */ -unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_llvm_binary *binary, +unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary, const char * gpu_family, unsigned dump) { LLVMTargetRef target; diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.h b/src/gallium/drivers/radeon/radeon_llvm_emit.h index 532b7b843f0..780ff5f67f2 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.h +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.h @@ -29,19 +29,13 @@ #include <llvm-c/Core.h> -struct radeon_llvm_binary { - unsigned char *code; - unsigned code_size; - unsigned char *config; - unsigned config_size; - int disassembled; -}; +struct radeon_shader_binary; void radeon_llvm_shader_type(LLVMValueRef F, unsigned type); unsigned radeon_llvm_compile( LLVMModuleRef M, - struct radeon_llvm_binary *binary, + struct radeon_shader_binary *binary, const char * gpu_family, unsigned dump); |