diff options
author | Marek Olšák <[email protected]> | 2018-04-09 18:26:05 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-04-27 17:56:04 -0400 |
commit | 87eb597758a1fe126a712675e8f15c4395c57143 (patch) | |
tree | 41b2383ccd3034827a0fa583c7a01b6e54f83ec1 /src/gallium/drivers/radeonsi/si_shader.h | |
parent | 788d66553af418d3a195b58c3debd87a40f8174c (diff) |
radeonsi: add struct si_compiler containing LLVMTargetMachineRef
It will contain more variables.
Reviewed-by: Timothy Arceri <[email protected]>
Tested-by: Benedikt Schemmer <ben at besd.de>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index c26ccafdd69..8c479d638a9 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -311,11 +311,16 @@ enum { struct si_shader; +/* Per-thread persistent LLVM objects. */ +struct si_compiler { + LLVMTargetMachineRef tm; +}; + /* State of the context creating the shader object. */ struct si_compiler_ctx_state { /* Should only be used by si_init_shader_selector_async and * si_build_shader_variant if thread_index == -1 (non-threaded). */ - LLVMTargetMachineRef tm; + struct si_compiler *compiler; /* Used if thread_index == -1 or if debug.async is true. */ struct pipe_debug_callback debug; @@ -646,15 +651,15 @@ struct si_shader_part { /* si_shader.c */ struct si_shader * si_generate_gs_copy_shader(struct si_screen *sscreen, - LLVMTargetMachineRef tm, + struct si_compiler *compiler, struct si_shader_selector *gs_selector, struct pipe_debug_callback *debug); int si_compile_tgsi_shader(struct si_screen *sscreen, - LLVMTargetMachineRef tm, + struct si_compiler *compiler, struct si_shader *shader, bool is_monolithic, struct pipe_debug_callback *debug); -int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm, +int si_shader_create(struct si_screen *sscreen, struct si_compiler *compiler, struct si_shader *shader, struct pipe_debug_callback *debug); void si_shader_destroy(struct si_shader *shader); |