1e5c31af7Sopenharmony_ci#ifndef _GLSTEXTUREBUFFERCASE_HPP
2e5c31af7Sopenharmony_ci#define _GLSTEXTUREBUFFERCASE_HPP
3e5c31af7Sopenharmony_ci/*-------------------------------------------------------------------------
4e5c31af7Sopenharmony_ci * drawElements Quality Program OpenGL (ES) Module
5e5c31af7Sopenharmony_ci * -----------------------------------------------
6e5c31af7Sopenharmony_ci *
7e5c31af7Sopenharmony_ci * Copyright 2014 The Android Open Source Project
8e5c31af7Sopenharmony_ci *
9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License.
11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at
12e5c31af7Sopenharmony_ci *
13e5c31af7Sopenharmony_ci *      http://www.apache.org/licenses/LICENSE-2.0
14e5c31af7Sopenharmony_ci *
15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and
19e5c31af7Sopenharmony_ci * limitations under the License.
20e5c31af7Sopenharmony_ci *
21e5c31af7Sopenharmony_ci *//*!
22e5c31af7Sopenharmony_ci * \file
23e5c31af7Sopenharmony_ci * \brief Texture buffer test case
24e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_ci#include "tcuDefs.hpp"
27e5c31af7Sopenharmony_ci#include "tcuTestCase.hpp"
28e5c31af7Sopenharmony_ci
29e5c31af7Sopenharmony_cinamespace glu
30e5c31af7Sopenharmony_ci{
31e5c31af7Sopenharmony_ci	class RenderContext;
32e5c31af7Sopenharmony_ci	class ShaderProgram;
33e5c31af7Sopenharmony_ci} // glu
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_cinamespace deqp
36e5c31af7Sopenharmony_ci{
37e5c31af7Sopenharmony_cinamespace gls
38e5c31af7Sopenharmony_ci{
39e5c31af7Sopenharmony_ci
40e5c31af7Sopenharmony_cinamespace TextureBufferCaseUtil
41e5c31af7Sopenharmony_ci{
42e5c31af7Sopenharmony_ci
43e5c31af7Sopenharmony_cienum ModifyBits
44e5c31af7Sopenharmony_ci{
45e5c31af7Sopenharmony_ci	MODIFYBITS_NONE					= 0,
46e5c31af7Sopenharmony_ci	MODIFYBITS_BUFFERDATA			= (0x1<<0),
47e5c31af7Sopenharmony_ci	MODIFYBITS_BUFFERSUBDATA		= (0x1<<1),
48e5c31af7Sopenharmony_ci	MODIFYBITS_MAPBUFFER_WRITE		= (0x1<<2),
49e5c31af7Sopenharmony_ci	MODIFYBITS_MAPBUFFER_READWRITE	= (0x1<<3),
50e5c31af7Sopenharmony_ci};
51e5c31af7Sopenharmony_ci
52e5c31af7Sopenharmony_cienum RenderBits
53e5c31af7Sopenharmony_ci{
54e5c31af7Sopenharmony_ci	RENDERBITS_NONE					= 0,
55e5c31af7Sopenharmony_ci	RENDERBITS_AS_VERTEX_ARRAY		= (0x1<<0),
56e5c31af7Sopenharmony_ci	RENDERBITS_AS_INDEX_ARRAY		= (0x1<<1),
57e5c31af7Sopenharmony_ci	RENDERBITS_AS_VERTEX_TEXTURE	= (0x1<<2),
58e5c31af7Sopenharmony_ci	RENDERBITS_AS_FRAGMENT_TEXTURE	= (0x1<<3)
59e5c31af7Sopenharmony_ci};
60e5c31af7Sopenharmony_ci
61e5c31af7Sopenharmony_ci} // TextureBufferCaseUtil
62e5c31af7Sopenharmony_ci
63e5c31af7Sopenharmony_ciclass TextureBufferCase : public tcu::TestCase
64e5c31af7Sopenharmony_ci{
65e5c31af7Sopenharmony_cipublic:
66e5c31af7Sopenharmony_ci					TextureBufferCase	(tcu::TestContext&					testCtx,
67e5c31af7Sopenharmony_ci										 glu::RenderContext&				renderCtx,
68e5c31af7Sopenharmony_ci										 deUint32							format,
69e5c31af7Sopenharmony_ci										 size_t								bufferSize,
70e5c31af7Sopenharmony_ci										 size_t								offset,
71e5c31af7Sopenharmony_ci										 size_t								size,
72e5c31af7Sopenharmony_ci										 TextureBufferCaseUtil::RenderBits	preRender,
73e5c31af7Sopenharmony_ci										 TextureBufferCaseUtil::ModifyBits	modify,
74e5c31af7Sopenharmony_ci										 TextureBufferCaseUtil::RenderBits	postRender,
75e5c31af7Sopenharmony_ci										 const char*						name,
76e5c31af7Sopenharmony_ci										 const char*						description);
77e5c31af7Sopenharmony_ci
78e5c31af7Sopenharmony_ci					~TextureBufferCase	(void);
79e5c31af7Sopenharmony_ci
80e5c31af7Sopenharmony_ci	void			init				(void);
81e5c31af7Sopenharmony_ci	void			deinit				(void);
82e5c31af7Sopenharmony_ci	IterateResult	iterate				(void);
83e5c31af7Sopenharmony_ci
84e5c31af7Sopenharmony_ciprivate:
85e5c31af7Sopenharmony_ci	glu::RenderContext&						m_renderCtx;
86e5c31af7Sopenharmony_ci	const deUint32							m_format;
87e5c31af7Sopenharmony_ci	const size_t							m_bufferSize;
88e5c31af7Sopenharmony_ci	const size_t							m_offset;
89e5c31af7Sopenharmony_ci	const size_t							m_size;
90e5c31af7Sopenharmony_ci	const TextureBufferCaseUtil::RenderBits	m_preRender;
91e5c31af7Sopenharmony_ci	const TextureBufferCaseUtil::ModifyBits	m_modify;
92e5c31af7Sopenharmony_ci	const TextureBufferCaseUtil::RenderBits	m_postRender;
93e5c31af7Sopenharmony_ci
94e5c31af7Sopenharmony_ci	glu::ShaderProgram*						m_preRenderProgram;
95e5c31af7Sopenharmony_ci	glu::ShaderProgram*						m_postRenderProgram;
96e5c31af7Sopenharmony_ci};
97e5c31af7Sopenharmony_ci
98e5c31af7Sopenharmony_ci} // gls
99e5c31af7Sopenharmony_ci} // deqp
100e5c31af7Sopenharmony_ci
101e5c31af7Sopenharmony_ci#endif // _GLSTEXTUREBUFFERCASE_HPP
102