mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 16:00:09 +01:00
radeonsi: unify uploaders on APUs too
const_uploader and stream_uploader point to the same uploader. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600>
This commit is contained in:
parent
facd34431b
commit
ac2b4aa08f
1 changed files with 8 additions and 2 deletions
|
|
@ -499,15 +499,21 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
|
|||
goto fail;
|
||||
|
||||
/* Initialize public allocators. */
|
||||
/* Unify uploaders as follows:
|
||||
* - dGPUs with Smart Access Memory: there is only one uploader instance writing to VRAM.
|
||||
* - APUs: There is only one uploader instance writing to RAM. VRAM has the same perf on APUs.
|
||||
* - Other chips: The const uploader writes to VRAM and the stream uploader writes to RAM.
|
||||
*/
|
||||
bool smart_access_memory = sscreen->info.smart_access_memory;
|
||||
bool is_apu = !sscreen->info.has_dedicated_vram;
|
||||
sctx->b.stream_uploader =
|
||||
u_upload_create(&sctx->b, 1024 * 1024, 0,
|
||||
smart_access_memory ? PIPE_USAGE_DEFAULT : PIPE_USAGE_STREAM,
|
||||
smart_access_memory && !is_apu ? PIPE_USAGE_DEFAULT : PIPE_USAGE_STREAM,
|
||||
SI_RESOURCE_FLAG_32BIT); /* same flags as const_uploader */
|
||||
if (!sctx->b.stream_uploader)
|
||||
goto fail;
|
||||
|
||||
if (smart_access_memory) {
|
||||
if (smart_access_memory || is_apu) {
|
||||
sctx->b.const_uploader = sctx->b.stream_uploader;
|
||||
} else {
|
||||
sctx->b.const_uploader =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue