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 20layout(location = 0) in vec4 color_in; 21layout(location = 0) out vec4 color_out; 22 23void main() { 24 color_out = color_in; 25} 26END 27 28BUFFER img_buf FORMAT B8G8R8A8_UNORM 29 30PIPELINE graphics my_pipeline 31 ATTACH vtex_shader 32 ATTACH frag_shader 33 34 FRAMEBUFFER_SIZE 256 256 35 BIND BUFFER img_buf AS color LOCATION 0 36END 37 38CLEAR my_pipeline 39EXPECT img_buf IDX 0 0 SIZE 256 256 EQ_RGBA 0 0 0 0 40