1------------------------------------------------------------------------- 2drawElements Quality Program Test Specification 3----------------------------------------------- 4 5Copyright 2014 The Android Open Source Project 6 7Licensed under the Apache License, Version 2.0 (the "License"); 8you may not use this file except in compliance with the License. 9You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13Unless required by applicable law or agreed to in writing, software 14distributed under the License is distributed on an "AS IS" BASIS, 15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16See the License for the specific language governing permissions and 17limitations under the License. 18------------------------------------------------------------------------- 19 Separate shader object tests 20 21Tests: 22 + dEQP-GLES31.separate_shader.* 23 24Includes: 25 26 + Single-program and two-program pipelines 27 + Replacement of pipeline stages 28 + Independence of homonymous uniforms and constants in the pipeline's 29 programs 30 + Interface compatibility between shader stages 31 + glProgramUniform on the pipeline's stages 32 + glCreateShaderProgram 33 + glActiveShaderProgram 34 + glBindProgramPipeline vs glUseProgram priority 35 + glGetProgramPipelineiv queries: 36 - GL_ACTIVE_PROGRAM 37 - GL_VERTEX_SHADER 38 - GL_FRAGMENT_SHADER 39 40Excludes: 41 42 + Testing pipeline rendering against a hardware-independent reference 43 renderer 44 45 46The "api.current_program_priority" test case checks that a bound pipeline 47has no effect when there is a current program. The test creates a program 48pipeline and a differently behaving monolithic program. It then calls 49glUseProgram and and glBindProgramPipeline and draws a triangle. The 50resulting image is compared to a reference image drawn with the program 51but without a bound program pipeline. 52 53The "api.active_program_uniform" test case creates a pipeline and a 54program, binds the pipeline and sets that program as the pipeline's active 55program. After this, glUniform is called and a triangle is drawn. The 56resulting image is compared to a reference image from a similar program 57whose uniform was set after glUseProgram. 58 59The "api.pipeline_programs" test case checks that glGetProgramPipelineiv 60returns the correct programs for vertex and shader stages. 61 62The "api.pipeline_active" test case checks that glGetProgramPipelineiv 63returns the program that was set as the pipeline's active program. 64 65 66The following tests create a program pipeline with one or two programs, 67and then possibly replace either or both of the stages with a new 68single-shader program. A triangle is drawn with the pipeline and the 69result is compared to a triangle drawn with an equivalent monolithic 70program. 71 72In the "pipeline.*" test cases the shaders have uniforms or constants, but 73no varyings. The variables in distinct programs may have the same name. 74 75In the "program_uniform.*" test cases the shaders have uniforms which are 76set with glProgramUniform. 77 78In the "create_shader_program.*" test cases the single-shader programs in 79the pipeline are created with glCreateShaderProgram. 80 81In the "interface.*" test cases there is a varying between the vertex and 82fragment shaders. The declarations of the vertex output and fragment input 83variables may have different qualifiers or names. 84 85The "random.*" test cases create random pipeline configurations that mix 86properties of the previous test case groups. The shaders may have zero, 87one or more varyings. The values of different varyings are rendered as 88diagonal stripes in the drawn triangle. 89