mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
radv/winsys: fix initializing debug/perftest options if multiple instances
Since the winsys uses refcount, options like RADV_DEBUG_ZERO_VRAM might have not been initialized if the first instance wasn't created with application info. This fixes missing zerovram for vkd3d-proton. Cc: 21.3 22.0 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14978>
This commit is contained in:
parent
4001d9ce1a
commit
aa3405e812
1 changed files with 14 additions and 0 deletions
|
|
@ -217,6 +217,20 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags,
|
|||
if (ws) {
|
||||
simple_mtx_unlock(&winsys_creation_mutex);
|
||||
amdgpu_device_deinitialize(dev);
|
||||
|
||||
/* Check that options don't differ from the existing winsys. */
|
||||
if (((debug_flags & RADV_DEBUG_ALL_BOS) && !ws->debug_all_bos) ||
|
||||
((debug_flags & RADV_DEBUG_HANG) && !ws->debug_log_bos) ||
|
||||
((debug_flags & RADV_DEBUG_NO_IBS) && ws->use_ib_bos) ||
|
||||
(perftest_flags != ws->perftest)) {
|
||||
fprintf(stderr, "amdgpu: Found options that differ from the existing winsys.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* RADV_DEBUG_ZERO_VRAM is the only option that is allowed to be set again. */
|
||||
if (debug_flags & RADV_DEBUG_ZERO_VRAM)
|
||||
ws->zero_all_vram_allocs = true;
|
||||
|
||||
return &ws->base;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue