1#!amber
2# Copyright 2019 The Amber Authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16SHADER compute my_shader OPENCL-C
17kernel void foo(global int* in, global int* out) {
18  *out = *in;
19}
20END
21
22BUFFER in_buf DATA_TYPE uint32 DATA
23 9
24END
25BUFFER out_buf DATA_TYPE uint32 SIZE 1 FILL 0
26
27PIPELINE compute my_pipeline
28  ATTACH my_shader ENTRY_POINT foo
29  BIND BUFFER in_buf AS storage DESCRIPTOR_SET 0 BINDING 0
30  BIND BUFFER out_buf AS storage DESCRIPTOR_SET 0 BINDING 1
31END
32
33RUN my_pipeline 1 1 1
34
35EXPECT out_buf EQ_BUFFER in_buf
36