[Mesa-dev] [PATCH 3/9] radeonsi: pass TGSI processor type to si_shader_binary_read for dumping
Marek Olšák
maraeo at gmail.com
Fri Jan 1 06:13:56 PST 2016
From: Marek Olšák <marek.olsak at amd.com>
the parameter will be used later
---
src/gallium/drivers/radeonsi/si_compute.c | 3 ++-
src/gallium/drivers/radeonsi/si_shader.c | 5 +++--
src/gallium/drivers/radeonsi/si_shader.h | 3 ++-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 45312d0..ebe248c 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -136,7 +136,8 @@ 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);
+ si_shader_binary_read(sctx->screen, &program->shader,
+ TGSI_PROCESSOR_COMPUTE);
#endif
program->input_buffer = si_resource_create_custom(sctx->b.b.screen,
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 6bece08..a4d7e12 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3840,7 +3840,8 @@ int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader)
return 0;
}
-int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader)
+int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader,
+ unsigned processor)
{
const struct radeon_shader_binary *binary = &shader->binary;
unsigned i;
@@ -3890,7 +3891,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader,
if (r)
return r;
- r = si_shader_binary_read(sscreen, shader);
+ r = si_shader_binary_read(sscreen, shader, processor);
FREE(shader->binary.config);
FREE(shader->binary.rodata);
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index f3fd122..7129bcc 100644
--- a/src/gallium/drivers/radeonsi/si_shader.h
+++ b/src/gallium/drivers/radeonsi/si_shader.h
@@ -334,7 +334,8 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader,
void si_shader_destroy(struct si_shader *shader);
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);
-int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader);
+int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader,
+ unsigned processor);
void si_shader_apply_scratch_relocs(struct si_context *sctx,
struct si_shader *shader,
uint64_t scratch_va);
--
2.1.4
More information about the mesa-dev
mailing list