MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

Optimising performance for OpenGL applications

The default SGX parameter buffer size is 2 MiB. This is sufficient for most applications - simple applications can often manage with ~0.1 MiB. However, to safeguard against a bug in the current generation of the SGX chip, a minimum size of 2 MiB is strongly recommended. Moreover, the applications may need an even larger parameter buffer if, for instance:

  • they use OpenGL ES extensively (for example, games)
  • they generate lots of geometry (for instance, because they render a lot of text without using QStaticText or cause Qt to use off-screen rendering)

Note: If your application needs a larger parameter buffer, try to solve the issue first by other means because it is likely that the application does not reach good performance and wastes resources. Only increase the parameter buffer size if it is really necessary for your application.

To determine the necessary increase in the parameter buffer size:

  1. Determine your parameter buffer usage. Open the /etc/powervr.ini file.
  2. Go to the [default] section in the file and add the following line:
     EnableParamBufferWatermark=1 
    
  3. Reboot your device.
  4. Use your application's most graphics intensive parts.
  5. Open the /tmp/ParamBufferWaterMark.log file.
    If the values exceed 100 %, proceed to the next step. Otherwise you do not need to modify the parameter buffer.
    If the parameter buffer is exhausted, you can see a message on the serial console / dmesg output.
  6. To increase the parameter buffer of your application, add the following text file to your application package:
     /etc/powervr.d/<yourappname>.ini 
    
  7. Add the following line to the file with the increased parameter buffer size:
    ParamBufferSize=<parameter buffer size>
    
    The parameter buffer size is expressed in bytes and must be divisible by the hardware page size (4096).
    For example:
    ParamBufferSize=6291456
    
  8. Delete the following line from /etc/powervr.ini file:
     EnableParamBufferWatermark=1 
    

The parameter buffer has now been increased, which improves the performance of your application if you previously ran out of parameter buffer space.