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
b7793e39ee
commit
9948ead3cd
|
@ -168,7 +168,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…
Reference in New Issue