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.
6
// common.h: Common header for other metal source code.
8
#ifndef LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_
9
#define LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_
11
#ifndef SKIP_STD_HEADERS
12
# include <simd/simd.h>
13
# include <metal_stdlib>
16
#define ANGLE_KERNEL_GUARD(IDX, MAX_COUNT) \
17
if (IDX >= MAX_COUNT) \
22
using namespace metal;
24
// Full screen quad's vertices
25
constant float2 gCorners[6] = {
26
float2(-1.0f, 1.0f), float2(1.0f, -1.0f), float2(-1.0f, -1.0f),
27
float2(-1.0f, 1.0f), float2(1.0f, 1.0f), float2(1.0f, -1.0f),
30
// Full screen quad's texcoords indices:
31
// 0: lower left, 1: lower right, 2: upper left, 3: upper right
32
constant int gTexcoordsIndices[6] = {2, 1, 0, 2, 3, 1};
34
fragment float4 dummyFS()
36
return float4(0, 0, 0, 0);
38
#endif /* LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_ */