mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 13:08:09 +02:00
radv: Select PC oversubscription rate based on number of PS params.
Decide the oversubscription rate similarly to how RadeonSI does it: Oversubscribe a smaller amount of PC (parameter cache) when there are fewer params. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12859>
This commit is contained in:
parent
61b7ca2a1f
commit
7ae5a93b7f
1 changed files with 10 additions and 2 deletions
|
|
@ -4657,8 +4657,16 @@ radv_pipeline_generate_hw_ngg(struct radeon_cmdbuf *ctx_cs, struct radeon_cmdbuf
|
|||
S_00B204_CU_EN(0xffff) | S_00B204_SPI_SHADER_LATE_ALLOC_GS_GFX10(late_alloc_wave64));
|
||||
|
||||
uint32_t oversub_pc_lines = late_alloc_wave64 ? pipeline->device->physical_device->rad_info.pc_lines / 4 : 0;
|
||||
if (shader->info.has_ngg_culling)
|
||||
oversub_pc_lines *= 3;
|
||||
if (shader->info.has_ngg_culling) {
|
||||
unsigned oversub_factor = 2;
|
||||
|
||||
if (outinfo->param_exports > 4)
|
||||
oversub_factor = 4;
|
||||
else if (outinfo->param_exports > 2)
|
||||
oversub_factor = 3;
|
||||
|
||||
oversub_pc_lines *= oversub_factor;
|
||||
}
|
||||
|
||||
gfx10_emit_ge_pc_alloc(cs, pipeline->device->physical_device->rad_info.chip_class, oversub_pc_lines);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue