~mmach/netext73/webkit2gtk

« back to all changes in this revision

Viewing changes to Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/shaders/common.h

  • Committer: mmach
  • Date: 2023-06-16 17:21:37 UTC
  • Revision ID: netbit73@gmail.com-20230616172137-2rqx6yr96ga9g3kp
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 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),
 
28
};
 
29
 
 
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};
 
33
 
 
34
fragment float4 dummyFS()
 
35
{
 
36
    return float4(0, 0, 0, 0);
 
37
}
 
38
#endif /* LIBANGLE_RENDERER_METAL_SHADERS_COMMON_H_ */