• Advertisement
Sign in to follow this  

how much dedicated memory the PC GPU has

This topic is 1735 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there any code that lets me see how much memory the PC has?

My application changes radically the more memory it can has.

Edited by lomateron

Share this post


Link to post
Share on other sites
Advertisement

you can query the amount of GPU memory using DXGI.

something like this : 

IDXGIFactory *factory;
uint32 index = 0: 
if( SUCCEEDED(CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory)) ) 
{
	IDXGIAdapter* adapter = NULL; 
	while (factory->EnumAdapters(index, &adapter) != DXGI_ERROR_NOT_FOUND) 
	{ 
		DXGI_ADAPTER_DESC desc; 
		if (SUCCEEDED(adapter->GetDesc(&desc))) 
		{ 
			std::cout << desc.DedicatedVideoMemory << std::endl;
		}
		
		++index;
	}
}

 

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement