mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
ac/gpu_info: add total_tess_ring_size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34544>
This commit is contained in:
parent
97119d980c
commit
c057d9105f
4 changed files with 6 additions and 7 deletions
|
|
@ -2475,6 +2475,7 @@ void ac_get_hs_info(const struct radeon_info *info,
|
|||
hs->tess_factor_ring_size = 48 * 1024 * info->max_se;
|
||||
hs->tess_offchip_ring_offset = align(hs->tess_factor_ring_size, 64 * 1024);
|
||||
hs->tess_offchip_ring_size = num_workgroups * wg_size_in_dwords * 4;
|
||||
hs->total_tess_ring_size = hs->tess_offchip_ring_offset + hs->tess_offchip_ring_size;
|
||||
}
|
||||
|
||||
static uint16_t get_task_num_entries(enum radeon_family fam)
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ struct ac_hs_info {
|
|||
uint32_t tess_factor_ring_size;
|
||||
uint32_t tess_offchip_ring_offset;
|
||||
uint32_t tess_offchip_ring_size;
|
||||
uint32_t total_tess_ring_size;
|
||||
};
|
||||
|
||||
void ac_get_hs_info(const struct radeon_info *info,
|
||||
|
|
|
|||
|
|
@ -997,12 +997,11 @@ radv_update_preamble_cs(struct radv_queue_state *queue, struct radv_device *devi
|
|||
}
|
||||
|
||||
if (!queue->ring_info.tess_rings && needs->tess_rings) {
|
||||
uint64_t tess_rings_size = pdev->hs.tess_offchip_ring_offset + pdev->hs.tess_offchip_ring_size;
|
||||
result = radv_bo_create(device, NULL, tess_rings_size, 256, RADEON_DOMAIN_VRAM, ring_bo_flags,
|
||||
result = radv_bo_create(device, NULL, pdev->hs.total_tess_ring_size, 256, RADEON_DOMAIN_VRAM, ring_bo_flags,
|
||||
RADV_BO_PRIORITY_SCRATCH, 0, true, &tess_rings_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
radv_rmv_log_command_buffer_bo_create(device, tess_rings_bo, 0, 0, tess_rings_size);
|
||||
radv_rmv_log_command_buffer_bo_create(device, tess_rings_bo, 0, 0, pdev->hs.total_tess_ring_size);
|
||||
}
|
||||
|
||||
if (!queue->ring_info.task_rings && needs->task_rings) {
|
||||
|
|
|
|||
|
|
@ -4544,8 +4544,7 @@ void si_init_tess_factor_ring(struct si_context *sctx)
|
|||
SI_RESOURCE_FLAG_DRIVER_INTERNAL |
|
||||
SI_RESOURCE_FLAG_DISCARDABLE,
|
||||
PIPE_USAGE_DEFAULT,
|
||||
sscreen->hs.tess_offchip_ring_size +
|
||||
sscreen->hs.tess_factor_ring_size,
|
||||
sscreen->hs.total_tess_ring_size,
|
||||
2 * 1024 * 1024);
|
||||
if (!sscreen->tess_rings) {
|
||||
simple_mtx_unlock(&sscreen->tess_ring_lock);
|
||||
|
|
@ -4560,8 +4559,7 @@ void si_init_tess_factor_ring(struct si_context *sctx)
|
|||
SI_RESOURCE_FLAG_DRIVER_INTERNAL |
|
||||
SI_RESOURCE_FLAG_DISCARDABLE,
|
||||
PIPE_USAGE_DEFAULT,
|
||||
sscreen->hs.tess_offchip_ring_size +
|
||||
sscreen->hs.tess_factor_ring_size,
|
||||
sscreen->hs.total_tess_ring_size,
|
||||
2 * 1024 * 1024);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue