• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 vertex vtex_shader PASSTHROUGH
17SHADER fragment frag_shader GLSL
18#version 430
19
20void main() {
21}
22END
23
24BUFFER depth_stencil_buf FORMAT D32_SFLOAT_S8_UINT
25BUFFER img_buf_0 FORMAT B8G8R8A8_UNORM
26BUFFER img_buf_1 FORMAT B8G8R8A8_UNORM
27
28PIPELINE graphics my_pipeline
29  ATTACH vtex_shader
30  ATTACH frag_shader
31
32  FRAMEBUFFER_SIZE 256 256
33  BIND BUFFER img_buf_0 AS color LOCATION 0
34  BIND BUFFER img_buf_1 AS color LOCATION 1
35  BIND BUFFER depth_stencil_buf AS depth_stencil
36END
37
38# This clear causes the pipeline clear to be executed, exercising the depth-stencil support.
39# However, there is no way to read a depth-stencil attachment directly, so we can't probe its output.
40# We would need a second pipeline or a depth test on the pipeline to observe the effects of the
41# depth-stencil clear.
42
43CLEAR_COLOR my_pipeline 255 0 0 255
44CLEAR my_pipeline
45EXPECT img_buf_0 IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
46EXPECT img_buf_1 IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
47