diff options
author | Marek Olšák <[email protected]> | 2017-01-17 17:39:16 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-01-18 19:51:31 +0100 |
commit | 3ae3be6dd44dbc5ac6ec847ce67c53c10479a75c (patch) | |
tree | 51695a67b5ab6dc054474274028dc230ff4015db /src/gallium/drivers/radeonsi/si_shader.h | |
parent | b0cc55f29831638069407a4c1a5c809b26902ab6 (diff) |
radeonsi: move shader pipe context state into a separate structure
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 | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 758403518f6..5a24318b96f 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -251,18 +251,26 @@ enum { struct si_shader; +/* 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; + + /* Used if thread_index == -1 or if debug.async is true. */ + struct pipe_debug_callback debug; + + /* Used for creating the log string for gallium/ddebug. */ + bool is_debug_context; +}; + /* A shader selector is a gallium CSO and contains shader variants and * binaries for one TGSI program. This can be shared by multiple contexts. */ struct si_shader_selector { struct si_screen *screen; struct util_queue_fence ready; - - /* Should only be used by si_init_shader_selector_async - * if thread_index == -1 (non-threaded). */ - LLVMTargetMachineRef tm; - struct pipe_debug_callback debug; - bool is_debug_context; + struct si_compiler_ctx_state compiler_ctx_state; pipe_mutex mutex; struct si_shader *first_variant; /* immutable after the first variant */ |