summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_compute.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-02 18:43:40 -0400
committerMarek Olšák <[email protected]>2019-07-09 17:24:16 -0400
commit3be4ed2fe1ee8629a486156a764b451513d34aac (patch)
tree8a4b395a6da52384ee7a5f9749ab5ccebb082528 /src/gallium/drivers/radeonsi/si_compute.c
parent37b26671a75d8d6e9fa293b1bdb8df78763f3c03 (diff)
radeonsi: fix and clean up shader_type passing
- don't pass it via a parameter if it can be derived from other parameters - set shader_type for ac_rtld_open - use enum pipe_shader_type instead of unsigned Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_compute.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index 54f35cfcfd9..f4fabca8635 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -66,6 +66,7 @@ static const amd_kernel_code_t *si_compute_get_code_object(
struct ac_rtld_binary rtld;
if (!ac_rtld_open(&rtld, (struct ac_rtld_open_info){
.info = &program->screen->info,
+ .shader_type = MESA_SHADER_COMPUTE,
.num_parts = 1,
.elf_ptrs = &program->shader.binary.elf_buffer,
.elf_sizes = &program->shader.binary.elf_size }))
@@ -164,8 +165,7 @@ static void si_create_compute_state_async(void *job, int thread_index)
mtx_unlock(&sscreen->shader_cache_mutex);
si_shader_dump_stats_for_shader_db(sscreen, shader, debug);
- si_shader_dump(sscreen, shader, debug, PIPE_SHADER_COMPUTE,
- stderr, true);
+ si_shader_dump(sscreen, shader, debug, stderr, true);
if (!si_shader_binary_upload(sscreen, shader, 0))
program->shader.compilation_failed = true;
@@ -276,8 +276,7 @@ static void *si_create_compute_state(
si_compute_get_code_object(program, 0);
code_object_to_config(code_object, &program->shader.config);
- si_shader_dump(sctx->screen, &program->shader, &sctx->debug,
- PIPE_SHADER_COMPUTE, stderr, true);
+ si_shader_dump(sctx->screen, &program->shader, &sctx->debug, stderr, true);
if (!si_shader_binary_upload(sctx->screen, &program->shader, 0)) {
fprintf(stderr, "LLVM failed to upload shader\n");
free((void *)program->shader.binary.elf_buffer);