-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context3D.totalGPUMemory returns inaccurate values on some non-NVIDIA graphics cards #1816
Comments
Maybe this should help? package lime.graphics.opengl.ext;
@:keep
@:noCompletion class AMD_pinned_memory
{
public var GPU_MEMORY_INFO_DEDICATED_VIDMEM_AMD = 0x9047;
public var GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_AMD = 0x9048;
public var GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_AMD = 0x9049;
public var GPU_MEMORY_INFO_EVICTION_COUNT_AMD = 0x904A;
public var GPU_MEMORY_INFO_EVICTED_MEMORY_AMD = 0x904B;
@:noCompletion private function new() {}
} |
Where did you find this? I'm looking at the documentation for AMD_pinned_memory and I don't see any of these fields, the values seem to be the same as the |
I've searched on Github and randomly found it. |
Maybe this one? package lime.graphics.opengl.ext;
@:keep
@:noCompletion class ATI_meminfo
{
public static inline var VBO_FREE_MEMORY_ATI:Int = 0x87FB;
public static inline var TEXTURE_FREE_MEMORY_ATI:Int = 0x87FC;
public static inline var RENDERBUFFER_FREE_MEMORY_ATI:Int = 0x87FD;
@:noCompletion private function new() {}
} |
I tried playing around with that one when I originally made this issue. A problem with this one is that it doesn't expose a way to get total GPU memory and from my tests the free memory values seem to be kinda inaccurate? It was reporting more than 8GB memory free on my 8GB VRAM GPU |
Context3D.totalGPUMemory
uses the OpenGLNVX_gpu_memory_info
extension to get the used/total amount of video memory. However that extension seems to be mainly be for NVIDIA cards only which leads to inaccurate values on other graphics cards. I think some other graphics cards also support the extension, but it seems to be varied. I have an AMD Radeon RX 6650 XT and the extension isn't supported, causingtotalGPUMemory
to always return 0.There's an
ATI_meminfo
GL extension for AMD graphics cards but it only returns the number of free video memory.The text was updated successfully, but these errors were encountered: