Zink reports incorrect amount of video memory
Sorry, if this is not actually a bug, but it looks weird to me, zink reports 8GB of Video memory
(using GLX_MESA_query_renderer
), when the card has 4GB of memory, and radeonsi reports 4GB (using GL_NVX_gpu_memory_info
and GL_ATI_meminfo
and GLX_MESA_query_renderer
), and so does RADV.
System: Linux 5.6.7, amd64
Mesa: git tag mesa-20.0.7
Vulkan: RADV ACO on AMD Radeon R9 Fury X (4GB VRAM).
Compiler: gcc 9.3.0-13
Build options: -pipe -march=native -Og -ggdb -fno-omit-frame-pointer -fno-optimize-sibling-calls
libc6 2.30-8
CPU: AMD Threadripper 2950X (TR4).
xserver-xorg-video-amdgpu 19.1.0-1
xserver-xorg-core 2:1.20.8-2
xserver-xorg 1:7.7+20
libdrm-radeon1:amd64 2.4.101-2
RADV:
$ RADV_PERFTEST=aco vulkaninfo
...
Presentable Surfaces:
=====================
GPU id : 0 (AMD RADV/ACO FIJI (LLVM 9.0.1)):
...
Device Groups:
==============
Group 0:
Properties:
physicalDevices: count = 1
AMD RADV/ACO FIJI (LLVM 9.0.1) (ID: 0)
subsetAllocation = 0
Present Capabilities:
AMD RADV/ACO FIJI (LLVM 9.0.1) (ID: 0):
Can present images from the following devices: count = 1
AMD RADV/ACO FIJI (LLVM 9.0.1) (ID: 0)
Present modes: count = 1
DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
apiVersion = 4202624 (1.2.128)
driverVersion = 83886087 (0x5000007)
vendorID = 0x1002
deviceID = 0x7300
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = AMD RADV/ACO FIJI (LLVM 9.0.1)
...
VkPhysicalDeviceMemoryProperties:
=================================
memoryHeaps: count = 3
memoryHeaps[0]:
size = 4026531840 (0xf0000000) (3.75 GiB)
budget = 3009085440 (0xb35b0000) (2.80 GiB)
usage = 0 (0x00000000) (0.00 B)
flags: count = 1
MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryHeaps[1]:
size = 268435456 (0x10000000) (256.00 MiB)
budget = 208379904 (0x0c6ba000) (198.73 MiB)
usage = 0 (0x00000000) (0.00 B)
flags: count = 1
MEMORY_HEAP_DEVICE_LOCAL_BIT
memoryHeaps[2]:
size = 4294967296 (0x100000000) (4.00 GiB)
budget = 4108722176 (0xf4e62000) (3.83 GiB)
usage = 0 (0x00000000) (0.00 B)
flags: count = 0
None
memoryTypes: count = 4
memoryTypes[0]:
heapIndex = 0
propertyFlags = 0x0001: count = 1
MEMORY_PROPERTY_DEVICE_LOCAL_BIT
usable for:
IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D16_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT
IMAGE_TILING_LINEAR: color images
memoryTypes[1]:
heapIndex = 2
propertyFlags = 0x0006: count = 2
MEMORY_PROPERTY_HOST_VISIBLE_BIT
MEMORY_PROPERTY_HOST_COHERENT_BIT
usable for:
IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D16_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT
IMAGE_TILING_LINEAR: color images
memoryTypes[2]:
heapIndex = 1
propertyFlags = 0x0007: count = 3
MEMORY_PROPERTY_DEVICE_LOCAL_BIT
MEMORY_PROPERTY_HOST_VISIBLE_BIT
MEMORY_PROPERTY_HOST_COHERENT_BIT
usable for:
IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D16_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT
IMAGE_TILING_LINEAR: color images
memoryTypes[3]:
heapIndex = 2
propertyFlags = 0x000e: count = 3
MEMORY_PROPERTY_HOST_VISIBLE_BIT
MEMORY_PROPERTY_HOST_COHERENT_BIT
MEMORY_PROPERTY_HOST_CACHED_BIT
usable for:
IMAGE_TILING_OPTIMAL: color images, FORMAT_D16_UNORM, FORMAT_D32_SFLOAT, FORMAT_S8_UINT, FORMAT_D16_UNORM_S8_UINT, FORMAT_D32_SFLOAT_S8_UINT
IMAGE_TILING_LINEAR: color images
...
RadeonSI:
$ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: X.Org (0x1002)
Device: AMD Radeon (TM) R9 Fury Series (FIJI, DRM 3.36.0, 5.6.0-1-amd64, LLVM 9.0.1) (0x7300)
Version: 20.0.7
Accelerated: yes
Video memory: 4096MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 3124 MB, largest block: 3124 MB
VBO free aux. memory - total: 3916 MB, largest block: 3916 MB
Texture free memory - total: 3124 MB, largest block: 3124 MB
Texture free aux. memory - total: 3916 MB, largest block: 3916 MB
Renderbuffer free memory - total: 3124 MB, largest block: 3124 MB
Renderbuffer free aux. memory - total: 3916 MB, largest block: 3916 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 4096 MB
Total available memory: 8192 MB
Currently available dedicated video memory: 3124 MB
OpenGL vendor string: X.Org
OpenGL renderer string: AMD Radeon (TM) R9 Fury Series (FIJI, DRM 3.36.0, 5.6.0-1-amd64, LLVM 9.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.7 (git-e925e97746)
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.7 (git-e925e97746)
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.7 (git-e925e97746)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
Zink:
$ RADV_PERFTEST=aco MESA_LOADER_DRIVER_OVERRIDE=zink glxinfo -B
name of display: :0
WARNING: Experimental compiler backend enabled. Here be dragons! Incorrect rendering, GPU hangs and/or resets are likely
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Collabora Ltd (0x1002)
Device: zink (AMD RADV/ACO FIJI (LLVM 9.0.1)) (0x7300)
Version: 20.0.7
Accelerated: yes
Video memory: 8192MB
Unified memory: no
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 2.0
OpenGL vendor string: Collabora Ltd
OpenGL renderer string: zink (AMD RADV/ACO FIJI (LLVM 9.0.1))
OpenGL version string: 2.1 Mesa 20.0.7 (git-e925e97746)
OpenGL shading language version string: 1.20
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.0.7 (git-e925e97746)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
Same happens on Mesa 20.1.0