1 #ifndef _GL4CPOSTDEPTHCOVERAGETESTS_HPP
2 #define _GL4CPOSTDEPTHCOVERAGETESTS_HPP
3 /*-------------------------------------------------------------------------
4 * OpenGL Conformance Test Suite
5 * -----------------------------
7 * Copyright (c) 2016 The Khronos Group Inc.
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.
24 */ /*-------------------------------------------------------------------*/
28 * \file gl4cPostDepthCoverageTests.hpp
29 * \brief Conformance tests for the GL_ARB_post_depth_coverage functionality.
30 */ /*-------------------------------------------------------------------*/
31 #include "glcTestCase.hpp"
32 #include "glwDefs.hpp"
33 #include "tcuDefs.hpp"
38 * * #extension GL_ARB_post_depth_coverage : <behavior> is allowed in the shader.
39 * * #define GL_ARB_post_depth_coverage is available and equal to 1.
40 * * Shader with layout(early_fragment_tests) in; builds without an error.
41 * * Shader with layout(post_depth_coverage) in; builds without an error.
43 class PostDepthShaderCase : public deqp::TestCase
47 PostDepthShaderCase(deqp::Context& context);
51 tcu::TestNode::IterateResult iterate();
56 std::string m_vertShader;
57 std::string m_fragShader1;
58 std::string m_fragShader2;
59 std::string m_fragShader3;
60 std::string m_fragShader4;
63 /** Verify if fragment shader is allowed to control whether values in
64 * gl_SampleMaskIn[] reflect the coverage after application of the early
65 * depth and stencil tests.
67 class PostDepthSampleMaskCase : public deqp::TestCase
71 PostDepthSampleMaskCase(deqp::Context& context);
73 virtual void deinit();
75 virtual tcu::TestNode::IterateResult iterate();
82 BUFFERCASE_DEPTH = BUFFERCASE_FIRST,
83 BUFFERCASE_STENCIL = BUFFERCASE_FIRST + 1,
84 BUFFERCASE_LAST = BUFFERCASE_STENCIL,
90 PDCCASE_DISABLED = PDCCASE_FIRST,
91 PDCCASE_ENABLED = PDCCASE_FIRST + 1,
92 PDCCASE_LAST = PDCCASE_ENABLED,
97 deUint32 m_framebufferMS;
98 deUint32 m_framebuffer;
101 deUint32 m_depthStencilRenderbuffer;
103 std::string m_vertShader;
104 std::string m_fragShader1a;
105 std::string m_fragShader1b;
106 std::string m_fragShader2;
109 /** Test group which encapsulates all sparse buffer conformance tests */
110 class PostDepthCoverage : public deqp::TestCaseGroup
114 PostDepthCoverage(deqp::Context& context);
119 PostDepthCoverage(const PostDepthCoverage& other);
120 PostDepthCoverage& operator=(const PostDepthCoverage& other);
123 } /* glcts namespace */
125 #endif // _GL4CPOSTDEPTHCOVERAGETESTS_HPP