1*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 2*35238bceSAndroid Build Coastguard WorkerdrawElements Quality Program Test Specification 3*35238bceSAndroid Build Coastguard Worker----------------------------------------------- 4*35238bceSAndroid Build Coastguard Worker 5*35238bceSAndroid Build Coastguard WorkerCopyright 2014 The Android Open Source Project 6*35238bceSAndroid Build Coastguard Worker 7*35238bceSAndroid Build Coastguard WorkerLicensed under the Apache License, Version 2.0 (the "License"); 8*35238bceSAndroid Build Coastguard Workeryou may not use this file except in compliance with the License. 9*35238bceSAndroid Build Coastguard WorkerYou may obtain a copy of the License at 10*35238bceSAndroid Build Coastguard Worker 11*35238bceSAndroid Build Coastguard Worker http://www.apache.org/licenses/LICENSE-2.0 12*35238bceSAndroid Build Coastguard Worker 13*35238bceSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software 14*35238bceSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS, 15*35238bceSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16*35238bceSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and 17*35238bceSAndroid Build Coastguard Workerlimitations under the License. 18*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 19*35238bceSAndroid Build Coastguard Worker Geometry shader tests 20*35238bceSAndroid Build Coastguard Worker 21*35238bceSAndroid Build Coastguard WorkerTests: 22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES31.functional.geometry_shading.* 23*35238bceSAndroid Build Coastguard Worker 24*35238bceSAndroid Build Coastguard WorkerIncludes: 25*35238bceSAndroid Build Coastguard Worker + Basic tests: 26*35238bceSAndroid Build Coastguard Worker - gl_PointSize, gl_PrimitiveID, gl_PrimitiveIDIn built-ins 27*35238bceSAndroid Build Coastguard Worker - Constant and varying emit counts 28*35238bceSAndroid Build Coastguard Worker - All input primitive types 29*35238bceSAndroid Build Coastguard Worker - All output privitive types (point, line_strip, triangle_strip) 30*35238bceSAndroid Build Coastguard Worker - Different number of varyings 31*35238bceSAndroid Build Coastguard Worker + Non-sufficient vertex emit counts, superfluous EndPrimitives() 32*35238bceSAndroid Build Coastguard Worker + Layered rendering 33*35238bceSAndroid Build Coastguard Worker + Negative tests for input types 34*35238bceSAndroid Build Coastguard Worker 35*35238bceSAndroid Build Coastguard WorkerExcludes: 36*35238bceSAndroid Build Coastguard Worker + Geometry shader transform feedback 37*35238bceSAndroid Build Coastguard Worker + (Negative) tests for vertex-geo-frag shader varying linkage. 38*35238bceSAndroid Build Coastguard Worker + Primitive render order with geometry shader instancing 39*35238bceSAndroid Build Coastguard Worker 40*35238bceSAndroid Build Coastguard WorkerDescription: 41*35238bceSAndroid Build Coastguard Worker 42*35238bceSAndroid Build Coastguard WorkerGeometry shader tests test geometry shader functionality by rendering 43*35238bceSAndroid Build Coastguard Workera scene using geometry shaders and comparing the resulting image to 44*35238bceSAndroid Build Coastguard Workerthe output of a reference renderer. Layered rendering render tests 45*35238bceSAndroid Build Coastguard Workerdraw scene to a texture which is then read back layer by layer. Contents 46*35238bceSAndroid Build Coastguard Workerof each layer is then verified. 47*35238bceSAndroid Build Coastguard Worker 48*35238bceSAndroid Build Coastguard Workerquery.* test group contains various query tests. max_geometry_* cases 49*35238bceSAndroid Build Coastguard Workerverify that the implementation limit queried via API is equal to the 50*35238bceSAndroid Build Coastguard Workercorresponding GLSL constant. geometry_* and max_geometry_* cases test 51*35238bceSAndroid Build Coastguard Workergeometry shader related limits and states. primitives_generated_* cases 52*35238bceSAndroid Build Coastguard Workerverify GL_PRIMITIVES_GENERATED query result in various scenarios. 53*35238bceSAndroid Build Coastguard Workermax_framebuffer_* and framebuffer_* test verify layered fbo limits, states 54*35238bceSAndroid Build Coastguard Workerand incompleteness conditions. 55*35238bceSAndroid Build Coastguard Worker 56*35238bceSAndroid Build Coastguard Workerbasic.* tests test basic geometry shader usage: output_* cases emit 57*35238bceSAndroid Build Coastguard Workera constant number of vertices. output_vary_by_* cases emit a varying 58*35238bceSAndroid Build Coastguard Workernumber of vertices, depending on a shader varying, uniform or a texture 59*35238bceSAndroid Build Coastguard Workerlookup. basic.point_size, basic.primitive_id_in[_restarted] and 60*35238bceSAndroid Build Coastguard Workerbasic.primitive_id cases test functionality of a corresponding built-in 61*35238bceSAndroid Build Coastguard Workervariable. *_restarted variant verifies that primitive restart index has 62*35238bceSAndroid Build Coastguard Workerno effect to the corresponding variable. 63*35238bceSAndroid Build Coastguard Worker 64*35238bceSAndroid Build Coastguard Workerinput.* tests verify geometry shader behavior with different input types 65*35238bceSAndroid Build Coastguard Workerby drawing a separate triangle for each geometry shader input vertex. 66*35238bceSAndroid Build Coastguard Workerinput.triangle_strip_adjacency.* cases verify correct behavior of 67*35238bceSAndroid Build Coastguard WorkerTRIANGLE_ADJACENCY primitive with different vertex counts. 68*35238bceSAndroid Build Coastguard Worker 69*35238bceSAndroid Build Coastguard Workerconversion.* tests verify functionality of geometry shaders with different 70*35238bceSAndroid Build Coastguard Workerinput and output primitive types. 71*35238bceSAndroid Build Coastguard Worker 72*35238bceSAndroid Build Coastguard Workeremit.* tests test geometry shaders with different number of EmitVertex() 73*35238bceSAndroid Build Coastguard Workerand EndPrimitive() calls, ranging from too few to superfluous. A geometry 74*35238bceSAndroid Build Coastguard Workershader invocation with name *_emit_N_end_M calls EmitVertex() N times and 75*35238bceSAndroid Build Coastguard WorkerEndPrimitive() M times. 76*35238bceSAndroid Build Coastguard Worker 77*35238bceSAndroid Build Coastguard Workervarying.* tests verify the functionality of vertex shader -> geometry shader 78*35238bceSAndroid Build Coastguard Workervaryigns and geometry shader -> fragment shader varyings. 79*35238bceSAndroid Build Coastguard Worker 80*35238bceSAndroid Build Coastguard Workerlayered.* tests geometry shader layered rendering targeting a cubemap, 3D, 81*35238bceSAndroid Build Coastguard Worker2D array, and 2D multisample array texture. Tests render to the default layers, 82*35238bceSAndroid Build Coastguard Workeronly to one layer, each layer separately, or to each layer with different 83*35238bceSAndroid Build Coastguard Workercontents and verify the contents of each layer. fragment_layer_* cases verify 84*35238bceSAndroid Build Coastguard Workerthe fragment shader built-in variable gl_Layer by outputting different color to 85*35238bceSAndroid Build Coastguard Workereach layer. layer_provoking_vertex_* cases verify implementation dependent value 86*35238bceSAndroid Build Coastguard WorkerGL_LAYER_PROVOKING_VERTEX by rendering two triangles with one vertex having a 87*35238bceSAndroid Build Coastguard Workerdifferent gl_Layer value. The actual provoking vertex is then verified by 88*35238bceSAndroid Build Coastguard Workerchecking the layer contents. 89*35238bceSAndroid Build Coastguard Worker 90*35238bceSAndroid Build Coastguard Workerinstanced.* tests geometry shader instancing functionality. 91*35238bceSAndroid Build Coastguard Workergeometry[_output_different]_N_invocations cases test basic geometry shader 92*35238bceSAndroid Build Coastguard Workerinstancing by rendering primitives in a circle formation. Each output primitive 93*35238bceSAndroid Build Coastguard Workeron the circle is generated by a single geometry shader invocation and each 94*35238bceSAndroid Build Coastguard Workercircle is generated by a single input primitive. invocation_per_layer and 95*35238bceSAndroid Build Coastguard Workermultiple_layers_per_invocation cases test geometry shader instancing with 96*35238bceSAndroid Build Coastguard Workerlayered rendering. In invocation_per_layer cases, shader invocation writes only 97*35238bceSAndroid Build Coastguard Workerto a single layer and in multiple_layers_per_invocation cases to two layers. In 98*35238bceSAndroid Build Coastguard Workerinvocation_output_vary_by_* cases, invocations emit a varying number of 99*35238bceSAndroid Build Coastguard Workervertices, depending on a shader varying, uniform or a texture lookup. 100*35238bceSAndroid Build Coastguard Workerdraw_N_instances_geometry_M_invocations cases test geometry instancing in with 101*35238bceSAndroid Build Coastguard Workerinstanced drawing. As in the geometry_N_invocations, a group of primitives is 102*35238bceSAndroid Build Coastguard Workerdrawn around each input primitive instance. 103*35238bceSAndroid Build Coastguard Worker 104*35238bceSAndroid Build Coastguard Workernegative.* cases create a geometry shader accepting a certain input 105*35238bceSAndroid Build Coastguard Workerprimitive type and then try to use the shader when drawing with an incompatible 106*35238bceSAndroid Build Coastguard Workerprimitive type. GL_INVALID_OPERATION is expected. 107*35238bceSAndroid Build Coastguard Worker 108*35238bceSAndroid Build Coastguard Workervertex_transform_feedback.* cases test transform feedback relaxations introduced 109*35238bceSAndroid Build Coastguard Workerin the extension. Tests include all new render primitive modes and 110*35238bceSAndroid Build Coastguard Workerdraw{arrays,elements}{e,indirect,instanced} draw functions. 111*35238bceSAndroid Build Coastguard Workercapture_vertex_draw_elements_overflow_single_buffer case tests that a 112*35238bceSAndroid Build Coastguard Workerbuffer-overflowing primitive feedback result is not partially written to the 113*35238bceSAndroid Build Coastguard Workerfeedback buffer. 114