diff options
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); |