blob: 343b6b4439c75bdce2c81b434a1065c5ca049856 [file] [log] [blame]
#!amber
# Copyright 2019 The Amber Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SHADER compute my_shader OPENCL-C
kernel void foo(global int* in, global int* out) {
*out = *in;
}
END
BUFFER in_buf DATA_TYPE uint32 DATA
9
END
BUFFER out_buf DATA_TYPE uint32 SIZE 1 FILL 0
PIPELINE compute my_pipeline
ATTACH my_shader ENTRY_POINT foo
BIND BUFFER in_buf AS storage DESCRIPTOR_SET 0 BINDING 0
BIND BUFFER out_buf AS storage DESCRIPTOR_SET 0 BINDING 1
END
RUN my_pipeline 1 1 1
EXPECT out_buf EQ_BUFFER in_buf