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 shader GLSL 17#version 430 18layout(set = 0, binding = 0) buffer block1 { 19 int val; 20}; 21 22void main() { 23 val = val + 1; 24} 25END 26BUFFER buf DATA_TYPE int32 DATA 0 END 27 28PIPELINE compute my_pipeline 29 ATTACH shader 30 BIND BUFFER buf AS storage DESCRIPTOR_SET 0 BINDING 0 31END 32 33REPEAT 4 34 RUN my_pipeline 1 1 1 35END 36EXPECT buf IDX 0 EQ 4 37