2
# Spandex benchmark and test framework.
4
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
# Contact: Kari J. Kangas <kari.j.kangas@nokia.com>
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.
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
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/>.
21
######################################################################
22
from bmbuilder import Benchmark
23
from lib.common.common import *
24
from lib.geom.mesh import *
27
######################################################################
28
class PrintResourceProfile( Benchmark ):
29
def __init__( self, id ):
30
Benchmark.__init__( self )
32
self.name = "OPENGLES1 resource profile %s (debug)" % ( self.id, )
35
def build( self, target, modules ):
36
Egl = modules[ 'Egl' ]
38
indexTracker = IndexTracker()
40
( width, height, ) = target.getScreenSize()
42
# ------------------------------------------------------------
43
# ------------------------------------------------------------
44
# ------------------------------------------------------------
45
# ------------------------------------------------------------
47
self.beginInitActions()
49
displayIndex = indexTracker.allocIndex( 'EGL_DISPLAY_INDEX' )
50
Egl.GetDisplay( displayIndex, 'SCT_SCREEN_DEFAULT' );
51
Egl.Initialize( displayIndex )
53
Egl.CheckExtension( displayIndex, 'EGL_NOK_resource_profiling' )
55
# ------------------------------------------------------------
56
# ------------------------------------------------------------
57
# ------------------------------------------------------------
58
# Start benchmark actions
59
self.beginBenchmarkActions()
61
Egl.ResourceProfile( displayIndex, [ 0 ] )