1e5c31af7Sopenharmony_ci# Copyright 2019 The Amber Authors.
2e5c31af7Sopenharmony_ci#
3e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
4e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License.
5e5c31af7Sopenharmony_ci# You may obtain a copy of the License at
6e5c31af7Sopenharmony_ci#
7e5c31af7Sopenharmony_ci#     https://www.apache.org/licenses/LICENSE-2.0
8e5c31af7Sopenharmony_ci#
9e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
10e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
11e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and
13e5c31af7Sopenharmony_ci# limitations under the License.
14e5c31af7Sopenharmony_ci
15e5c31af7Sopenharmony_ci[compute shader]
16e5c31af7Sopenharmony_ci#version 430
17e5c31af7Sopenharmony_ci
18e5c31af7Sopenharmony_cilayout(set = 0, binding = 0) buffer block0 {
19e5c31af7Sopenharmony_ci  mat3x4 transform0;
20e5c31af7Sopenharmony_ci};
21e5c31af7Sopenharmony_ci
22e5c31af7Sopenharmony_cilayout(set = 0, binding = 1) uniform block1 {
23e5c31af7Sopenharmony_ci  mat3x4 transform1;
24e5c31af7Sopenharmony_ci};
25e5c31af7Sopenharmony_ci
26e5c31af7Sopenharmony_cilayout(set = 0, binding = 2) buffer block3 {
27e5c31af7Sopenharmony_ci  vec3 test0;
28e5c31af7Sopenharmony_ci  vec3 test1;
29e5c31af7Sopenharmony_ci};
30e5c31af7Sopenharmony_ci
31e5c31af7Sopenharmony_civoid main() {
32e5c31af7Sopenharmony_ci  test0 = (transform0 * test0).xyz;
33e5c31af7Sopenharmony_ci  test1 = (transform1 * test1).xyz;
34e5c31af7Sopenharmony_ci}
35e5c31af7Sopenharmony_ci
36e5c31af7Sopenharmony_ci[test]
37e5c31af7Sopenharmony_ci
38e5c31af7Sopenharmony_ci# Fill mat3x4 using float
39e5c31af7Sopenharmony_ci# MatrixStride == 16
40e5c31af7Sopenharmony_cissbo 0:0 subdata float 0 1.0 0.0 0.0 0.0 \
41e5c31af7Sopenharmony_ci                         0.0 1.0 0.0 0.0 \
42e5c31af7Sopenharmony_ci                         0.0 0.0 1.0 1.0
43e5c31af7Sopenharmony_ci# MatrixStride == 16
44e5c31af7Sopenharmony_ciuniform ubo 0:1 float 0 1.0 0.0 0.0 0.0 \
45e5c31af7Sopenharmony_ci                        0.0 1.0 0.0 0.0 \
46e5c31af7Sopenharmony_ci                        0.0 0.0 1.0 1.0
47e5c31af7Sopenharmony_ci
48e5c31af7Sopenharmony_cissbo 0:2 subdata vec3  0 7.3 9.4 -5.8
49e5c31af7Sopenharmony_cissbo 0:2 subdata vec3 16 4.5 6.1 -3.8
50e5c31af7Sopenharmony_ci
51e5c31af7Sopenharmony_cicompute 1 1 1
52e5c31af7Sopenharmony_ci
53e5c31af7Sopenharmony_citolerance 0.1%
54e5c31af7Sopenharmony_ci
55e5c31af7Sopenharmony_ciprobe ssbo vec3 0:2  0 ~= 7.3 9.4 -5.8
56e5c31af7Sopenharmony_ciprobe ssbo vec3 0:2 16 ~= 4.5 6.1 -3.8
57