xref: /aosp_15_r20/external/deqp/doc/testspecs/GLES31/functional.compute.indirect_dispatch.txt (revision 35238bce31c2a825756842865a792f8cf7f89930)
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    Indirect Compute Dispatch
20*35238bceSAndroid Build Coastguard Worker
21*35238bceSAndroid Build Coastguard WorkerTests:
22*35238bceSAndroid Build Coastguard Worker + dEQP-GLES31.functional.compute.indirect_dispatch.*
23*35238bceSAndroid Build Coastguard Worker
24*35238bceSAndroid Build Coastguard WorkerIncludes:
25*35238bceSAndroid Build Coastguard Worker + glDispatchComputeIndirect()
26*35238bceSAndroid Build Coastguard Worker + Single and multiple dispatch calls from a single buffer
27*35238bceSAndroid Build Coastguard Worker + One or several work groups
28*35238bceSAndroid Build Coastguard Worker + One or several items per work group
29*35238bceSAndroid Build Coastguard Worker + Offsets within buffer
30*35238bceSAndroid Build Coastguard Worker + Empty dispatch commands (0 work groups)
31*35238bceSAndroid Build Coastguard Worker + Buffers uploaded from application side
32*35238bceSAndroid Build Coastguard Worker + Buffers generated using compute shaders
33*35238bceSAndroid Build Coastguard Worker   - Synchronization with GL_COMMAND_BARRIER_BIT
34*35238bceSAndroid Build Coastguard Worker
35*35238bceSAndroid Build Coastguard WorkerExcludes:
36*35238bceSAndroid Build Coastguard Worker + Negative tests
37*35238bceSAndroid Build Coastguard Worker + Robustness tests
38*35238bceSAndroid Build Coastguard Worker
39*35238bceSAndroid Build Coastguard WorkerDescription:
40*35238bceSAndroid Build Coastguard Worker
41*35238bceSAndroid Build Coastguard WorkerIndirect dispatch tests allocate a buffer and fill it with one or more
42*35238bceSAndroid Build Coastguard Workerdispatch commands. In upload_buffer cases commands are written using
43*35238bceSAndroid Build Coastguard WorkerglBufferData(). In gen_in_compute cases a compute shader is first dispatches,
44*35238bceSAndroid Build Coastguard Workerthat writes out the commands into the buffer by accessing the command buffer
45*35238bceSAndroid Build Coastguard Workeras a SSBO. Memory barrier is issued after the first compute shader in
46*35238bceSAndroid Build Coastguard Workergen_in_compute cases.
47*35238bceSAndroid Build Coastguard Worker
48*35238bceSAndroid Build Coastguard WorkerActual indirect compute tasks use a simple compute shader, that has access to
49*35238bceSAndroid Build Coastguard Workera SSBO with two fields. One is reference work group count (uvec3) and another
50*35238bceSAndroid Build Coastguard Workeris output uint field, that is incremented atomically for each invocation,
51*35238bceSAndroid Build Coastguard Workerwhere comparison between gl_NumWorkGroups and the reference count passed.
52*35238bceSAndroid Build Coastguard Worker
53*35238bceSAndroid Build Coastguard WorkerOnce the command buffer has been generated, one or more indirect dispatch
54*35238bceSAndroid Build Coastguard Workercalls are made. SSBO binding offset is adjusted between each call to allocate
55*35238bceSAndroid Build Coastguard Workera different portion of the input/output buffer for each call. After calls have
56*35238bceSAndroid Build Coastguard Workerbeen issued, result buffer is mapped for reading and pass counts are verified.
57*35238bceSAndroid Build Coastguard WorkerNo explicit synchronization call is made prior to mapping the buffer so GL is
58*35238bceSAndroid Build Coastguard Workerresponsible of synchronizing the tasks.
59