Add more structure constructor tests.
[piglit/hramrach.git] / tests / glean / tchgperf.h
blob11f3bd7e77d678cb1ce85ea5c2674786a2f7d151
1 // BEGIN_COPYRIGHT -*- glean -*-
2 //
3 // Copyright (C) 1999 Allen Akin All Rights Reserved.
4 //
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
12 // conditions:
13 //
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the
16 // Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
19 // KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20 // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ALLEN AKIN BE
22 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 // OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 // DEALINGS IN THE SOFTWARE.
26 //
27 // END_COPYRIGHT
30 // tchgperf.h: Some basic tests of attribute-change performance.
32 #ifndef __tchgperf_h__
33 #define __tchgperf_h__
35 #include "tbase.h"
37 namespace GLEAN {
39 #define drawingSize 128 // must be power-of-2, 128 or greater
41 class TexBindPerfResult: public BaseResult {
42 public:
43 bool pass;
44 double bindTime;
45 double lowerBound;
46 double upperBound;
48 TexBindPerfResult() { bindTime = lowerBound = upperBound = 0.0; }
50 void putresults(ostream& s) const {
51 s << bindTime
52 << ' ' << lowerBound
53 << ' ' << upperBound
54 << '\n';
57 bool getresults(istream& s) {
58 s >> bindTime >> lowerBound >> upperBound;
59 return s.good();
64 class TexBindPerf: public BaseTest<TexBindPerfResult> {
65 public:
66 GLEAN_CLASS_WH(TexBindPerf, TexBindPerfResult,
67 drawingSize, drawingSize);
68 }; // class TexBindPerf
70 } // namespace GLEAN
72 #endif // __tchgperf_h__