~linaro-graphics-wg/+junk/spandex-package

« back to all changes in this revision

Viewing changes to bd/benchmarks/opengles1/resources.py

  • Committer: Alexandros Frantzis
  • Date: 2011-05-04 08:50:52 UTC
  • Revision ID: alexandros.frantzis@linaro.org-20110504085052-88gps4jrg317s6lc
Tags: upstream-1.1.3~git20110502.0ae20368
ImportĀ upstreamĀ versionĀ 1.1.3~git20110502.0ae20368

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Spandex benchmark and test framework.
 
3
#
 
4
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 
5
#
 
6
# Contact: Kari J. Kangas <kari.j.kangas@nokia.com>
 
7
#
 
8
#   This framework is free software; you can redistribute it and/or modify it
 
9
# under the terms of the GNU Lesser General Public License as published by the
 
10
# Free Software Foundation, version 2.1 of the License.
 
11
#
 
12
#   This framework is distributed in the hope that it will be useful, but
 
13
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
14
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 
15
# for more details.
 
16
#
 
17
#   You should have received a copy of the GNU Lesser General Public License
 
18
# along with this framework; if not, see <http://www.gnu.org/licenses/>.
 
19
#
 
20
 
 
21
######################################################################
 
22
from bmbuilder         import Benchmark
 
23
from lib.common.common import *
 
24
from lib.geom.mesh     import *
 
25
from common            import *
 
26
 
 
27
######################################################################
 
28
class PrintResourceProfile( Benchmark ):  
 
29
    def __init__( self, id ):
 
30
        Benchmark.__init__( self )
 
31
        self.id = id
 
32
        self.name = "OPENGLES1 resource profile %s (debug)" % ( self.id, )
 
33
        self.repeats = 1
 
34
 
 
35
    def build( self, target, modules ):
 
36
        Egl = modules[ 'Egl' ]
 
37
 
 
38
        indexTracker = IndexTracker()
 
39
 
 
40
        ( width, height, ) = target.getScreenSize()
 
41
       
 
42
        # ------------------------------------------------------------
 
43
        # ------------------------------------------------------------
 
44
        # ------------------------------------------------------------
 
45
        # ------------------------------------------------------------        
 
46
        # Init actions       
 
47
        self.beginInitActions()
 
48
 
 
49
        displayIndex = indexTracker.allocIndex( 'EGL_DISPLAY_INDEX' )
 
50
        Egl.GetDisplay( displayIndex, 'SCT_SCREEN_DEFAULT' );
 
51
        Egl.Initialize( displayIndex )
 
52
        
 
53
        Egl.CheckExtension( displayIndex, 'EGL_NOK_resource_profiling' )
 
54
        
 
55
        # ------------------------------------------------------------
 
56
        # ------------------------------------------------------------
 
57
        # ------------------------------------------------------------        
 
58
        # Start benchmark actions
 
59
        self.beginBenchmarkActions()
 
60
           
 
61
        Egl.ResourceProfile( displayIndex, [ 0 ] )
 
62