~mmach/netext73/webkit2gtk

« back to all changes in this revision

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

  • 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
// clear.metal: Implements viewport clearing.
 
7
 
 
8
#include "common.h"
 
9
 
 
10
struct ClearParams
 
11
{
 
12
    float4 clearColor;
 
13
    float clearDepth;
 
14
};
 
15
 
 
16
vertex float4 clearVS(unsigned int vid [[ vertex_id ]],
 
17
                      constant ClearParams &clearParams [[buffer(0)]])
 
18
{
 
19
    return float4(gCorners[vid], clearParams.clearDepth, 1.0);
 
20
}
 
21
 
 
22
fragment float4 clearFS(constant ClearParams &clearParams [[buffer(0)]])
 
23
{
 
24
    return clearParams.clearColor;
 
25
}