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    Mipmapping tests
20e5c31af7Sopenharmony_ci
21e5c31af7Sopenharmony_ciTests:
22e5c31af7Sopenharmony_ci + dEQP-GLES3.functional.texture.mipmap.*
23e5c31af7Sopenharmony_ci
24e5c31af7Sopenharmony_ciIncludes:
25e5c31af7Sopenharmony_ci + All mipmap filtering modes
26e5c31af7Sopenharmony_ci + Lod computation verification
27e5c31af7Sopenharmony_ci + Affine and projected transforms
28e5c31af7Sopenharmony_ci + User-supplied bias to texture lookup
29e5c31af7Sopenharmony_ci + Lod controls: min and max lod
30e5c31af7Sopenharmony_ci + 2D and cube map textures
31e5c31af7Sopenharmony_ci
32e5c31af7Sopenharmony_ciExcludes:
33e5c31af7Sopenharmony_ci + Only selected texture formats are exercised
34e5c31af7Sopenharmony_ci
35e5c31af7Sopenharmony_ciDescription:
36e5c31af7Sopenharmony_ci
37e5c31af7Sopenharmony_ciMipmapping tests render a pre-defined grid of quads. For 2D textures regular
38e5c31af7Sopenharmony_ci4x4 grid layout is used. For cube map textures the viewport is recursively
39e5c31af7Sopenharmony_cisubdivided into smaller areas and each is filled with samples from single
40e5c31af7Sopenharmony_cicube face.
41e5c31af7Sopenharmony_ci
42e5c31af7Sopenharmony_ciEach texture level is filled with single color. However, each mipmap level
43e5c31af7Sopenharmony_cigets assigned a different color from a continuous gradient. Thus it is possible
44e5c31af7Sopenharmony_cito evaluate how accurately the lod was computed by inspecting the resulting
45e5c31af7Sopenharmony_cicolorbuffer.
46e5c31af7Sopenharmony_ci
47e5c31af7Sopenharmony_ciOpenGL ES specification allows approximating both derivate- and lod computation.
48e5c31af7Sopenharmony_ciThus two reference images are rendered: one rendered according to the minimum
49e5c31af7Sopenharmony_cibound for the approximation and another based on the maximum bound. The rendered
50e5c31af7Sopenharmony_cipixels must be in between the two bounds in order to be valid. In order to
51e5c31af7Sopenharmony_cicompensate the derivate approximation the pixels are actually checked against
52e5c31af7Sopenharmony_cia 3x3 neighbor around the pixel.
53