Home | History | Annotate | Download | only in GLES3
      1 -------------------------------------------------------------------------
      2 drawElements Quality Program Test Specification
      3 -----------------------------------------------
      4 
      5 Copyright 2014 The Android Open Source Project
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11      http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 -------------------------------------------------------------------------
     19     Uniform Buffer Object tests
     20 
     21 Tests:
     22  + dEQP-GLES3.functional.ubo.*
     23  + dEQP-GLES3.functional.shaders.linkage.uniform_block*
     24  + dEQP-GLES3.functional.shaders.declarations.invalid_declarations.uniform_block*
     25 
     26 Includes:
     27  + Basic uniform buffer object usage
     28    - Binding and unbinding uniform buffers
     29    - Writing uniform buffer data with glBufferData()
     30  + Binding uniform buffers to uniform blocks
     31    - glBindBufferRange()
     32    - glBindBufferBase()
     33    - glUniformBlockBinding()
     34  + Querying uniform block memory layout
     35  + std140 memory layout
     36  + Uniform blocks GLSL
     37    - Basic scalar, vector and matrix types in uniform blocks
     38    - Samplers in uniform blocks - as negative case!
     39    - Structures and arrays in uniform blocks
     40    - Uniform block instance names
     41    - Uniform block arrays
     42    - Layout qualifiers: shared, packed, std140, row_major, column_major
     43    - Negative tests for syntax and semantic errors in declarations
     44    - Negative tests for uniform block linking
     45    - Unused uniforms in uniform blocks
     46  + Sharing uniform blocks between vertex and fragment shaders
     47 
     48 Excludes:
     49  + Mapping uniform buffers
     50    - Will be covered in buffer mapping tests
     51  + Negative tests for uniform buffer API
     52    - Will be covered in negative API tests
     53 
     54 Description:
     55 
     56 Uniform block tests define a set of uniforms and uniform blocks. In addition two
     57 subsets are computed: uniforms accessed from vertex shader and uniforms accessed
     58 from fragment shader respectively. The uniform sets are either specified manually
     59 or choosen randomly. Values for each uniform are choosen.
     60 
     61 Shaders are generated based on uniform declarations and use set. Each uniform that
     62 is in "used set" is read and compared against expected value in the shader. Final
     63 result is a boolean value: true if all uniforms contained expected values and false
     64 otherwise. Vertex shader result controls green channel: output is 1 if values were
     65 correct and 0 otherwise. Fragment shader result controls blue channel in the same
     66 manner.
     67 
     68 Shaders are compiled and linked together. Uniform block layout is queried and
     69 values are stored into one or more uniform buffers. If std140 memory layout is used,
     70 a reference memory layout is used instead and queries are made to validate the
     71 layout computed by implementation prior to issuing any draw calls.
     72 
     73 A single quad consisting of two triangles is rendered and resulting framebuffer
     74 pixels are checked. If all pixels are white and uniform layout queries didn't
     75 return any unexpected values or errors, test case passes.
     76 
     77 Negative tests for compiler and linker use a pair of hand-written shaders. Compile
     78 or link is verified to return failure.
     79