|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-8ED4E590-4FDC-4267-87D9-C7E5E57D6B7E" xml:lang="en"><title>EGL |
|
13 Resource Profiling Extension</title><shortdesc>This topic describes the EGL resource profiling extension, which |
|
14 provides a way to retrieve information about GPU resource utilization. UI |
|
15 middleware can use this extension to find out how much memory is being used |
|
16 by the objects created by EGL.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
17 <p>There are two Nokia EGL resource profiling extensions:</p> |
|
18 <ul> |
|
19 <li><p><b>EGL_NOK_resource_profiling</b>. This extension retrieves data about |
|
20 GPU resource usage level in a synchronous way. EGL client applications can |
|
21 call <codeph>eglQueryProfilingDataNOK()</codeph> after <codeph>eglInitialize()</codeph> to |
|
22 obtain the current resource profiling information.</p></li> |
|
23 <li><p><b>EGL_NOK_resource_profiling2</b>. This extension is based on the |
|
24 EGL_NOK_resource_profiling extension. EGL_NOK_resource_profiling2 additionally |
|
25 provides asynchronous notification of memory usage changes using resource |
|
26 profiling sync objects. This uses the <xref href="GUID-DEA883D0-7C53-407A-AC5D-0A3208E667C7.dita">EGL_KHR_reusable_sync </xref> extension.</p></li> |
|
27 </ul> |
|
28 |
|
29 <section id="GUID-A91A60AC-1DAB-4C48-8B7C-93993DA0A79A"><title><codeph>eglQueryProfilingDataNOK</codeph></title><p>The <codeph>eglQueryProfilingDataNOK()</codeph> extension function retrieves the resource profiling statistics, such as |
|
30 the total amount of graphics memory or the amount of private memory used by |
|
31 a process. </p><p>To obtain an extension function, clients call <codeph>eglGetProcAddress()</codeph> and |
|
32 pass in the function name.</p><p><b>Process ID</b></p><p> The Symbian platform |
|
33 has an 8-byte (64-bit) process ID. <codeph>EGLNativeProcessIdTypeNOK</codeph> is |
|
34 defined as follows:</p><codeblock xml:space="preserve">typedef TUint64 EGLNativeProcessIdTypeNOK;</codeblock><p>When |
|
35 the returned profiling data contains the <codeph>EGL_PROF_PROCESS_ID_NOK</codeph> attribute, |
|
36 the next two 32-bit data elements encode the Symbian 64-bit procecss ID. EGL |
|
37 Client applications can reconstruct the process ID as follows: </p><codeblock xml:space="preserve">EGLNativeProcessIdTypeNOK processId = ((EGLNativeProcessIdTypeNOK)(data[i])) |
|
38 +(((EGLNativeProcessIdTypeNOK)(data[i + 1]))<<32); |
|
39 </codeblock></section> |
|
40 </conbody><related-links> |
|
41 <link href="GUID-A5914CFF-6F86-53E8-9928-36D3379835B1.dita"><linktext>EGL Interface |
|
42 Overview</linktext></link> |
|
43 <link href="GUID-894AB487-C127-532D-852B-37CB0DEA1440.dita"><linktext>Symbian-Specific |
|
44 Behavior</linktext></link> |
|
45 <link href="GUID-46813F51-370B-5853-917C-6916925A347D.dita"><linktext>EGL Tutorial</linktext> |
|
46 </link> |
|
47 <link href="GUID-DC8BFEF5-DA50-52DA-8CE2-5729A4A005F6.dita"><linktext>EGL Collection |
|
48 Overview</linktext></link> |
|
49 <link href="GUID-DEA883D0-7C53-407A-AC5D-0A3208E667C7.dita"><linktext>EGL Reusable |
|
50 Sync Extension</linktext></link> |
|
51 </related-links></concept> |