1 #ifndef _GLSTEXTUREBUFFERCASE_HPP
2 #define _GLSTEXTUREBUFFERCASE_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program OpenGL (ES) Module
5 * -----------------------------------------------
7 * Copyright 2014 The Android Open Source Project
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 * \brief Texture buffer test case
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "tcuTestCase.hpp"
40 namespace TextureBufferCaseUtil
46 MODIFYBITS_BUFFERDATA = (0x1<<0),
47 MODIFYBITS_BUFFERSUBDATA = (0x1<<1),
48 MODIFYBITS_MAPBUFFER_WRITE = (0x1<<2),
49 MODIFYBITS_MAPBUFFER_READWRITE = (0x1<<3),
55 RENDERBITS_AS_VERTEX_ARRAY = (0x1<<0),
56 RENDERBITS_AS_INDEX_ARRAY = (0x1<<1),
57 RENDERBITS_AS_VERTEX_TEXTURE = (0x1<<2),
58 RENDERBITS_AS_FRAGMENT_TEXTURE = (0x1<<3)
61 } // TextureBufferCaseUtil
63 class TextureBufferCase : public tcu::TestCase
66 TextureBufferCase (tcu::TestContext& testCtx,
67 glu::RenderContext& renderCtx,
72 TextureBufferCaseUtil::RenderBits preRender,
73 TextureBufferCaseUtil::ModifyBits modify,
74 TextureBufferCaseUtil::RenderBits postRender,
76 const char* description);
78 ~TextureBufferCase (void);
82 IterateResult iterate (void);
85 glu::RenderContext& m_renderCtx;
86 const deUint32 m_format;
87 const size_t m_bufferSize;
88 const size_t m_offset;
90 const TextureBufferCaseUtil::RenderBits m_preRender;
91 const TextureBufferCaseUtil::ModifyBits m_modify;
92 const TextureBufferCaseUtil::RenderBits m_postRender;
94 glu::ShaderProgram* m_preRenderProgram;
95 glu::ShaderProgram* m_postRenderProgram;
101 #endif // _GLSTEXTUREBUFFERCASE_HPP