gallium/radeon: merge USER_SHADER and INTERNAL_SHADER priority flags
there's no reason to separate these Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
@@ -584,7 +584,7 @@ void evergreen_emit_cs_shader(struct r600_context *rctx,
|
||||
radeon_emit(cs, PKT3C(PKT3_NOP, 0, 0));
|
||||
radeon_emit(cs, radeon_add_to_buffer_list(&rctx->b, &rctx->b.gfx,
|
||||
code_bo, RADEON_USAGE_READ,
|
||||
RADEON_PRIO_USER_SHADER));
|
||||
RADEON_PRIO_SHADER_BINARY));
|
||||
}
|
||||
|
||||
static void evergreen_launch_grid(struct pipe_context *ctx,
|
||||
|
@@ -2156,7 +2156,7 @@ static void evergreen_emit_vertex_fetch_shader(struct r600_context *rctx, struct
|
||||
radeon_emit(cs, PKT3(PKT3_NOP, 0, 0));
|
||||
radeon_emit(cs, radeon_add_to_buffer_list(&rctx->b, &rctx->b.gfx, shader->buffer,
|
||||
RADEON_USAGE_READ,
|
||||
RADEON_PRIO_INTERNAL_SHADER));
|
||||
RADEON_PRIO_SHADER_BINARY));
|
||||
}
|
||||
|
||||
static void evergreen_emit_shader_stages(struct r600_context *rctx, struct r600_atom *a)
|
||||
|
@@ -1909,7 +1909,7 @@ static void r600_emit_vertex_fetch_shader(struct r600_context *rctx, struct r600
|
||||
radeon_emit(cs, PKT3(PKT3_NOP, 0, 0));
|
||||
radeon_emit(cs, radeon_add_to_buffer_list(&rctx->b, &rctx->b.gfx, shader->buffer,
|
||||
RADEON_USAGE_READ,
|
||||
RADEON_PRIO_INTERNAL_SHADER));
|
||||
RADEON_PRIO_SHADER_BINARY));
|
||||
}
|
||||
|
||||
static void r600_emit_shader_stages(struct r600_context *rctx, struct r600_atom *a)
|
||||
|
@@ -2156,7 +2156,7 @@ void r600_emit_shader(struct r600_context *rctx, struct r600_atom *a)
|
||||
r600_emit_command_buffer(cs, &shader->command_buffer);
|
||||
radeon_emit(cs, PKT3(PKT3_NOP, 0, 0));
|
||||
radeon_emit(cs, radeon_add_to_buffer_list(&rctx->b, &rctx->b.gfx, shader->bo,
|
||||
RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER));
|
||||
RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY));
|
||||
}
|
||||
|
||||
unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format,
|
||||
|
@@ -186,8 +186,7 @@ enum radeon_bo_priority {
|
||||
RADEON_PRIO_SDMA_TEXTURE,
|
||||
|
||||
RADEON_PRIO_CP_DMA = 12,
|
||||
RADEON_PRIO_USER_SHADER,
|
||||
RADEON_PRIO_INTERNAL_SHADER, /* fetch shader, etc. */
|
||||
RADEON_PRIO_SHADER_BINARY,
|
||||
|
||||
RADEON_PRIO_CONST_BUFFER = 16,
|
||||
RADEON_PRIO_DESCRIPTORS,
|
||||
|
@@ -288,7 +288,7 @@ static bool si_switch_compute_shader(struct si_context *sctx,
|
||||
shader_va = shader->bo->gpu_address + offset;
|
||||
|
||||
radeon_add_to_buffer_list(&sctx->b, &sctx->b.gfx, shader->bo,
|
||||
RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
|
||||
radeon_set_sh_reg_seq(cs, R_00B830_COMPUTE_PGM_LO, 2);
|
||||
radeon_emit(cs, shader_va >> 8);
|
||||
|
@@ -553,8 +553,7 @@ static const char *priority_to_string(enum radeon_bo_priority priority)
|
||||
ITEM(SDMA_BUFFER),
|
||||
ITEM(SDMA_TEXTURE),
|
||||
ITEM(CP_DMA),
|
||||
ITEM(USER_SHADER),
|
||||
ITEM(INTERNAL_SHADER),
|
||||
ITEM(SHADER_BINARY),
|
||||
ITEM(CONST_BUFFER),
|
||||
ITEM(DESCRIPTORS),
|
||||
ITEM(BORDER_COLORS),
|
||||
|
@@ -340,7 +340,7 @@ static void si_shader_ls(struct si_shader *shader)
|
||||
return;
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
|
||||
/* We need at least 2 components for LS.
|
||||
* VGPR0-3: (VertexID, RelAutoindex, ???, InstanceID). */
|
||||
@@ -368,7 +368,7 @@ static void si_shader_hs(struct si_shader *shader)
|
||||
return;
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
|
||||
si_pm4_set_reg(pm4, R_00B420_SPI_SHADER_PGM_LO_HS, va >> 8);
|
||||
si_pm4_set_reg(pm4, R_00B424_SPI_SHADER_PGM_HI_HS, va >> 40);
|
||||
@@ -397,7 +397,7 @@ static void si_shader_es(struct si_screen *sscreen, struct si_shader *shader)
|
||||
return;
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
|
||||
if (shader->selector->type == PIPE_SHADER_VERTEX) {
|
||||
vgpr_comp_cnt = shader->info.uses_instanceid ? 3 : 0;
|
||||
@@ -492,7 +492,7 @@ static void si_shader_gs(struct si_shader *shader)
|
||||
S_028B90_ENABLE(gs_num_invocations > 0));
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
si_pm4_set_reg(pm4, R_00B220_SPI_SHADER_PGM_LO_GS, va >> 8);
|
||||
si_pm4_set_reg(pm4, R_00B224_SPI_SHADER_PGM_HI_GS, va >> 40);
|
||||
|
||||
@@ -547,7 +547,7 @@ static void si_shader_vs(struct si_screen *sscreen, struct si_shader *shader,
|
||||
}
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
|
||||
if (gs) {
|
||||
vgpr_comp_cnt = 0; /* only VertexID is needed for GS-COPY. */
|
||||
@@ -757,7 +757,7 @@ static void si_shader_ps(struct si_shader *shader)
|
||||
si_pm4_set_reg(pm4, R_02823C_CB_SHADER_MASK, cb_shader_mask);
|
||||
|
||||
va = shader->bo->gpu_address;
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_USER_SHADER);
|
||||
si_pm4_add_bo(pm4, shader->bo, RADEON_USAGE_READ, RADEON_PRIO_SHADER_BINARY);
|
||||
si_pm4_set_reg(pm4, R_00B020_SPI_SHADER_PGM_LO_PS, va >> 8);
|
||||
si_pm4_set_reg(pm4, R_00B024_SPI_SHADER_PGM_HI_PS, va >> 40);
|
||||
|
||||
|
Reference in New Issue
Block a user