mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
radv: Skip tiny non-visible VRAM heap.
When I enable "Above 4G decoding" in my BIOS I still get 16 MiB of non-visible VRAM on my 8G VRAM GPU ... CC: mesa-stable Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6827>
This commit is contained in:
parent
1587141c4c
commit
44e3895e1c
1 changed files with 4 additions and 1 deletions
|
|
@ -146,7 +146,10 @@ radv_physical_device_init_mem_types(struct radv_physical_device *device)
|
|||
uint64_t vram_size = radv_get_vram_size(device);
|
||||
int vram_index = -1, visible_vram_index = -1, gart_index = -1;
|
||||
device->memory_properties.memoryHeapCount = 0;
|
||||
if (vram_size > 0) {
|
||||
|
||||
/* Only get a VRAM heap if it is significant, not if it is a 16 MiB
|
||||
* remainder above visible VRAM. */
|
||||
if (vram_size > 0 && vram_size * 9 >= visible_vram_size) {
|
||||
vram_index = device->memory_properties.memoryHeapCount++;
|
||||
device->memory_properties.memoryHeaps[vram_index] = (VkMemoryHeap) {
|
||||
.size = vram_size,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue