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 Shader Storage Buffer Object / Buffer Block Tests 20e5c31af7Sopenharmony_ci 21e5c31af7Sopenharmony_ciTests: 22e5c31af7Sopenharmony_ci + dEQP-GLES31.functional.ssbo.* 23e5c31af7Sopenharmony_ci 24e5c31af7Sopenharmony_ciIncludes: 25e5c31af7Sopenharmony_ci + SSBO access from compute shaders 26e5c31af7Sopenharmony_ci + Basic SSBO usage 27e5c31af7Sopenharmony_ci - Binding and unbinding uniform buffers 28e5c31af7Sopenharmony_ci - Writing uniform buffer data with glBufferData() 29e5c31af7Sopenharmony_ci + Binding SSBOs to buffer blocks 30e5c31af7Sopenharmony_ci - glBindBufferRange() 31e5c31af7Sopenharmony_ci - glBindBufferBase() 32e5c31af7Sopenharmony_ci - glShaderStorageBlockBinding() 33e5c31af7Sopenharmony_ci + Querying buffer block memory layout 34e5c31af7Sopenharmony_ci + Layout sanity verification 35e5c31af7Sopenharmony_ci + std140 and std430 layout verification 36e5c31af7Sopenharmony_ci + Buffer blocks GLSL 37e5c31af7Sopenharmony_ci - Basic scalar, vector and matrix types in buffer blocks 38e5c31af7Sopenharmony_ci - Samplers in buffer blocks - as negative case! 39e5c31af7Sopenharmony_ci - Structures and arrays in buffer blocks 40e5c31af7Sopenharmony_ci - Buffer block instance names 41e5c31af7Sopenharmony_ci - Buffer block arrays 42e5c31af7Sopenharmony_ci - Unsized arrays as a last element of buffer block 43e5c31af7Sopenharmony_ci - Layout qualifiers: shared, packed, std140, row_major, column_major 44e5c31af7Sopenharmony_ci - Unused variables in buffer blocks 45e5c31af7Sopenharmony_ci * Atomic operations 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ciExcludes: 48e5c31af7Sopenharmony_ci + Access from other shader shader stages (currently compute only) 49e5c31af7Sopenharmony_ci + Negative tests 50e5c31af7Sopenharmony_ci 51e5c31af7Sopenharmony_ciDescription: 52e5c31af7Sopenharmony_ci 53e5c31af7Sopenharmony_ciSSBO layout and access tests generate compute shader code based on interface 54e5c31af7Sopenharmony_cideclaration. Shader is compiled and layout is queried. Validity checks are 55e5c31af7Sopenharmony_ciperformed to the layout, and in case of std140 and std430 layouts the layout 56e5c31af7Sopenharmony_ciis compared against a full reference layout. 57e5c31af7Sopenharmony_ci 58e5c31af7Sopenharmony_ciSingle compute shader invocation is issued. Shader reads and/or writes to 59e5c31af7Sopenharmony_ciSSBO. Reads are validated by comparing values to constant values declared in 60e5c31af7Sopenharmony_cishader text. Writes are validated by reading back the SSBO and comparing 61e5c31af7Sopenharmony_ciagainst expected values. 62e5c31af7Sopenharmony_ci 63e5c31af7Sopenharmony_ciAtomic operation test cases use a single SSBO for both input data, output data 64e5c31af7Sopenharmony_ciand data operated with atomic memory functions. Multiple work groups of size 65e5c31af7Sopenharmony_ci3x2x1 is issued and each invocation executes atomic operation with per- 66e5c31af7Sopenharmony_ciinvocation data. Result values are then stored into SSBO. Results are 67e5c31af7Sopenharmony_civalidated by mapping buffer and doing comparison that varies per function. The 68e5c31af7Sopenharmony_ciinput values are chosen so that comparison can detect obvious non-atomic 69e5c31af7Sopenharmony_cibehavior. 70