aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authoralan-baker <alanbaker@google.com>2019-07-23 08:32:36 -0400
committerGitHub <noreply@github.com>2019-07-23 08:32:36 -0400
commit1c7b905284129c4a9f2f735e08da6f53b4eb4d9b (patch)
tree860dfc404a066f9a37d6ca639afdebaea6a46359 /docs
parentd7fc00b52faa239546eefd1e74f9fd2e3b25b993 (diff)
downloadamber-1c7b905284129c4a9f2f735e08da6f53b4eb4d9b.tar.gz
Opencl set for kernel args (#589)
Fixes #428 * Adds parsing (and tests) for SET command in pipeline command: * only for use with OPENCL-C shaders (errors out in other cases) ``` SET KERNEL ARG_NAME _name_ AS {datum_type} _value_ SET KERNEL ARG_NUMBER _number_ AS {datum_type} _value_ ``` * Executor now invokes the pipeline to generate buffers for the PoD args populated from SET commands * Allow clustered pod args * refactor opencl specific code in executor to its own loop * Add end-to-end test * Document SET command
Diffstat (limited to 'docs')
-rw-r--r--docs/amber_script.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/amber_script.md b/docs/amber_script.md
index a7a552c..93e97ba 100644
--- a/docs/amber_script.md
+++ b/docs/amber_script.md
@@ -275,6 +275,20 @@ attachment content, depth/stencil content, uniform buffers, etc.
INDEX_DATA {buffer_name}
```
+##### OpenCL Plain-Old-Data Arguments
+OpenCL kernels can have plain-old-data (pod or pod_ubo in the desriptor map)
+arguments set their data via this command. Amber will generate the appropriate
+buffers for the pipeline populated with the specified data.
+
+```groovy
+ # Set argument |name| to |data_type| with value |val|.
+ SET KERNEL ARG_NAME _name_ AS {data_type} _val_
+
+ # Set argument |number| to |data_type| with value |val|.
+ # Arguments use 0-based numbering.
+ SET KERNEL ARG_NUMBER _number_ AS {data_type} _val_
+```
+
##### Topologies
* `point_list`
* `line_list`