summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-22 23:40:45 +0200
committerMarek Olšák <[email protected]>2016-07-26 23:06:46 +0200
commit1e5f00f9d5f412526d025f8f4762160ce7b5f2ba (patch)
treedd95c6ab356afabac296dfa377801cdd5282edda /src/gallium/drivers/radeonsi/si_shader.h
parent18475aab6d484d4eb49b1cc9124c9aabc79f8527 (diff)
radeonsi: pre-generate shader logs for ddebug
This cuts down the overhead of si_dump_shader when ddebug is capturing shader logs, which is done for every draw call unconditionally (that's quite a lot of work for a draw call). 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 6073296ac9f..e8560498988 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -240,6 +240,7 @@ struct si_shader_selector {
* if thread_index == -1 (non-threaded). */
LLVMTargetMachineRef tm;
struct pipe_debug_callback debug;
+ bool is_debug_context;
pipe_mutex mutex;
struct si_shader *first_variant; /* immutable after the first variant */
@@ -438,6 +439,12 @@ struct si_shader {
struct radeon_shader_binary binary;
struct si_shader_config config;
struct si_shader_info info;
+
+ /* Shader key + LLVM IR + disassembly + statistics.
+ * Generated for debug contexts only.
+ */
+ char *shader_log;
+ size_t shader_log_size;
};
struct si_shader_part {