1e5c31af7Sopenharmony_ci#!amber 2e5c31af7Sopenharmony_ci# Copyright 2019 The Amber Authors. 3e5c31af7Sopenharmony_ci# 4e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 5e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License. 6e5c31af7Sopenharmony_ci# You may obtain a copy of the License at 7e5c31af7Sopenharmony_ci# 8e5c31af7Sopenharmony_ci# https://www.apache.org/licenses/LICENSE-2.0 9e5c31af7Sopenharmony_ci# 10e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 11e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 12e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and 14e5c31af7Sopenharmony_ci# limitations under the License. 15e5c31af7Sopenharmony_ci 16e5c31af7Sopenharmony_ciSHADER compute shader GLSL 17e5c31af7Sopenharmony_ci#version 430 18e5c31af7Sopenharmony_cilayout(set = 0, binding = 0) buffer block1 { 19e5c31af7Sopenharmony_ci int val; 20e5c31af7Sopenharmony_ci}; 21e5c31af7Sopenharmony_ci 22e5c31af7Sopenharmony_civoid main() { 23e5c31af7Sopenharmony_ci val = val + 1; 24e5c31af7Sopenharmony_ci} 25e5c31af7Sopenharmony_ciEND 26e5c31af7Sopenharmony_ciBUFFER buf DATA_TYPE int32 DATA 0 END 27e5c31af7Sopenharmony_ci 28e5c31af7Sopenharmony_ciPIPELINE compute my_pipeline 29e5c31af7Sopenharmony_ci ATTACH shader 30e5c31af7Sopenharmony_ci BIND BUFFER buf AS storage DESCRIPTOR_SET 0 BINDING 0 31e5c31af7Sopenharmony_ciEND 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_ciREPEAT 4 34e5c31af7Sopenharmony_ci RUN my_pipeline 1 1 1 35e5c31af7Sopenharmony_ciEND 36e5c31af7Sopenharmony_ciEXPECT buf IDX 0 EQ 4 37