1 // 2 // Copyright 2019 The ANGLE Project. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // common.h: Common header for other metal source code. 7 8 #ifndef LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_ 9 #define LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_ 10 11 #ifndef SKIP_STD_HEADERS 12 # include <simd/simd.h> 13 # include <metal_stdlib> 14 #endif 15 16 #define ANGLE_KERNEL_GUARD(IDX, MAX_COUNT) \ 17 if (IDX >= MAX_COUNT) \ 18 { \ 19 return; \ 20 } 21 22 using namespace metal; 23 24 // Full screen triangle's vertices 25 constant float2 gCorners[3] = {float2(-1.0f, -1.0f), float2(3.0f, -1.0f), float2(-1.0f, 3.0f)}; 26 dummyFS()27fragment float4 dummyFS() 28 { 29 return float4(0, 0, 0, 0); 30 } 31 #endif /* LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_ */ 32