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 Texture gather tests 20e5c31af7Sopenharmony_ci 21e5c31af7Sopenharmony_ciTests: 22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.texture.gather.* 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ciIncludes: 25e5c31af7Sopenharmony_ci + textureGather, textureGatherOffset and textureGatherOffsets tests 26e5c31af7Sopenharmony_ci - Also dynamic-offset variant of textureGatherOffset 27e5c31af7Sopenharmony_ci + All supported texture types 28e5c31af7Sopenharmony_ci - 2D 29e5c31af7Sopenharmony_ci - 2D array 30e5c31af7Sopenharmony_ci - Cube map for offset-less variant only (not defined for others) 31e5c31af7Sopenharmony_ci + rgba8 unorm, uint and int color formats 32e5c31af7Sopenharmony_ci + depth32f format for shadow variants 33e5c31af7Sopenharmony_ci - LESS and GREATER comparison functions 34e5c31af7Sopenharmony_ci + For color textures, test each value (0 to 3) for the color component 35e5c31af7Sopenharmony_ci argument, as well as no argument (implicit 0) 36e5c31af7Sopenharmony_ci + Power-of-two and non-power-of-two texture sizes 37e5c31af7Sopenharmony_ci - Test each wrap mode (clamp to edge, repeat, mirrored repeat) for both S and 38e5c31af7Sopenharmony_ci T coordinates 39e5c31af7Sopenharmony_ci + Texture swizzle (for color formats) 40e5c31af7Sopenharmony_ci - Test each swizzle source for each color component 41e5c31af7Sopenharmony_ci + Test that filter modes have no effect (assuming texture is still complete) 42e5c31af7Sopenharmony_ci + Base level 43e5c31af7Sopenharmony_ci + For color textures, test gathering from incomplete texture 44e5c31af7Sopenharmony_ci + For offset(s) variants, test various offsets from both the spec-required 45e5c31af7Sopenharmony_ci minimum range as well as implementation's range 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ciExcludes: 48e5c31af7Sopenharmony_ci + Rest of texture formats 49e5c31af7Sopenharmony_ci + Rest of depth comparison functions 50e5c31af7Sopenharmony_ci + Negative tests 51e5c31af7Sopenharmony_ci 52e5c31af7Sopenharmony_ciDescription: 53e5c31af7Sopenharmony_ci 54e5c31af7Sopenharmony_ciThe texture gather test group contains tests for the textureGather* group of 55e5c31af7Sopenharmony_cifunctions. 56e5c31af7Sopenharmony_ci 57e5c31af7Sopenharmony_ciEach test case creates and sets up a 2d, 2d array or cube texture with unorm, 58e5c31af7Sopenharmony_ciint, uint or depth format. A shader program is created that uses the appropriate 59e5c31af7Sopenharmony_citextureGather* on that texture in the fragment shader, and outputs the resulting 60e5c31af7Sopenharmony_cicolor as a fragment output. A framebuffer object with a renderbuffer object as 61e5c31af7Sopenharmony_ciits color attachment is used; the renderbuffer's format matches that of the 62e5c31af7Sopenharmony_citexture (except for depth formats, for which rgba8 is used). The resulting image 63e5c31af7Sopenharmony_ciis read with glReadPixels(), and verified with routines that take coordinate 64e5c31af7Sopenharmony_ciimprecisions into account. Multiple shaders and rendering iterations are used, 65e5c31af7Sopenharmony_ciso that different color component and/or offset arguments to the textureGather* 66e5c31af7Sopenharmony_cifunction can be tested. 67e5c31af7Sopenharmony_ci 68e5c31af7Sopenharmony_ciThe textureGatherOffsets functions, as well as textureGatherOffset with dynamic 69e5c31af7Sopenharmony_cioffset, are tested if the GL_EXT_gpu_shader5 extension is supported. 70