aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-07-15 21:49:30 -0400
committerMarek Olšák <[email protected]>2019-07-19 20:16:45 -0400
commitbe67a275b5c80310c310d27e4c941ddd86c7b03f (patch)
treeb8ca6e07d53eba3b440f9f01dd1feacd14ecccb4 /src/gallium
parentfd92e65febcde29f728cb570c6db9c30a9ba2a3a (diff)
radeonsi: remove si_program::use_code_object_v2
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c8
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.h1
2 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index a48887844aa..43616fc22e8 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -61,9 +61,8 @@ static const amd_kernel_code_t *si_compute_get_code_object(
{
const struct si_shader_selector *sel = &program->sel;
- if (!program->use_code_object_v2) {
+ if (program->ir_type != PIPE_SHADER_IR_NATIVE)
return NULL;
- }
struct ac_rtld_binary rtld;
if (!ac_rtld_open(&rtld, (struct ac_rtld_open_info){
@@ -228,7 +227,6 @@ static void *si_create_compute_state(
program->local_size = cso->req_local_mem;
program->private_size = cso->req_private_mem;
program->input_size = cso->req_input_mem;
- program->use_code_object_v2 = cso->ir_type == PIPE_SHADER_IR_NATIVE;
if (cso->ir_type != PIPE_SHADER_IR_NATIVE) {
if (cso->ir_type == PIPE_SHADER_IR_TGSI) {
@@ -491,7 +489,7 @@ static bool si_switch_compute_shader(struct si_context *sctx,
}
shader_va = shader->bo->gpu_address + offset;
- if (program->use_code_object_v2) {
+ if (program->ir_type == PIPE_SHADER_IR_NATIVE) {
/* Shader code is placed after the amd_kernel_code_t
* struct. */
shader_va += sizeof(amd_kernel_code_t);
@@ -665,7 +663,7 @@ static bool si_upload_compute_input(struct si_context *sctx,
struct si_compute *program = sctx->cs_shader_state.program;
struct si_resource *input_buffer = NULL;
unsigned kernel_args_size;
- unsigned num_work_size_bytes = program->use_code_object_v2 ? 0 : 36;
+ unsigned num_work_size_bytes = program->ir_type == PIPE_SHADER_IR_NATIVE ? 0 : 36;
uint32_t kernel_args_offset = 0;
uint32_t *kernel_args;
void *kernel_args_ptr;
diff --git a/src/gallium/drivers/radeonsi/si_compute.h b/src/gallium/drivers/radeonsi/si_compute.h
index e0b74397843..86021178533 100644
--- a/src/gallium/drivers/radeonsi/si_compute.h
+++ b/src/gallium/drivers/radeonsi/si_compute.h
@@ -41,7 +41,6 @@ struct si_compute {
unsigned input_size;
struct pipe_resource *global_buffers[MAX_GLOBAL_BUFFERS];
- unsigned use_code_object_v2 : 1;
bool reads_variable_block_size;
unsigned num_cs_user_data_dwords;
};