mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radeonsi: add SI_MAX_VRAM_MAP_SIZE definition
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13400>
This commit is contained in:
parent
03186773a6
commit
745ea99484
2 changed files with 11 additions and 5 deletions
|
|
@ -150,14 +150,11 @@ void si_init_resource_fields(struct si_screen *sscreen, struct si_resource *res,
|
|||
if (res->domains & RADEON_DOMAIN_VRAM) {
|
||||
/* We don't want to evict buffers from VRAM by mapping them for CPU access,
|
||||
* because they might never be moved back again. If a buffer is large enough,
|
||||
* upload data by copying from a temporary GTT buffer. 8K might not seem much,
|
||||
* but there can be 100000 buffers.
|
||||
*
|
||||
* This tweak improves performance for viewperf creo & snx.
|
||||
* upload data by copying from a temporary GTT buffer.
|
||||
*/
|
||||
if (!sscreen->info.smart_access_memory &&
|
||||
sscreen->info.has_dedicated_vram &&
|
||||
size >= 8196)
|
||||
size >= SI_MAX_VRAM_MAP_SIZE)
|
||||
res->b.b.flags |= PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,15 @@ extern "C" {
|
|||
/* Alignment for optimal CP DMA performance. */
|
||||
#define SI_CPDMA_ALIGNMENT 32
|
||||
|
||||
/* We don't want to evict buffers from VRAM by mapping them for CPU access,
|
||||
* because they might never be moved back again. If a buffer is large enough,
|
||||
* upload data by copying from a temporary GTT buffer. 8K might not seem much,
|
||||
* but there can be 100000 buffers.
|
||||
*
|
||||
* This tweak improves performance for viewperf creo & snx.
|
||||
*/
|
||||
#define SI_MAX_VRAM_MAP_SIZE 8196
|
||||
|
||||
/* Tunables for compute-based clear_buffer and copy_buffer: */
|
||||
#define SI_COMPUTE_CLEAR_DW_PER_THREAD 4
|
||||
#define SI_COMPUTE_COPY_DW_PER_THREAD 4
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue