Add more structure constructor tests.
[piglit/hramrach.git] / tests / glean / tdepthstencil.h
blob0709f733ce9bba4f2138554aa9c1d371346fbba4
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
29 // tdepthstencil.h: Test GL_EXT_packed_depth_stencil extension.
30 // Brian Paul 1 October 2005
32 #ifndef __tdepthstencil_h__
33 #define __tdepthstencil_h__
35 #include "tbase.h"
37 namespace GLEAN {
39 #define drawingSize 1000
40 #define windowSize (drawingSize + 2)
42 class DepthStencilResult: public BaseResult
44 public:
45 bool pass;
46 double readDepthStencilRate; // pixels/second
47 double readDepthUintRate; // pixels/second
48 double readDepthUshortRate; // pixels/second
50 DepthStencilResult();
52 virtual void putresults(ostream& s) const;
53 virtual bool getresults(istream& s);
57 class DepthStencilTest: public BaseTest<DepthStencilResult>
59 public:
60 GLEAN_CLASS_WH(DepthStencilTest, DepthStencilResult,
61 windowSize, windowSize);
63 private:
64 int depthBits, stencilBits;
65 GLenum errorCode;
66 const char *errorPos;
67 char errorMsg[1000];
69 bool checkError(const char *where);
70 void setup(void);
71 bool testInsufficientVisual(void);
72 bool testErrorDetection(void);
73 bool testDrawAndRead(void);
74 bool testTextureOperations(void);
75 void testPerformance(DepthStencilResult &r);
76 double readPixelsRate(GLenum format, GLenum type);
79 } // namespace GLEAN
81 #endif // __tdepthstencil_h__