Home

PVRScope User Manual - Imagination Technologies

image

Contents

1. Outputting Counter Data 6 3 4 lee ie 7 4 PV RSCOPCGCOMIMNS ge EE 8 4 1 ru E 8 4 2 Sending a Custom Mark 8 4 3 Sending a Custom Counter sssssssssssssssssssseee enne ener nnns nnn nennen 9 4 3 1 Additional Initialisation Steps seen 9 4 3 2 Updating and Sending the Counter Value sse 10 4 4 Sending and Receiving Editable Data 10 4 4 1 Additional Initialisation Steps sssssseseeeeeeeeneen nens 11 4 4 2 Retrieving Updated Data 12 4 5 Sending Custom Timing Data 12 4 5 1 Starting a Timing Block 13 4 5 2 Ending a Timing Block 13 4 6 Ss MEER 13 5 ecrit asosns 14 Appendix A PVRScopeStats Example Code eeesseeeseeeeeeeeeeen eene nnns 15 Appendix B PVRScopeComms Example Code esses eeeeeeeen ener nnns 18 B 1 Sending a Custom Mark 18 B 2 Sending Custom Timing Data 18 B 3 Sending a Custom ee Tut 20 B 4 Sending and Retrieving Editable Data 21 Revision PowerVR SDK REL 3 5 3523383a 2 User Manual og Imagination Public Imagination Technologies 1 Introduction 1 1 Document Overview This document is intended as a reference for PVRScope library and provides a number of examples of its use The document covers key topics including how to access the performance counters in PowerVR hardware and send user defined information to PVRTune
2. Note For more information about PVRTune consult the PVRTune User Manual 1 2 Library Overview PVRScope is a utility library which has two functionalities namely PVRScopeStats PVRScope is used to access the hardware performance counters in PowerVR hardware via a driver library called PVRScopeServices e PVRScopeComms PVRScope allows an application to send user defined information to PVRTune via PVRPerfServer as counters timing data and marks or as editable data that can be passed back to the application PVRScope is supplied in the following files e PVRScopeStats h This is the header file defining the PVRScopeStats functionality e PVRScopeComms h This is the header file defining the PVRScopeComms functionality e PVRScopeDeveloper lib This is the PVRScope library file 1 2 1 Library Compatibility Currently PVRScope libraries installed on Windows machines only function with Visual Studio 2010 and later versions 1 2 2 PVRScopeStats Limitations The following are the limitations to PVRScopeStats e Only one instance of PVRScopeStats may communicate with PVRScopeServices at any given time If a PVRScopeStats enabled application attempts to communicate with PVRScopeServices at the same time as another such application or at the same time as PVRPerfServer conflicts can occur that may make performance data unreliable In this case PVRPerfServer can be run with the disable hwperf flag e Performance counte
3. Comms pplInitialise threadName c str unsigned int threadName length 4 Repeat Steps 2 and 3 for each additional timeline which should appear in PVRTune 4 2 Sending a Custom Mark To send a custom mark 1 Create a title for the mark Create the custom mark Std string customMarkTitle Custom Mark 2 Send the mark to PVRTune pplSendMark PVRScopeComms cus convar epa EUR unsigned int customMarkTitle length Revision PowerVR SDK REL 3 5 3523383a 8 User Manual og Imagination Public Imagination Technologies 4 3 Sending a Custom Counter A counter is an accumulator that is used by PVRTune to only display the per frame and per second rates i e rate of change values of that accumulator A counter should only increment meaning it must never reset or decrease but it may warp Furthermore a counter cannot display absolute values The following exemplify counter usage in PVRTune e Cars being rendered Increment counter every time a car is rendered or alternatively increment once per frame for the number of cars that will be rendered PVRTune will calculate the cars rendered per frame and cars rendered per second e Healing health received Every time a character receives health increment the counter by the quantity PVRTune will generate healing per second and healing per frame 4 3 1 Additional Initialisation Steps To send a custom counter a number of additional init
4. K REL_3 5 3523383a Imagination Technologies Public og imagination 4 4 2 Retrieving Updated Data To retrieve updated data 1 Create a number of temporary variables to hold the updated data Used to determine the length of strings unsigned int itemLength 0 Used to determine which item in editableItemArray the updated refers to unsigned int itemNum 0 A pointer to the edited item const char itemData NULL A float to store the returned value in float melen 0 2 In a loop retrieve each dirty item while pplLibraryDirtyGetFirst PVRScopeComms itemNum itemLength amp itemData 1 3 Determine the items type based on its item number based on the enumerators created in Step 1 if itemNum eNUMBER OF EDITABLE FLOATS 4 Retrieve the editable item For example retrieving a float SSPSCommsLibraryTypeFloat newItemData SSPSCommsLibraryTypeFloat itemData arbitraryFloat newItemData gt fCurrent Note Retrieving a string is a special case The string should be created in advance and retrieved as follows arbitraryString assign itemData itemLength 5 Use the retrieved data to update the application 4 5 Sending Custom Timing Data PVRTune has the ability to display custom timing data similar to that displayed for the TA and 3D tasks This custom timing data appears in the timeline created using ppl Initialise Each block of the custom timing data is s
5. PVRScopeData SPVRScopeCounterDef ppsCounters SPVRScopeCounterReading const psReading unsigned int const pnCount Initialise PVRScope const EPVRScopeInitCode eInitCode PVRScopeInitialise ppsPVRScopeData if ePVRScopeInitCodeOk eInitCode LOGI Initialised services connection n else LOGE Error failed to initialise services connection n ppsPVRScopeData NULL return false Initialise the counter data structures if PVRScopeGetCounters ppsPVRScopeData pnCount ppsCounters psReading LOGI Total counters enabled d pnCount return true int main Internal control data SPVRScopeImplData psData Counter information set at uint time SPVRScopeCounterDef psCounters unsigned int uCounterNum Counter reading data unsigned int uActiveGroupSelect bool bActiveGroupChanged SPVRScopeCounterReading sReading Step 2 Initialise PVRScopeStats PVRScope 15 Revision PowerVR SDK REL_3 5 3523383a Imagination Technologies Public og imagination if PSInit amp psData amp psCounters amp sReading amp uCounterNum LOGI PVRScope up and running else LOGH Error initializing PVRScope Print each and every counter and its group LOGI Find below the list of counters Gorm aint i S Ope UC utc NUn a5 LOGI Group d s psCounters i nGroup psCounters i pszName Step 3 Set the active group to 0 bActiveGroupC
6. StatsData amp counterReading activeGroup It is to be noted that there are some limitations to the PVRScopeReadCounters and PVRScopeSetGroup functions The functions have to be called regularly to allow PVRScope to track the latest hardware performance data If psReading is not NULL PVRScope will also calculate and return counter values to the application There are two use cases for calling the function e A 3D application rendering a performance HUD e g the on screen graphs in PVRScopeStats Example see Appendix A Such an application should call this function at least once per frame in order to gather new counter values If slower HUD updates are desired psReading may be NULL until a new reading is required in order to smooth out values across longer time periods perhaps for a number of frames e A standalone performance monitor e g PVRMonitor or logging application Such an application should idle and regularly wake up to call this function Suggested rates are 100Hz 10ms delays or 200Hz 5ms delays If counter updates are required at a lower rate set psReading to NULL on all calls except when new counter values are desired see Appendix A 3 3 Outputting Counter Data To output counter data perform the following steps in a loop from i 0 to i numCounters 1 Check if the counter has been updated and only perform Steps 2 through 5 if it has if i lt counterReading nValueCnt 2 Check if the counter is given as a per
7. TRARY EDITABLE STRING A4 Se Les scaccia balves editableItemArray i pszName Arbitrary String editableItemArray i eType eSPSCommsLibTypeString PVRScope 21 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination editableItemArray i itemData arbitraryString c str editableItemArray i nDataLength arbitraryString length break default return false editableItemArray i nNameLength unsigned int strlen editableItemArray i pszName Step 4 Submit the array of editable items to PVRTune if pplLibraryCreate PVRScopeComms editableItemArray numEditableItems 1 Error handling goes here Sleep for a bit so we have time to receive some data from PVRTune Sleep 1000 Step 5 Retrieve the updated items from PVRTune unsigned int itemNum 0 unsigned int itemLength 0 const char itemData NULL while pplLibraryDirtyGetFirst PVRScopeComms itemNum itemLength amp itemData Update the item referred to by itemNum with data if itemNum lt eNUMBER OF EDITABLE FLOATS switch itemNum case eARBITRARY EDITABLE FLOAT SSPSCommsLibraryTypeFloat newlItemData SSPSCommsLibraryTypeFloat itemData arbitraryFloat newItemData gt fCurrent break default Handle unknown float break else switch itemNum eNUMBER OF EDITABLE FLOATS case eARBITRARY EDITABLE STRING arbitraryString assign itemData itemLengt
8. centage bool isPercentage counterDefinitions i bPercentage 3 Retrieve the name of the counter std string counterName counterDefinitions i pszName 4 Retrieve the value of the counter float counterValue counterReading pfValueBuf i 5 Output the value of the counter For example using printf Revision PowerVR SDK REL_3 5 3523383a 6 User Manual m Imagination If it is a percentage output the symbol if isPercentage EE ss else printer 3 4 Shutdown Public Imagination Technologies fN counterName counterValue counterName counterValue To shutdown PVRScopeStats call the shutdown functions as follows PVRScopeDeInitialise PVRScopeStatsData counterDefinitions counterReading For a more in depth example see Appendix A PVRScope 7 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination 4 PVRScopeComms PVRScopeComms allows an application to send user defined information to PVRTune via PVRPerfServer both as counters timing data and marks or as editable data that can be passed back to the application 4 1 Initialisation To initialise PVRScopeComms 1 Include the PVRScope header file include PVRScopeComms h 2 Create a name for the timeline as it should appear in PVRTune std string threadName Main Thread 3 Initialise the communication with PVRTune Init Comms SSPSCommsData PVRScopeComms PVRScope
9. e Step 4 Send an initial value for that counter to PVRTune int newCounterValue 0 unsigned int newValueArray eNUM CUSTOM COUNTERS for unsigned int i 0 i lt unsigned int eNUM CUSTOM COUNTERS i newValueArray eARBITRARY COUNTER newCounterValue Submit counters for transmission pplCountersUpdate PVRScopeComms newValueArray Step 5 Update the counter once and send the updated counter to PVRTune newCounterValue 100 for unsigned int i 0 i lt unsigned int eNUM CUSTOM COUNTERS i newValueArray eARBITRARY COUNTER newCounterValue Submit counters for transmission pplCountersUpdate PVRScopeComms newValueArray Step 6 Shutdown PVRScopeComms pplShutdown PVRScopeComms Revision PowerVR SDK REL 3 5 3523383a 20 User Manual og Imagination Public Imagination Technologies B 4 Sending and Retrieving Editable Data IA This example code consists of six steps Create an array of editable items Setup PVRScopeComms Create default values for the editable items Submit the array of editable items to PVRTune Retrieve the updated items from PVRTune Shutdown PVRScopeComms Ao 4 WN H KK K KK k k k k k Ck KC AK KK A A k k kk k k kok k k ok A k A ok k kk k k k k ko ke kk k ok ok k k k k k kk k ko ke ke eee k f include lt stdlib gt include PVRScopeComms h Step l Create an array of editable items enum PVRScopeEditableFloat
10. e Custom Counter to PVRTune Send an initial value for that counter to PVRTune Update the counter once and send the updated counter to PVRTune Shutdown PVRScopeComms OY C1 M BUN H kokokok KK KK KK kk ko ke k k k k kok k k k k k k k k k k k k k k k k k k k k k k k k k k k k ko kok k kk kk k kk kk k k k ko kok kok kk kkk KKK k k ke ke ke ke e e e x f include PVRScopeComms h Setup an enum of custom counters to make life easier later enum PVRScopeCustomCounters eARBITRARY COUNTER eNUM CUSTOM COUNTERS Step 1 Setup PVRScopeComms SSPSCommsData PVRScopeComms std string timelineTitle Example PVRScopeComms pplInitialise timelineTitle unsigned int timelineTitle length Step 2 Create a Custom Counter Std string customCounterName SSPSCommsCounterDef PVRScopeCustomCounterArray eNUM CUSTOM COUNTERS for unsigned int i 0 i unsigned int eNUM CUSTOM COUNTERS i switch i case eARBITRARY COUNTER customCounterName Arbitrary Counter break default customCounterName Unnamed counter break PVRScopeCustomCounterArray eARBITRARY COUNTER pszName customCounterName c str PVRScopeCustomCounterArray eARBITRARY COUNTER nNameLength customCounterName length Step 3 Submit the Custom Counter to PVRTune if pplCountersCreate PVRScopeComms PVRScopeCustomCounterArray eNUM CUSTOM COUNTERS Error handling goes her
11. eps In order to send editable data a number of additional initialisation steps must be performed 1 Set up enumerators of possible editable items one for each data type From this determine the total number of editable items enum PVRScopeEditableFloats eARBITRARY EDITABLE FLOAT eNUMBER OF EDITABLE FLOATS enum PVRScopeEditableStrings eARBITRARY EDITABLE STRING eNUMBER OF EDITABLE STRINGS r const unsigned int numEditableItems unsigned int eNUMBER OF EDITABLE FLOATS unsigned int eNUMBER OF EDITABLE STRINGS 2 Create the editable item array SSPSCommsLibraryItem editableltemArray numEditableItems 3 Initialise the editable items by giving them default values for unsigned int i 0 i numEditableItems i Set some arbitrary float data float arbitraryFloat 3 5f float srbitrsryStriug Arbitrary String Create an editable float object SSPSCommsLibraryTypeFloat scopeFloat editableItemArray i pszName arbitraryString editableItemArray i eType eSPSCommsLibTypeFloat scopeFloat fCurrent arbitraryFloat scopeFloat fMin 0 0f scopeFloat fMax 200 0f Add the float object to the editable item editableItemArray i itemData const char amp scopeFloat editableItemArray i nDataLength sizeof scopeFloat 4 Send the editable items to PVRTune pplLibraryCreate PVRScopeComms editableItemArray numEditableItems PVRScope 11 Revision PowerVR SD
12. h break default Handle unknown string break Step 6 Shutdown PVRScopeComms pplShutdown PVRScopeComms Revision PowerVR SDK REL 3 5 3523383a 22 User Manual og imagination Public Imagination Technologies Imagination Technologies the Imagination Technologies logo AMA Codescape Ensigma IMGworks I2P PowerVR PURE PURE Digital MeOS Meta MBX MTX PDP SGX UCC USSE VXD and VXE are trademarks or registered trademarks of Imagination Technologies Limited All other logos products trademarks and registered trademarks are the property of their respective owners PVRScope 23 Revision PowerVR SDK REL 3 5 03523383a
13. hanged true uActiveGroupSelect 0 unsigned int sampleRate 100 unsigned int index 0 unsigned int i 0 while i lt NUMBER OF LOOPS Ask for the active group 0 only on the first run if bActiveGroupChanged PVRScopeSetGroup psData uActiveGroupSelect bActiveGroupChanged false index if index lt sampleRate Sample the counters every 10ms Don t read or output it PVRScopeReadCounters psData NULL else SE index 0 Step 4 Read and output the counter information for group 0 to Logcat if PVRScopeReadCounters psData amp sReading Check for alll the counters in the system if the counter has a value on the given active group and ouptut it for int i 0 i lt uCounterNum i if i lt sReading nValueCnt Print the 3D Load if strcmp psCounters i pszName GPU task load 3D core 0 LOGI Ss fN psCounters i pszName sReading pfValueBuf i Print the TA Load else if strcmp psCounters i pszName GPU task load TA core 0 LOGI Ss fN psCounters i pszName sReading pfValueBuf i Poll for the counters once a second usleep 10 1000 Step 5 Shutdown PVRScopeStats PVRScopeDeInitialise amp psData amp psCounters amp sReading Revision PowerVR SDK REL 3 5 3523383a 16 User Manual Og imagination Public Imagination Technologies PVRScope 17 Revision PowerVR SDK REL_3 5 3523383a Imagina
14. ialisation steps must be performed 1 Set up an enumerator of possible custom counters This contains one entry per counter and an entry containing the total number of counters enum PVRScopeCustomCounters eARBITRARY COUNTER eNUM CUSTOM COUNTERS 2 Define a custom counter array SSPSCommsCounterDef PVRScopeCustomCounterArray eNUM CUSTOM COUNTERS 3 Set the name of each counter std string customCounterName eNUM CUSTOM COUNTERS for unsigned int i 0 i unsigned int eNUM CUSTOM COUNTERS i switch i case eARBITRARY COUNTER customCounterName i Arbitrary Counter break default customCounterName i Unnamed counter break PVRScopeCustomCounterArray i pszName customCounterName i c str PVRScopeCustomCounterArray i nNameLength customCounterName i length 4 Define an array of integers to hold the values as they are updated for each frame unsigned int newValueArray eNUM CUSTOM COUNTERS 0 5 Submit the array of counters pplCountersCreate PVRScopeComms PVRScopeCustomCounterArray eNUM CUSTOM COUNTERS PVRScope 9 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination 4 3 2 Updating and Sending the Counter Value To update and send the counter value perform the following 1 Set a new value for any counter that needs updating For example updating eARBITRARY COUNTER to increment by a value of 2 int newCounte
15. ion Public Imagination Technologies Appendix A PVRScopeStats Example Code J E K K K KK KKK kk kk ke ke k KK k kk KA ke ke kk k k k A K K kk k k k k k ke k kk k k k A k k k k kk k k k ke kk k k k k k k k k k k k k KK k k KK This example outputs the values of the hardware counters found in Group 0 to Android Logcat once a second for 60 seconds and consists of five steps Define a function to initialise PVRScopeStats Initialise PVRScopeStats Set the active group to 0 Read and output the counter information for group 0 to Logcat Shutdown PVRScopeStats UV B UN HE KK Kk k k k k kok kok k k ok kok k k kok k kok k kok k k ke ee kk ok kok k k k k k k ok k kok kok kok kok k kk k k k k kok ko kk kkk kk k k kk k k k k ke ke ke ee e x f include lt android log h gt Few macro definitions here define LOGV android log print ANDROID LOG VERBOSE PVRScope VA ARGS define LOGD android log print ANDROID LOG DEBUG PVRScope VA ARGS define LOGI android log print ANDROID LOG INFO PVRS COD Chu EAM SE define LOGW _ android log print ANDROID LOG WARN EN CODEC a VARARGS I define LOGE android log print ANDROID LOG ERROR PVRScope VA ARGS define NUMBER OF LOOPS 60 include unistd h include lt string h gt include lt jni h gt include PVRScopeStats h Step 1 Define a function to initialise PVRScopeStats bool PSInit SPVRScopeImplData pps
16. og Imagination Public Imagination Technologies PowerVR by imagination PVRScope User Manual Copyright Imagination Technologies Limited All Rights Reserved This publication contains proprietary information which is subject to change without notice and is supplied as is without warranty of any kind Imagination Technologies and the Imagination Technologies logo are trademarks or registered trademarks of Imagination Technologies Limited All other logos products trademarks and registered trademarks are the property of their respective owners Filename PVRScope User Manual Version PowerVR SDK REL 3 5 3523383a External Issue Issue Date 17 Apr 2015 Author Imagination Technologies Limited PVRScope 1 Revision PowerVR SDK REL_3 5 3523383a Imagination Technologies Public og imagination Contents 1 MEO TT e E 3 1 1 Document Overview u eee ee ee eee anne nA PA KKK KKK KRKA treten rennen nsn nnn intense ns 3 1 2 Library Ovenleuw u eee eee eee anne nen KP KK KARA RKK PAK KKK R K LKAA RKK inns AKA Kent nnns 3 1 2 1 Library Compatibility assesses eene KARA Penn 3 1 2 2 PVRScopeStats Limitations ssssssssssesees eene 3 1 2 3 PVRScopeComms Limitations sess 3 InstallatOl m E 4 PV RS COP CSAS acs cada I R M M 5 3 1 UELUT jc 5 3 2 Reading Counter Data 5 3 3
17. peServices 3 1 initialisation To initialise PVRScopeStats 1 Include the PVRScope header file include PVRScopeStats h 2 Define the control structures Defines define NO GROUP CHANGE Oxffffffff Internal control data SPVRScopeImplData PVRScopeStatsData Counter information SPVRScopeCounterDef counterDefinitions unsigned int numCounters Counter reading data unsigned int activeGroup unsigned int selectedGroup bool activeGroupChanged SPVRScopeCounterReading counterReading 3 Initialise communication with PVRScopeServices PVRScopeInitialise PVRScopeStatsData 4 Set up the counter data structures PVRScopeGetCounters PVRScopeStatsData numCounters counterDefinitions counterReading Note PVRScopeFindStandardCounter is a function that makes setting up counter data structures more efficient Rather than listing all the counters available it presents an indexed list of common counters 3 2 Reading Counter Data To update counter data 1 Set activeGroup to one of the following e A new Group ID if the next counters to be read are in a different group e Oxffffffffifno group change is required PVRScope 5 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination 2 Read the current counter values and set the group for the next update PVRScopeReadCounters PVRScopeStatsData amp counterReading activeGroup PVRScopeSetGroup PVRScope
18. rValue 2 newValueArray eARBITRARY COUNTER newCounterValue 2 Send the list of updated values to PVRTune pplCountersUpdate PVRScopeComms newValueArray 4 4 Sending and Receiving Editable Data The following data types can be sent to PVRTune for editing Boolean Enumerator Float Integer and String All of these items are stored as instances of SSPSCommsLibraryItem with eType Stating the data type of the item and pData containing the actual item The name of the item as it appears in PVRTune is based on the value of pszName Full stops placed in pszName can be used to create categories and sub categories which PVRTune displays as a foldable tree view For example e Category names Category A SubCategory A Category A SubCategory A Category A SubCategory B Category B SubCategory A Category B SubCategory A e Foldable tree view Category A SubCategory A Item 1 Item 2 SubCategory B Item 1 Category B SubCategory A Item 1 Item 2 The process of sending and receiving editable data consists of three steps namely initialising the editable data sending the data to PVRTune at initialisation time and then retrieving updates to the data The first two steps are usually performed simultaneously and as such the examples identified next follow this approach Revision PowerVR SDK REL 3 5 03523383a 10 User Manual og Imagination Public Imagination Technologies 4 4 1 Additional Initialisation St
19. rs can only be read on devices whose drivers have been built with hardware profiling enabled This configuration is the default in most production drivers due to negligible overhead Performance counters contain the average value of that counter from the last time the counter was interrogated 1 2 3 PVRScopeComms Limitations The following are limitations of PVRScopeComms e PVRPerfServer must be running on the host device if a PVRScopeComms enabled application wishes to send custom counters or marks to PVRTune e Only the following types may be sent Boolean Enumerator Float Integer and String PVRScope 3 Revision PowerVR SDK REL_3 5 3523383a Imagination Technologies Public og imagination 2 Installation PVRScope can be installed from the PowerVR Graphics SDK installer 1 Navigate to the PowerVR Insider SDK webpage powervrinsider com and download the SDK 2 Launch the installer and follow the on screen instructions Once the SDK has been successfully installed the library files can be found at the SDK location lt InstallDir gt PVRScope Note To access the functionality of the library within an application the library must be linked to and the header files included at build time Revision PowerVR SDK REL_3 5 3523383a 4 User Manual og Imagination Public Imagination Technologies 3 PVRScopeStats PVRScopeStats is used to access the performance counters in PowerVR hardware via a driver library called PVRSco
20. s eARBITRARY EDITABLE FLOAT eNUMBER OF EDITABLE FLOATS enum PVRScopeEditableStrings eARBITRARY EDITABLE STRING eNUMBER OF EDITABLE STRINGS const unsigned int numEditableItems unsigned int eNUMBER OF EDITABLE FLOATS unsigned int eNUMBER OF EDITABLE STRINGS SSPSCommsLibraryItem editableItemArray numEditableItems Step 2 Setup PVRScopeComms SSPSCommsData PVRScopeComms std string timelineTitle Example PVRScopeComms pplInitialise timelineTitle unsigned int timelineTitle length Step 3 Create default values for the editable items LOE amissi m iE at 3 Sieg float arbitraryString Arbitrary String for unsigned int i 0 i lt numEditableItems i If the editable item is a float WE lt eNUMBER OF EDITABLE FLOATS Create the float SSPSCommsLibraryTypeFloat scopeFloat switch i case eARBITRARY EDITABLE FLOAT i See Wea susce valves editableItemArray i pszName Arbitrary Float editableItemArray i eType eSPSCommsLibTypeFloat scopeFloat fCurrent arbitraryFloat scopeFloat fMin 0 0f ScopeFloat fMax 200 0f break default return false Add the float object to the editable item editableItemArray i itemData const char amp scopeFloat editableItemArray i nDataLength sizeof scopeFloat else The editable item is a string because we re only using strings and floats switch i eNUMBER OF EDITABLE FLOATS case eARBI
21. tarted with a call to pplSendProcessingBegin and ended with a callto pplSendProcessingEnd Note These calls cannot be nested Revision PowerVR SDK REL 3 5 3523383a 12 User Manual og Imagination Public Imagination Technologies 4 5 1 Starting a Timing Block To start a timing block complete the following instructions 1 Determine the current frame unsigned int currentFrame 0 2 Give the timing block a name SEC Gegen LUMENS time p 3 Call pp1SendProcessingBegin pplSendProcessingBegin PVRScopeComms ustellen SEI unsigned int funcName length currentFrame 4 5 2 Ending a Timing Block To end a timing block call pp1SendProcessingEnd as follows pplSendProcessingEnd PVRScopeComms 4 6 Shutdown To shutdown PVRScopeComms call the shutdown function as follows pplShutdown PVRScopeComms For more in depth examples see Appendix B PVRScope 13 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination 5 Contact Details For further support visit our forum http forum imgtec com Or file a ticket in our support system https pvrsupport imgtec com To learn more about our PowerVR Graphics SDK and Insider programme please visit http www powervrinsider com For general enguiries please visit our website http imgtec com corporate contactus asp Revision PowerVR SDK REL_3 5 3523383a 14 User Manual og Imaginat
22. tion Technologies Public og imagination Appendix B PVRScopeComms Example Code B 1 Sending a Custom Mark KKK KKK KK KKK ke ke ke ko kk KK k k k k kok ke ko kok kk kk Sk kk k k k k KC A K k k k k A k k k k k k k k ko A KKK ko k ke ke kk KORG k k ke e e e k This example code consists of four steps Setup PVRScopeComms Create a Custom Mark Send the Custom Mark to PVRTune Shutdown PVRScopeComms dS CN P Ek kk CK kk k kk ko kk k kk kk k Ee Ee Ee Ee Ee kk kk kk kk kk ke kk include PVRScopeComms h Step 1 Setup PVRScopeComms SSPSCommsData PVRScopeComms std string timelineTitle Example PVRScopeComms pplInitialise timelineTitle unsigned int timelineTitle length Step 2 Create a Custom Mark Std string customMarkTitle Custom Mark Step 3 Send the Custom Mark to PVRTune if pplSendMark PVRScopeComms cus convar Malic Me sor Sieie fL z unsigned int customMarkTitle length Error handling goes here Step 4 Shutdown PVRScopeComms pplShutdown PVRScopeComms B 2 Sending Custom Timing Data IA This example code consists of four steps Setup two functions to time Setup PVRScopeComms Call the two functions to end the Custom Timing Data to PVRTune Shutdown PVRScopeComms Va GA M Ek RRA RR ARR ARR kk kk kk kk kk k kk kk kk kk kk AAR A A I include PVRScopeComms h Step 1 Setup two functions
23. to time Function that pretends to do some work void Foo SSPSCommsData comms unsigned int frameNum Stel Geng Arten me p pplSendProcessingBegin comms funcName unsigned int funcName length frameNum Pretend to do some work sleep 1 pplSendProcessingEnd comms Function that pretends to do a bit more work void Bar SSPSCommsData comms unsigned int frameNum EIERE pplSendProcessingBegin comms funcName unsigned int funcName length frameNum Revision PowerVR SDK REL_3 5 3523383a 18 User Manual og Imagination Public Imagination Technologies Pretend to do some work sleep 2 pplSendProcessingEnd comms Step 2 Setup PVRScopeComms SSPSCommsData PVRScopeComms std string timelineTitle Example PVRScopeComms pplInitialise timelineTitle unsigned int timelineTitle length Step 3 Send Custom Timing Data to PVRTune unsigned int currentFrame 0 for unsigned int 1 O 1 lt 100 i Foo PVRScopeComms currentFrame Bar PVRScopeComms currentFrame currentFrame t Step 4 Shutdown PVRScopeComms pplShutdown PVRScopeComms PVRScope 19 Revision PowerVR SDK REL 3 5 03523383a Imagination Technologies Public og imagination B 3 Sending a Custom Counter KKK KK EE EE RRA ARAKI RRR A RRR ARORA ARR AAR A A AO I e ke ke This example code consists of six steps Setup PVRScopeComms Create a Custom Counter Submit th

Download Pdf Manuals

image

Related Search

Related Contents

Canon 3747B002 All in One Printer User Manual  123  Toshiba ZL1/55 User's Manual  MODE D`EMPLOI  Philips Jam Jacket DLA40103  English 4 Deutsch 9 Français 14 Čeština 19 Magyar 24 Polski 30  to SN 539, Z-34/22N  取扱説明書 - 日立の家電品  DGP01361AAA Issue 1-01 Setup Guidelines for SimREMOTE with a  

Copyright © All rights reserved.
Failed to retrieve file