13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#ifndef _GLSSHADERLIBRARYCASE_HPP
23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#define _GLSSHADERLIBRARYCASE_HPP
33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*-------------------------------------------------------------------------
43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program OpenGL (ES) Module
53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * -----------------------------------------------
63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project
83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License");
103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License.
113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at
123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *      http://www.apache.org/licenses/LICENSE-2.0
143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software
163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS,
173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and
193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License.
203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *
213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*!
223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file
233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Shader test case.
243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/
253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluDefs.hpp"
273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluShaderUtil.hpp"
283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluRenderContext.hpp"
293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluShaderProgram.hpp"
303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuTestCase.hpp"
313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuSurface.hpp"
323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include <string>
343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include <vector>
353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
363c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp
373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
383c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace gls
393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
403c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace sl
413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry// ShaderCase node.
443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
453c827367444ee418f129b2c238299f49d3264554Jarkko Poyryclass ShaderCase : public tcu::TestCase
463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{
473c827367444ee418f129b2c238299f49d3264554Jarkko Poyrypublic:
483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	enum CaseType
493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CASETYPE_COMPLETE = 0,		//!< Has all shaders specified separately.
513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CASETYPE_VERTEX_ONLY,		//!< "Both" case, vertex shader sub case.
523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CASETYPE_FRAGMENT_ONLY,		//!< "Both" case, fragment shader sub case.
533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CASETYPE_LAST
553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	enum ExpectResult
583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_PASS = 0,
603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_COMPILE_FAIL,
613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_LINK_FAIL,
623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_COMPILE_LINK_FAIL,
633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_VALIDATION_FAIL,
649e574351a4724975bf91b1e74ccae8786d711386Jarkko Pöyry		EXPECT_BUILD_SUCCESSFUL,
653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		EXPECT_LAST
673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct Value
703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		enum StorageType
723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			STORAGE_UNIFORM,
743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			STORAGE_INPUT,
753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			STORAGE_OUTPUT,
763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			STORAGE_LAST
783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		};
793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		/* \todo [2010-03-31 petri] Replace with another vector to allow a) arrays, b) compact representation */
813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		union Element
823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			float		float32;
843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			deInt32		int32;
853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			deInt32		bool32;
863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		};
873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		StorageType				storageType;
893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::string				valueName;
903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		glu::DataType			dataType;
913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		int						arrayLength;	// Number of elements in array (currently always 1).
923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<Element>	elements;		// Scalar values (length dataType.scalarSize * arrayLength).
933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct ValueBlock
963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry							ValueBlock (void);
983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		int					arrayLength;		// Combined array length of each value (lengths must be same, or one).
1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<Value>	values;
1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	class CaseRequirement
1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	public:
1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		enum RequirementType
1073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		{
1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			REQUIREMENTTYPE_EXTENSION = 0,
1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			REQUIREMENTTYPE_IMPLEMENTATION_LIMIT,
110789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry			REQUIREMENTTYPE_FULL_GLSL_ES_100_SPEC,	//!< Full support (as opposed to limited as specified for GLES 2.0 (See GLSL Appendix A)) cannot be queried
1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry			REQUIREMENTTYPE_LAST
1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		};
1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
115789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry									CaseRequirement								(void);
1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
117789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		static CaseRequirement		createAnyExtensionRequirement				(const std::vector<std::string>& requirements, deUint32 effectiveShaderStageFlags);
118789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		static CaseRequirement		createLimitRequirement						(deUint32 enumName, int ref);
119789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		static CaseRequirement		createFullGLSLES100SpecificationRequirement	(void);
120789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		void						checkRequirements							(glu::RenderContext& renderCtx, const glu::ContextInfo& contextInfo);
1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
122789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		RequirementType				getType										(void) const { return m_type; };
123789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		std::string					getSupportedExtension						(void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); DE_ASSERT(m_supportedExtensionNdx >= 0); return m_extensions[m_supportedExtensionNdx]; }
124789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry		deUint32					getAffectedExtensionStageFlags				(void) const { DE_ASSERT(m_type == REQUIREMENTTYPE_EXTENSION); return m_effectiveShaderStageFlags; }
1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	private:
1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		RequirementType				m_type;
1283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		// REQUIREMENTTYPE_EXTENSION:
1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>	m_extensions;
1313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		int							m_supportedExtensionNdx;
1323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		deUint32					m_effectiveShaderStageFlags;
1333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		// REQUIREMENTTYPE_IMPLEMENTATION_LIMIT:
1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		deUint32					m_enumName;
1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		int							m_referenceValue;
1373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct ShaderCaseSpecification
1403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry										ShaderCaseSpecification				(void);
1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		static ShaderCaseSpecification	generateSharedSourceVertexCase		(ExpectResult expectResult_, glu::GLSLVersion targetVersion_, const std::vector<ValueBlock>& values, const std::string& sharedSource);
1443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		static ShaderCaseSpecification	generateSharedSourceFragmentCase	(ExpectResult expectResult_, glu::GLSLVersion targetVersion_, const std::vector<ValueBlock>& values, const std::string& sharedSource);
1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		ExpectResult					expectResult;
1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		glu::GLSLVersion				targetVersion;
1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CaseType						caseType;
1493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<CaseRequirement>	requirements;
1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<ValueBlock>			valueBlocks;
1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		vertexSources;
1523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		fragmentSources;
1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		tessCtrlSources;
1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		tessEvalSources;
1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		geometrySources;
1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct PipelineProgram
1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		deUint32						activeStageBits;
1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<CaseRequirement>	requirements;
1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		vertexSources;
1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		fragmentSources;
1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		tessCtrlSources;
1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		tessEvalSources;
1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<std::string>		geometrySources;
1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct PipelineCaseSpecification
1703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		ExpectResult					expectResult;
1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		glu::GLSLVersion				targetVersion;
1733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		CaseType						caseType;
1743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<ValueBlock>			valueBlocks;
1753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		std::vector<PipelineProgram>	programs;
1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Methods.
179789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry									ShaderCase										(tcu::TestContext&				testCtx,
180789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 glu::RenderContext&			renderCtx,
181789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const glu::ContextInfo&		contextInfo,
182789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const char*					caseName,
183789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const char*					description,
184789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const ShaderCaseSpecification&	specification);
185789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry									ShaderCase										(tcu::TestContext&					testCtx,
186789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 glu::RenderContext&				renderCtx,
187789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const glu::ContextInfo&			contextInfo,
188789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const char*						caseName,
189789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const char*						description,
190789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry																					 const PipelineCaseSpecification&	specification);
191789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	virtual							~ShaderCase										(void);
1923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyryprivate:
194789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							init											(void);
195789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	bool							execute											(void);
196789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	IterateResult					iterate											(void);
197789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry
198789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry									ShaderCase										(const ShaderCase&);		// not allowed!
199789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	ShaderCase&						operator=										(const ShaderCase&);		// not allowed!
200789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry
201789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	std::string						genVertexShader									(const ValueBlock& valueBlock) const;
202789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	std::string						genFragmentShader								(const ValueBlock& valueBlock) const;
203789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	std::string						specializeVertexShader							(const char* src, const ValueBlock& valueBlock) const;
204789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	std::string						specializeFragmentShader						(const char* src, const ValueBlock& valueBlock) const;
205789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							specializeVertexShaders							(glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
206789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							specializeFragmentShaders						(glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
207789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							specializeGeometryShaders						(glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
208789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							specializeTessControlShaders					(glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
209789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							specializeTessEvalShaders						(glu::ProgramSources& dst, const std::vector<std::string>& sources, const ValueBlock& valueBlock, const std::vector<ShaderCase::CaseRequirement>& requirements) const;
210789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	bool							isTessellationPresent							(void) const;
211789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	bool							anyProgramRequiresFullGLSLES100Specification	(void) const;
212789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry
213789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	void							dumpValues										(const ValueBlock& valueBlock, int arrayNdx);
214789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry
215789ca9385dc76763c8f14d35d4b7f0b25275e6c0Jarkko Pöyry	bool 							checkPixels										(tcu::Surface& surface, int minX, int maxX, int minY, int maxY);
2163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	struct ProgramObject
2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	{
2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		glu::ProgramSources		programSources;
2203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry		PipelineProgram			spec;
2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	};
2223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	// Member variables.
2243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	glu::RenderContext&				m_renderCtx;
2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	const glu::ContextInfo&			m_contextInfo;
2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	const CaseType					m_caseType;
2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	const ExpectResult				m_expectResult;
2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	const glu::GLSLVersion			m_targetVersion;
2293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	const bool						m_separatePrograms;
2303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::vector<ValueBlock>			m_valueBlocks;
2313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry	std::vector<ProgramObject>		m_programs;
2323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry};
2333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // sl
2353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // gls
2363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp
2373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry
2383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#endif // _GLSSHADERLIBRARYCASE_HPP
239