Jump to content

  • Log In with Google      Sign In   
  • Create Account

how much dedicated memory the PC GPU has


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   -  Reputation: 363

Like
0Likes
Like

Posted 22 April 2013 - 10:06 PM

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, 23 April 2013 - 12:15 AM.


Sponsor:

#2 Yourself   Crossbones+   -  Reputation: 1189

Like
2Likes
Like

Posted 23 April 2013 - 12:59 AM

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;
	}
}

 

 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS