Bug 72575 - Several games are unable to detect VRAM size
Summary: Several games are unable to detect VRAM size
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 18:36 UTC by Benjamin Bellec
Modified: 2016-10-14 22:44 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Benjamin Bellec 2013-12-10 18:36:53 UTC
I have a AMD CYPRESS (Radeon HD5870) with 1 Go VRAM but several games (Serious Sam 3, Enemy Territory: QUAKE Wars, Unigine Benchmarks/Oil Rush) are unable do detect the correct VRAM size.

System:
Fedora 19 x86-64
kernel 3.11.10-200.fc19.x86_64
libdrm 2.4.50-1.fc19
mesa 10.1.0-devel (git-1e71493)

I had this issue already since a long time (detected in ETQW with a RV770/HD4850) but I was thinking it was a ETQW game bug. Now that there is more Linux video game, I see that it's not specific to one game.


Here are differents outputs:

# dmesg |grep drm
[    1.106556] [drm] Initialized drm 1.1.0 20060810
[    1.129686] [drm] radeon kernel modesetting enabled.
[    1.129855] [drm] initializing kernel modesetting (CYPRESS 0x1002:0x6898 0x1043:0x0346).
[    1.129875] [drm] register mmio base: 0xF7E20000
[    1.129876] [drm] register mmio size: 131072
[    1.129960] [drm] Detected VRAM RAM=1024M, BAR=256M
[    1.129961] [drm] RAM width 256bits DDR
[    1.130034] [drm] radeon: 1024M of VRAM memory ready
[    1.130035] [drm] radeon: 512M of GTT memory ready.
[    1.130255] [drm] GART: num cpu pages 131072, num gpu pages 131072
[    1.130537] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0
[    1.132744] [drm] Loading CYPRESS Microcode
[    1.133367] [drm] PCIE GART of 512M enabled (table at 0x000000000025D000).
[    1.133838] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    1.133839] [drm] Driver supports precise vblank timestamp query.
[    1.133875] [drm] radeon: irq initialized.
[    1.150324] [drm] ring test on 0 succeeded in 1 usecs
[    1.150381] [drm] ring test on 3 succeeded in 1 usecs
[    1.357267] [drm] ring test on 5 succeeded in 1 usecs
[    1.357269] [drm] UVD initialized successfully.
[    1.357414] [drm] ib test on ring 0 succeeded in 0 usecs
[    1.357431] [drm] ib test on ring 3 succeeded in 0 usecs
[    1.528619] [drm] ib test on ring 5 succeeded
[    1.528996] [drm] Radeon Display Connectors
[    1.528997] [drm] Connector 0:
[    1.528998] [drm]   DP-1
[    1.528999] [drm]   HPD5
[    1.529000] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c
[    1.529000] [drm]   Encoders:
[    1.529001] [drm]     DFP1: INTERNAL_UNIPHY2
[    1.529002] [drm] Connector 1:
[    1.529003] [drm]   HDMI-A-1
[    1.529003] [drm]   HPD4
[    1.529004] [drm]   DDC: 0x6460 0x6460 0x6464 0x6464 0x6468 0x6468 0x646c 0x646c
[    1.529005] [drm]   Encoders:
[    1.529005] [drm]     DFP2: INTERNAL_UNIPHY2
[    1.529006] [drm] Connector 2:
[    1.529006] [drm]   DVI-I-1
[    1.529007] [drm]   HPD6
[    1.529008] [drm]   DDC: 0x6470 0x6470 0x6474 0x6474 0x6478 0x6478 0x647c 0x647c
[    1.529008] [drm]   Encoders:
[    1.529009] [drm]     DFP3: INTERNAL_UNIPHY
[    1.529010] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[    1.529042] [drm] Internal thermal controller with fan control
[    1.537324] [drm] radeon: dpm initialized
[    1.577058] [drm] fb mappable at 0xE035F000
[    1.577060] [drm] vram apper at 0xE0000000
[    1.577060] [drm] size 7299072
[    1.577061] [drm] fb depth is 24
[    1.577062] [drm]    pitch is 6912
[    1.577121] fbcon: radeondrmfb (fb0) is primary device
[    1.587777] radeon 0000:01:00.0: fb0: radeondrmfb frame buffer device
[    1.587781] [drm] Initialized radeon 2.34.0 20080528 for 0000:01:00.0 on minor 0


SS3
========================================================
INF:  * Desktop settings...
INF:  Color depth: 32-bit
INF:  Desktop resolution: 1680 x 1050
INF:  Fullscreen on primary display
WRN:  [OpenGL] Unable to determine VRAM size... assuming 512 MB.
WRN:  [OpenGL] "GL_ARB_get_program_binary" extension is present but not used because no binary formats are exposed.
INF:  
INF:  Gfx API: OpenGL
INF:  Resolution: 1680 x 1050
INF:  Vendor: ATI (0x1002)
INF:  Driver: X.Org (0x6898)
INF:  Renderer: Gallium 0.4 on AMD CYPRESS
INF:  Version: 3.0 Mesa 10.1.0-devel (git-1e71493)
INF:  Video memory size: 512 MB
INF:  Available for textures: 512 MB
INF:  Active GPU(s): 1
WRN:  Display driver is too old, please update it ASAP!



ETQW
========================================================
[...]
detecting video ram (set sys_videoRam on command line to override) ..
trying /proc/dri/0/umm
guess failed, return default low-end VRAM setting ( 128MB VRAM )
128 MB Video Memory
[...]


Unigine Valley
========================================================
---- System ----
System: Linux 3.11.10-200.fc19.x86_64 x86_64
CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz 3299MHz MMX SSE SSE2 SSE3 SSSE3 SSE41 SSE42 AVX HTT x4
GPU: Unknown GPU x1
System memory: 7954 MB
Video memory:  256 MB
Sync threads:  3
Async threads: 4
Comment 1 Alex Deucher 2013-12-10 18:52:50 UTC
OpenGL does not provide a standard mechanism for applications to query vram size.
Comment 2 Benjamin Bellec 2013-12-10 20:09:43 UTC
How the proprietary driver do?
ETQW seems to try reading /proc/dri/0/umm , what is it?
Comment 3 Alex Deucher 2013-12-10 21:52:12 UTC
Each game does it differently.  There are some vendor specific extensions and some games have tables based on GL vendor strings.
Comment 4 Ian Romanick 2013-12-10 22:43:34 UTC
Newer games can now use the mechanisms provided by GLX_MESA_query_renderer in drivers that support that extension.
Comment 5 Benjamin Bellec 2013-12-11 18:34:35 UTC
OK so I'll close this bug.
Anyway, Ian, GLX_MESA_query_renderer is still in RFC? There is also no implementation in Mesa?
Comment 6 Ian Romanick 2013-12-20 18:40:49 UTC
(In reply to comment #5)
> OK so I'll close this bug.
> Anyway, Ian, GLX_MESA_query_renderer is still in RFC? There is also no
> implementation in Mesa?

In Mesa 10.0, i965 and i915 (classic) support it.  It should be pretty easy for other drivers to get support for it... someone just needs to wire it up.  1e4ce08f is the implementation for i965.
Comment 7 madbiologist 2015-02-22 14:53:00 UTC
This commit to glxinfo looks relevant:

http://cgit.freedesktop.org/mesa/demos/commit/?id=999b6950c644266bb871e79438751bdba2fa2a08


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.