1*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 2*35238bceSAndroid Build Coastguard WorkerdrawElements Quality Program Test Specification 3*35238bceSAndroid Build Coastguard Worker----------------------------------------------- 4*35238bceSAndroid Build Coastguard Worker 5*35238bceSAndroid Build Coastguard WorkerCopyright 2014 The Android Open Source Project 6*35238bceSAndroid Build Coastguard Worker 7*35238bceSAndroid Build Coastguard WorkerLicensed under the Apache License, Version 2.0 (the "License"); 8*35238bceSAndroid Build Coastguard Workeryou may not use this file except in compliance with the License. 9*35238bceSAndroid Build Coastguard WorkerYou may obtain a copy of the License at 10*35238bceSAndroid Build Coastguard Worker 11*35238bceSAndroid Build Coastguard Worker http://www.apache.org/licenses/LICENSE-2.0 12*35238bceSAndroid Build Coastguard Worker 13*35238bceSAndroid Build Coastguard WorkerUnless required by applicable law or agreed to in writing, software 14*35238bceSAndroid Build Coastguard Workerdistributed under the License is distributed on an "AS IS" BASIS, 15*35238bceSAndroid Build Coastguard WorkerWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16*35238bceSAndroid Build Coastguard WorkerSee the License for the specific language governing permissions and 17*35238bceSAndroid Build Coastguard Workerlimitations under the License. 18*35238bceSAndroid Build Coastguard Worker------------------------------------------------------------------------- 19*35238bceSAndroid Build Coastguard Worker Shader Shared Variable Tests 20*35238bceSAndroid Build Coastguard Worker 21*35238bceSAndroid Build Coastguard WorkerTests: 22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES31.functional.compute.shared_var.* 23*35238bceSAndroid Build Coastguard Worker 24*35238bceSAndroid Build Coastguard WorkerIncludes: 25*35238bceSAndroid Build Coastguard Worker + All basic types, all precisions 26*35238bceSAndroid Build Coastguard Worker + Single shared variable 27*35238bceSAndroid Build Coastguard Worker + Various work group sizes 28*35238bceSAndroid Build Coastguard Worker - 2x1x3 in basic type cases 29*35238bceSAndroid Build Coastguard Worker - 1x1x1, 64x1x1, 1x64x1, 1x1x64, 256x1x1, 1x256x1, 17x5x9 for selected types 30*35238bceSAndroid Build Coastguard Worker + All built-in atomic operation functions 31*35238bceSAndroid Build Coastguard Worker + int, uint types 32*35238bceSAndroid Build Coastguard Worker + all precisions 33*35238bceSAndroid Build Coastguard Worker + Multiple work groups for atomic function cases 34*35238bceSAndroid Build Coastguard Worker 35*35238bceSAndroid Build Coastguard WorkerExcludes: 36*35238bceSAndroid Build Coastguard Worker + Multiple shared variables 37*35238bceSAndroid Build Coastguard Worker + Complex types (arrays, structures) 38*35238bceSAndroid Build Coastguard Worker + Negative tests 39*35238bceSAndroid Build Coastguard Worker 40*35238bceSAndroid Build Coastguard WorkerDescription: 41*35238bceSAndroid Build Coastguard Worker 42*35238bceSAndroid Build Coastguard WorkerBasic type test cases declare a single shared variable of the appropriate 43*35238bceSAndroid Build Coastguard Workertype. In addition following input/output variables are used: 44*35238bceSAndroid Build Coastguard Worker + buffer block containing an array of booleans, one for each item in work group 45*35238bceSAndroid Build Coastguard Worker + u_val[], u_ref[] uniform arrays, filled with identical values 46*35238bceSAndroid Build Coastguard Worker + u_numIters iteration count uniform, initialized with work group size 47*35238bceSAndroid Build Coastguard Worker 48*35238bceSAndroid Build Coastguard WorkerThe compute shader contains a loop that is limited by the u_numIters uniform. 49*35238bceSAndroid Build Coastguard WorkerIn each iteration one of the work items writes a value from u_val to the 50*35238bceSAndroid Build Coastguard Workershared variable. A shared memory barrier is issued, and after that all work 51*35238bceSAndroid Build Coastguard Workeritems read and compare shared var value to u_ref. If comparison passed for all 52*35238bceSAndroid Build Coastguard Workeriterations, true is set to appropriate element of the output array. Test case 53*35238bceSAndroid Build Coastguard Workerthen maps the output SSBO and checks that all elements are true, meaning that 54*35238bceSAndroid Build Coastguard Workerall shader invocations passed the test. 55*35238bceSAndroid Build Coastguard Worker 56*35238bceSAndroid Build Coastguard Worker 57*35238bceSAndroid Build Coastguard WorkerAtomic operation test cases issue multiple work groups of size 3x2x1. In each 58*35238bceSAndroid Build Coastguard Workerwork group first invocation initializes shared variable to a certain value. 59*35238bceSAndroid Build Coastguard WorkerBarrier is issued and after that each invocation issues atomic operation with 60*35238bceSAndroid Build Coastguard Workerper-invocation value. Resulting values are written out into SSBO. Finally, one 61*35238bceSAndroid Build Coastguard Workerinvocation per work group writes out the final shared variable value. 62*35238bceSAndroid Build Coastguard Worker 63*35238bceSAndroid Build Coastguard WorkerResulting values from SSBO are read using buffer mapping and verified. The 64*35238bceSAndroid Build Coastguard Workerinput values and validation logic depends on the type of the atomic operation. 65