1# Copyright 2019 The Amber Authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15[compute shader] 16#version 450 17 18layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 19layout(binding = 0) buffer data_buf0 { 20 int val0; 21 int val1; 22} data0; 23 24layout(binding = 1) buffer data_buf1 { 25 int val0; 26 int val1; 27} data1; 28 29void main() { 30 data0.val0 = 100; 31 data0.val1 = 200; 32 33 data1.val0 = data0.val0; 34 data1.val1 = data0.val1; 35} 36 37[test] 38ssbo 0:0 8 39ssbo 0:1 subdata int 0 0 0 40 41compute 1 1 1 42 43probe ssbo int 0:1 0 == 100 200 44