• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!amber
2
3# Copyright 2020 Valve Corporation.
4# Copyright 2020 The Khronos Group Inc.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
18SHADER vertex vert_shader PASSTHROUGH
19
20SHADER fragment frag_shader GLSL
21#version 450
22layout(push_constant, std430) uniform PushConstants {
23	uint op1;
24	uint op2;
25} pushConstants;
26layout(location=0) out vec4 out_color;
27void main()
28{
29	out_color = vec4(~(pushConstants.op1^pushConstants.op2));
30}
31END
32
33BUFFER framebuffer0 FORMAT B8G8R8A8_UNORM
34BUFFER push_constants DATA_TYPE uint32 STD430 DATA
350xaaaaaaab
360x55555555
37END
38
39PIPELINE graphics graphics_pipeline
40	ATTACH vert_shader
41	ATTACH frag_shader
42
43	FRAMEBUFFER_SIZE 16 16
44	BIND BUFFER framebuffer0 AS color LOCATION 0
45	BIND BUFFER push_constants AS push_constant
46END
47
48CLEAR graphics_pipeline
49RUN graphics_pipeline DRAW_RECT POS 0 0 SIZE 16 16
50EXPECT framebuffer0 IDX 0 0 SIZE 16 16 EQ_RGBA 255 255 255 255
51