• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1-------------------------------------------------------------------------
2drawElements Quality Program Test Specification
3-----------------------------------------------
4
5Copyright 2014 The Android Open Source Project
6
7Licensed under the Apache License, Version 2.0 (the "License");
8you may not use this file except in compliance with the License.
9You may obtain a copy of the License at
10
11     http://www.apache.org/licenses/LICENSE-2.0
12
13Unless required by applicable law or agreed to in writing, software
14distributed under the License is distributed on an "AS IS" BASIS,
15WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16See the License for the specific language governing permissions and
17limitations under the License.
18-------------------------------------------------------------------------
19    Indirect Compute Dispatch
20
21Tests:
22 + dEQP-GLES31.functional.compute.indirect_dispatch.*
23
24Includes:
25 + glDispatchComputeIndirect()
26 + Single and multiple dispatch calls from a single buffer
27 + One or several work groups
28 + One or several items per work group
29 + Offsets within buffer
30 + Empty dispatch commands (0 work groups)
31 + Buffers uploaded from application side
32 + Buffers generated using compute shaders
33   - Synchronization with GL_COMMAND_BARRIER_BIT
34
35Excludes:
36 + Negative tests
37 + Robustness tests
38
39Description:
40
41Indirect dispatch tests allocate a buffer and fill it with one or more
42dispatch commands. In upload_buffer cases commands are written using
43glBufferData(). In gen_in_compute cases a compute shader is first dispatches,
44that writes out the commands into the buffer by accessing the command buffer
45as a SSBO. Memory barrier is issued after the first compute shader in
46gen_in_compute cases.
47
48Actual indirect compute tasks use a simple compute shader, that has access to
49a SSBO with two fields. One is reference work group count (uvec3) and another
50is output uint field, that is incremented atomically for each invocation,
51where comparison between gl_NumWorkGroups and the reference count passed.
52
53Once the command buffer has been generated, one or more indirect dispatch
54calls are made. SSBO binding offset is adjusted between each call to allocate
55a different portion of the input/output buffer for each call. After calls have
56been issued, result buffer is mapped for reading and pass counts are verified.
57No explicit synchronization call is made prior to mapping the buffer so GL is
58responsible of synchronizing the tasks.
59