mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 20:10:14 +01:00
radeonsi: Add radeon_shader_binary member to struct si_shader
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
37559f8dfc
commit
32206c5e56
2 changed files with 6 additions and 6 deletions
|
|
@ -54,7 +54,6 @@ struct si_compute {
|
||||||
unsigned local_size;
|
unsigned local_size;
|
||||||
unsigned private_size;
|
unsigned private_size;
|
||||||
unsigned input_size;
|
unsigned input_size;
|
||||||
struct radeon_shader_binary binary;
|
|
||||||
struct si_shader shader;
|
struct si_shader shader;
|
||||||
unsigned num_user_sgprs;
|
unsigned num_user_sgprs;
|
||||||
|
|
||||||
|
|
@ -102,8 +101,8 @@ static void *si_create_compute_state(
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
radeon_elf_read(code, header->num_bytes, &program->binary, true);
|
radeon_elf_read(code, header->num_bytes, &program->shader.binary, true);
|
||||||
si_shader_binary_read(sctx->screen, &program->shader, &program->binary);
|
si_shader_binary_read(sctx->screen, &program->shader, &program->shader.binary);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
program->input_buffer = si_resource_create_custom(sctx->b.b.screen,
|
program->input_buffer = si_resource_create_custom(sctx->b.b.screen,
|
||||||
|
|
@ -256,7 +255,7 @@ static void si_launch_grid(
|
||||||
|
|
||||||
#if HAVE_LLVM >= 0x0306
|
#if HAVE_LLVM >= 0x0306
|
||||||
/* Read the config information */
|
/* Read the config information */
|
||||||
si_shader_binary_read_config(&program->binary, shader, pc);
|
si_shader_binary_read_config(&program->shader.binary, shader, pc);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Upload the kernel arguments */
|
/* Upload the kernel arguments */
|
||||||
|
|
@ -296,7 +295,7 @@ static void si_launch_grid(
|
||||||
|
|
||||||
/* Patch the shader with the scratch buffer address. */
|
/* Patch the shader with the scratch buffer address. */
|
||||||
apply_scratch_relocs(sctx->screen,
|
apply_scratch_relocs(sctx->screen,
|
||||||
&program->binary, shader, scratch_buffer_va);
|
&program->shader.binary, shader, scratch_buffer_va);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -481,7 +480,7 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){
|
||||||
pipe_resource_reference(
|
pipe_resource_reference(
|
||||||
(struct pipe_resource **)&program->input_buffer, NULL);
|
(struct pipe_resource **)&program->input_buffer, NULL);
|
||||||
|
|
||||||
radeon_shader_binary_free_members(&program->binary, true);
|
radeon_shader_binary_free_members(&program->shader.binary, true);
|
||||||
FREE(program);
|
FREE(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ struct si_shader {
|
||||||
struct si_pm4_state *pm4;
|
struct si_pm4_state *pm4;
|
||||||
struct r600_resource *bo;
|
struct r600_resource *bo;
|
||||||
struct r600_resource *scratch_bo;
|
struct r600_resource *scratch_bo;
|
||||||
|
struct radeon_shader_binary binary;
|
||||||
unsigned num_sgprs;
|
unsigned num_sgprs;
|
||||||
unsigned num_vgprs;
|
unsigned num_vgprs;
|
||||||
unsigned lds_size;
|
unsigned lds_size;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue