summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-01-03 17:03:24 +0100
committerMarek Olšák <[email protected]>2016-01-07 18:26:06 +0100
commitc9c031f3d0ed28a65b78748ed1e6e2ec29336451 (patch)
tree58d3ec76950f311e7566eac6803c7f824e620bc3 /src
parentf8b34fe093594ad7c0428c55efae2f479b543a62 (diff)
radeonsi: move si_shader_dump call out of si_shader_binary_read
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c8
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c21
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h12
3 files changed, 21 insertions, 20 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 3562bd846e7..ffa941b5f60 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -138,9 +138,11 @@ static void *si_create_compute_state(
* the shader code to the GPU.
*/
init_scratch_buffer(sctx, program);
- si_shader_binary_read(sctx->screen, &program->shader.binary,
- &program->shader.config, &sctx->b.debug,
- TGSI_PROCESSOR_COMPUTE);
+ si_shader_binary_read(&program->shader.binary,
+ &program->shader.config);
+ si_shader_dump(sctx->screen, &program->shader.binary,
+ &program->shader.config, &sctx->b.debug,
+ TGSI_PROCESSOR_COMPUTE);
si_shader_binary_upload(sctx->screen, &program->shader);
#endif
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index ec34bec3a79..ccb179c1f67 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3872,11 +3872,11 @@ static void si_shader_dump_stats(struct si_screen *sscreen,
conf->lds_size, conf->scratch_bytes_per_wave);
}
-static void si_shader_dump(struct si_screen *sscreen,
- struct radeon_shader_binary *binary,
- struct si_shader_config *conf,
- struct pipe_debug_callback *debug,
- unsigned processor)
+void si_shader_dump(struct si_screen *sscreen,
+ struct radeon_shader_binary *binary,
+ struct si_shader_config *conf,
+ struct pipe_debug_callback *debug,
+ unsigned processor)
{
if (r600_can_dump_shader(&sscreen->b, processor))
if (!(sscreen->b.debug_flags & DBG_NO_ASM))
@@ -3885,14 +3885,10 @@ static void si_shader_dump(struct si_screen *sscreen,
si_shader_dump_stats(sscreen, conf, binary->code_size, debug, processor);
}
-void si_shader_binary_read(struct si_screen *sscreen,
- struct radeon_shader_binary *binary,
- struct si_shader_config *conf,
- struct pipe_debug_callback *debug,
- unsigned processor)
+void si_shader_binary_read(struct radeon_shader_binary *binary,
+ struct si_shader_config *conf)
{
si_shader_binary_read_config(binary, conf, 0);
- si_shader_dump(sscreen, binary, conf, debug, processor);
}
int si_compile_llvm(struct si_screen *sscreen,
@@ -3921,7 +3917,8 @@ int si_compile_llvm(struct si_screen *sscreen,
return r;
}
- si_shader_binary_read(sscreen, binary, conf, debug, processor);
+ si_shader_binary_read(binary, conf);
+ si_shader_dump(sscreen, binary, conf, debug, processor);
FREE(binary->config);
FREE(binary->global_symbol_offsets);
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 780383c09ee..51dfcd09e9e 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -344,11 +344,13 @@ void si_shader_destroy(struct si_shader *shader);
void si_shader_destroy_binary(struct radeon_shader_binary *binary);
unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index);
int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader);
-void si_shader_binary_read(struct si_screen *sscreen,
- struct radeon_shader_binary *binary,
- struct si_shader_config *conf,
- struct pipe_debug_callback *debug,
- unsigned processor);
+void si_shader_binary_read(struct radeon_shader_binary *binary,
+ struct si_shader_config *conf);
+void si_shader_dump(struct si_screen *sscreen,
+ struct radeon_shader_binary *binary,
+ struct si_shader_config *conf,
+ struct pipe_debug_callback *debug,
+ unsigned processor);
void si_shader_apply_scratch_relocs(struct si_context *sctx,
struct si_shader *shader,
uint64_t scratch_va);