Jump to content

Recommended Posts

  • Active+ Member
This is the hidden content, please

 

Hello, yesterday while testing in debug mode, I accidentally noticed something.

In the upper right corner, the ATM value was stuck at -1. When I asked a friend who uses a 12GB GPU, he said he was seeing nonsensical values like -51 and -63.
Looking at the code again, I saw that it was due to the 32-bit limit. My GPU is 16GB, but the information displayed on the debug screen was being calculated based on 32-bit (Max. 4GB), causing it to crash and become corrupted.

The GetAvailableTextureMemory function used in Python and C++ is dependent on DirectX, and unfortunately, DirectX 8 and DirectX 9 are very old and return a maximum of 4 billion values (UINT, 4GB).
This means that graphics cards with more than 4GB cannot be correctly included in this calculation. The purpose here is not to show the total capacity of the available GPU on the debug screen, but to show the remaining usable space within the application.

As for the solution; to fix this situation as best as possible, we will use the DXGI library. DXGI is a bit more modern than normal DX libraries and allows us to see the most accurate information under current conditions.First, if you get an unresolved external symbol error during compilation, add the .lib file I provided to your project.

This is the hidden content, please

Edited by Kaiser
  • Metin2 Dev 80
  • Good 6
  • Love 1
  • Love 17
Link to comment
https://metin2.dev/topic/34305-debug-c-dxgi-4gb-gpu-usage-fix/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.