<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to query OpenGL Graphics Memory Utilization at Runtime in Developing Games on Intel Graphics</title>
    <link>https://community.intel.com/t5/Developing-Games-on-Intel/How-to-query-OpenGL-Graphics-Memory-Utilization-at-Runtime/m-p/1046250#M1001</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am developing OpenGL Applications on my new Intel(R) HD 4400 (Haswell Architechture) boards. My OpenGL Apps with shaders are working fine. But I need to query the board to get the available Graphics Memory. At runtime I need to know how much memory is utilized so that I can control additional Texture loading in my App.&lt;BR /&gt;
	The &lt;EM&gt;GPUdetect&lt;/EM&gt; sample at Intel Site just gives the maximum available, that too using DirectX. I searched in 4th-gen-core-graphics-dev-guide.pdf but could not find the proper methods.&lt;/P&gt;

&lt;P&gt;Can you please tell the APIs I can use to query the graphics memory utilization at runtime?&lt;/P&gt;

&lt;P&gt;NVidia/ATI provide APIs that we can use too see the memory utilization when an OpenGL App is running.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2014 11:08:20 GMT</pubDate>
    <dc:creator>Piyush_M_</dc:creator>
    <dc:date>2014-06-23T11:08:20Z</dc:date>
    <item>
      <title>How to query OpenGL Graphics Memory Utilization at Runtime</title>
      <link>https://community.intel.com/t5/Developing-Games-on-Intel/How-to-query-OpenGL-Graphics-Memory-Utilization-at-Runtime/m-p/1046250#M1001</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am developing OpenGL Applications on my new Intel(R) HD 4400 (Haswell Architechture) boards. My OpenGL Apps with shaders are working fine. But I need to query the board to get the available Graphics Memory. At runtime I need to know how much memory is utilized so that I can control additional Texture loading in my App.&lt;BR /&gt;
	The &lt;EM&gt;GPUdetect&lt;/EM&gt; sample at Intel Site just gives the maximum available, that too using DirectX. I searched in 4th-gen-core-graphics-dev-guide.pdf but could not find the proper methods.&lt;/P&gt;

&lt;P&gt;Can you please tell the APIs I can use to query the graphics memory utilization at runtime?&lt;/P&gt;

&lt;P&gt;NVidia/ATI provide APIs that we can use too see the memory utilization when an OpenGL App is running.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2014 11:08:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Developing-Games-on-Intel/How-to-query-OpenGL-Graphics-Memory-Utilization-at-Runtime/m-p/1046250#M1001</guid>
      <dc:creator>Piyush_M_</dc:creator>
      <dc:date>2014-06-23T11:08:20Z</dc:date>
    </item>
    <item>
      <title>Hi Piyush,</title>
      <link>https://community.intel.com/t5/Developing-Games-on-Intel/How-to-query-OpenGL-Graphics-Memory-Utilization-at-Runtime/m-p/1046251#M1002</link>
      <description>&lt;P&gt;Hi Piyush,&lt;/P&gt;

&lt;P&gt;As you may or may not know&amp;nbsp;memory that is used by the GPU is shared with intergrated graphics. It comes from the same&amp;nbsp;DRAM the CPU uses .Thus we have physical memory&amp;nbsp;that is&amp;nbsp;partitioned by&amp;nbsp;the OS, and mapped to virtual addresses as needed. The&amp;nbsp;total allocation is the "committed memory", the one that's currently in dram is called the active &lt;A href="http://msdn.microsoft.com/en-us/library/windows/desktop/cc441804%28v=vs.85%29.aspx"&gt;&lt;U&gt;working set&lt;/U&gt;&lt;/A&gt;. If/when the OS runs out of physical backing or as a proactive action it will page out not-so-used app memory to disk, freeing up physical memory. The committed memory doesn't change, but the working set does.&lt;/P&gt;

&lt;P&gt;The best you can hope for is to figure out how big is your working set and total allocation is, and how much physical memory there is in the system.All this is OS controlled and therfore the&amp;nbsp;APIs to figure it out&amp;nbsp;at the OS level: &lt;A href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219%28v=vs.85%29.aspx"&gt;&lt;U&gt;GetProcessMemoryInfo&lt;/U&gt;&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;When you go into the&amp;nbsp;details it quickly becomes overwhelming, because there are a bunch of different types of memory. One that may&amp;nbsp;make sense to look at in our context for "committed" memory is the _PROCESS_MEMORY_COUNTERS_EX.PrivateUsage one.&lt;/P&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;

&lt;P&gt;-Michael&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2014 21:34:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Developing-Games-on-Intel/How-to-query-OpenGL-Graphics-Memory-Utilization-at-Runtime/m-p/1046251#M1002</guid>
      <dc:creator>Michael_C_Intel2</dc:creator>
      <dc:date>2014-07-11T21:34:35Z</dc:date>
    </item>
  </channel>
</rss>

