Mtasa-blue: MTA use 128 MB VRAM of 4 GB 560X

Created on 25 Apr 2020  路  16Comments  路  Source: multitheftauto/mtasa-blue

Describe the bug
One of the server's players has a Radeon RX 560X version 4 GB and an AMD processor with a Vega 8 graphics card. dxRenderTarget and dxCreateFont doesn't work for him, script always return false even on freeroam. Changing the drivers to the latest ones didn't fix the problem. Reinstalling MTA doen't work. dxGetStatus returns values:

VideoMemoryUsedByTextures: 413
SettingStreamingVideoMemoryForGTA: 256
VideoCardRAM: 128
VideoMemoryFreeForMTA: 0
(https://pastebin.com/raw/mySPAS2Q)

His MTADiag:
https://pastebin.mtasa.com/515169395

To reproduce
Run MTA

Expected behaviour
MTA should have more VRAM to use

Version
Windows 10 x64,
Multi Theft Auto v1.5.7-release-20447.2

Additional context

bug

Most helpful comment

Yes. That should be fixed in 2eb3cf069d87bd83509e5f3933c767be03c357d2

All 16 comments

is memory put up to full on MTA Settings -> Video ?

Yes, settings below
2
YdP0ubP

For some reason MTA is detecting 128MB of dedicated VRAM, which is what the (integrated) Vega 8 has. Obviously it should be detecting the RX 560X dedicated VRAM which is 3GB

For some reason MTA is detecting 128MB of dedicated VRAM, which is what the (integrated) Vega 8 has. Obviously it should be detecting the RX 560X dedicated VRAM which is 3GB

I saw similar reports many times. For me MTA shows 4 GB of VRAM, although should be 8 GB (GTX 1080)

For me MTA shows 4 GB of VRAM, although should be 8 GB (GTX 1080)

At least this part appears to be a limitation of WMI (which we use to retrieve memory info). WMI uses an unsigned 32 bit integer, which caps out at 2^32 Bytes (which is 4GB). Using more than 4GB of VRAM inside MTA is not really something I'd recommend though, as that would incur heavy swapping of virtual memory.


Regarding the main issue, the logic in SharedUtil.SysInfo.hpp [0] seems a bit off to me. If the RX560X isn't DISPLAY_DEVICE_ATTACHED_TO_DESKTOP, then strDeviceId will be an empty string. As a result, we then just take the first available graphics device, as PNPDeviceID.BeginsWithI("") will always be true. According to the MTADiag log, that first device is the Vega 8.

[0] https://github.com/multitheftauto/mtasa-blue/blob/master/Shared/sdk/SharedUtil.SysInfo.hpp#L336

Please retest with next nightly @MrDadosz (r20522 or above, should be out tomorrow)

With GTX 1050 mta see only 2 GB ( 4 GB total )

Yes. That should be fixed in 2eb3cf069d87bd83509e5f3933c767be03c357d2

@sbx320 Problem isn't solved in current nightly.

Multi Theft Auto v1.5.7-release-20528

The same as before. VideoCardRAM shows 128 MB.

[2020-04-27 13:59:02] [Output] : SettingHighDetailPeds: false [2020-04-27 13:59:02] [Output] : AllowScreenUpload: true [2020-04-27 13:59:02] [Output] : DepthBufferFormat: intz [2020-04-27 13:59:02] [Output] : SettingWindowed: false [2020-04-27 13:59:02] [Output] : VideoCardPSVersion: 3 [2020-04-27 13:59:02] [Output] : TestMode: none [2020-04-27 13:59:02] [Output] : VideoCardNumRenderTargets: 4 [2020-04-27 13:59:02] [Output] : Setting32BitColor: true [2020-04-27 13:59:02] [Output] : VideoCardMaxAnisotropy: 4 [2020-04-27 13:59:02] [Output] : SettingFXQuality: 0 [2020-04-27 13:59:02] [Output] : VideoMemoryUsedByTextures: 432 [2020-04-27 13:59:02] [Output] : SettingAntiAliasing: 0 [2020-04-27 13:59:02] [Output] : SettingVolumetricShadows: false [2020-04-27 13:59:02] [Output] : SettingStreamingVideoMemoryForGTA: 256 [2020-04-27 13:59:02] [Output] : SettingAspectRatio: auto [2020-04-27 13:59:02] [Output] : SettingHUDMatchAspectRatio: true [2020-04-27 13:59:02] [Output] : SettingFullScreenStyle: 0 [2020-04-27 13:59:02] [Output] : SettingAnisotropicFiltering: 0 [2020-04-27 13:59:02] [Output] : VideoMemoryFreeForMTA: 0 [2020-04-27 13:59:02] [Output] : SettingGrassEffect: false [2020-04-27 13:59:02] [Output] : VideoCardName: Radeon RX 560X [2020-04-27 13:59:02] [Output] : UsingDepthBuffer: false [2020-04-27 13:59:02] [Output] : VideoMemoryUsedByFonts: 0 [2020-04-27 13:59:02] [Output] : SettingDrawDistance: 31 [2020-04-27 13:59:02] [Output] : SettingHighDetailVehicles: false [2020-04-27 13:59:02] [Output] : SettingHeatHaze: false [2020-04-27 13:59:02] [Output] : VideoCardRAM: 128 [2020-04-27 13:59:02] [Output] : SettingFOV: 70 [2020-04-27 13:59:02] [Output] : VideoMemoryUsedByRenderTargets: 9

Interesting. Could you try opening a powershell window and running the following command?

  • Get-CimInstance -ClassName Win32_VideoController

Please put that output into some pastebin. I wonder if WMI is reporting something entirely wrong here.

https://pastebin.com/raw/wppevQid

I found the same problem on AMD page, but with no responses - https://community.amd.com/thread/247250

He changed UMA Frame Buffer Size to auto (it was set to 128M). Now Vega uses 2 GB of RAM and dxGetStatus returns 2048 MB of VRAM.

Get-CimInstance -ClassName Win32_VideoController instead of 128 MB returns 2 GB for Vega, 4 GB for 560X.

Fixed here?
@sbx320

Apparently not as per the comments above. As I don't have any hardware to properly debug it, I'm not going to work on it any further either.

I have same problem with nvidia optimus. I see 1GB/4Gb.

Somebody need to test this stuff: https://github.com/TheNormalnij/mtasa-blue/tree/detect_video_memory.
This fix works with nvidia optimus, amd must be tested.

Was this page helpful?
0 / 5 - 0 ratings