1e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 2e5c31af7Sopenharmony_cidrawElements Quality Program Test Specification 3e5c31af7Sopenharmony_ci----------------------------------------------- 4e5c31af7Sopenharmony_ci 5e5c31af7Sopenharmony_ciCopyright 2014 The Android Open Source Project 6e5c31af7Sopenharmony_ci 7e5c31af7Sopenharmony_ciLicensed under the Apache License, Version 2.0 (the "License"); 8e5c31af7Sopenharmony_ciyou may not use this file except in compliance with the License. 9e5c31af7Sopenharmony_ciYou may obtain a copy of the License at 10e5c31af7Sopenharmony_ci 11e5c31af7Sopenharmony_ci http://www.apache.org/licenses/LICENSE-2.0 12e5c31af7Sopenharmony_ci 13e5c31af7Sopenharmony_ciUnless required by applicable law or agreed to in writing, software 14e5c31af7Sopenharmony_cidistributed under the License is distributed on an "AS IS" BASIS, 15e5c31af7Sopenharmony_ciWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16e5c31af7Sopenharmony_ciSee the License for the specific language governing permissions and 17e5c31af7Sopenharmony_cilimitations under the License. 18e5c31af7Sopenharmony_ci------------------------------------------------------------------------- 19e5c31af7Sopenharmony_ci Primitive restart tests 20e5c31af7Sopenharmony_ci 21e5c31af7Sopenharmony_ciTests: 22e5c31af7Sopenharmony_ci + dEQP-GLES3.functional.primitive_restart.* 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ciIncludes: 25e5c31af7Sopenharmony_ci + Draw using: 26e5c31af7Sopenharmony_ci - glDrawElements() 27e5c31af7Sopenharmony_ci - glDrawElementsInstanced() 28e5c31af7Sopenharmony_ci - glDrawRangeElements() 29e5c31af7Sopenharmony_ci + All primitive types 30e5c31af7Sopenharmony_ci + All index types 31e5c31af7Sopenharmony_ci + Primitive restart index placing special cases: 32e5c31af7Sopenharmony_ci - Use/don't use two consecutive primitive restarts 33e5c31af7Sopenharmony_ci - Restarts/no restarts as first value of index array 34e5c31af7Sopenharmony_ci - Restarts/no restarts as last value of index array 35e5c31af7Sopenharmony_ci - Combinations of above 36e5c31af7Sopenharmony_ci 37e5c31af7Sopenharmony_ciExcludes: 38e5c31af7Sopenharmony_ci + Test for correctness of rasterization 39e5c31af7Sopenharmony_ci 40e5c31af7Sopenharmony_ciDescription: 41e5c31af7Sopenharmony_ci 42e5c31af7Sopenharmony_ciVertex positions and indices are generated such that multiple primitives are 43e5c31af7Sopenharmony_cidefined with the same index array, using the fixed primitive restart index to 44e5c31af7Sopenharmony_ciseparate the primitives. Various sizes (in terms of index count between 45e5c31af7Sopenharmony_cirestarts) of primitives are generated. 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ciSpecial cases are generated such that there are indices at the beginning or end 48e5c31af7Sopenharmony_ciof the index array, or the index array contains two consecutive restarts 49e5c31af7Sopenharmony_ciwhere there would normally be one. These cases are otherwise equivalent and 50e5c31af7Sopenharmony_cishould render identically. 51e5c31af7Sopenharmony_ci 52e5c31af7Sopenharmony_ciFor glDrawElementsInstanced(), an instance count of 1 is used. For 53e5c31af7Sopenharmony_ciglDrawRangeElements(), the start parameter is 0, and the end parameter is the 54e5c31af7Sopenharmony_cilargest non-restart index in the index array. 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ciThe result is compared to an image produced by doing multiple ordinary draw 57e5c31af7Sopenharmony_cicalls instead of using primitive restarts. 58