blob: 633cea0cd74506231ff272a5a9a93a1ad5d29eed [file] [log] [blame]
Rex Xu9d93a232016-05-05 12:30:44 +08001/*
2** Copyright (c) 2014-2016 The Khronos Group Inc.
3**
4** Permission is hereby granted, free of charge, to any person obtaining a copy
5** of this software and/or associated documentation files (the "Materials"),
6** to deal in the Materials without restriction, including without limitation
7** the rights to use, copy, modify, merge, publish, distribute, sublicense,
8** and/or sell copies of the Materials, and to permit persons to whom the
9** Materials are furnished to do so, subject to the following conditions:
10**
11** The above copyright notice and this permission notice shall be included in
12** all copies or substantial portions of the Materials.
13**
14** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
15** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
16** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
17**
18** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
24** IN THE MATERIALS.
25*/
26
27#ifndef GLSLextAMD_H
28#define GLSLextAMD_H
29
30enum BuiltIn;
31enum Decoration;
32enum Op;
33
34static const int GLSLextAMDVersion = 100;
35static const int GLSLextAMDRevision = 1;
36
37// SPV_AMD_shader_ballot
38static const char* const E_SPV_AMD_shader_ballot = "SPV_AMD_shader_ballot";
39
40static const Op OpGroupIAddNonUniformAMD = static_cast<Op>(5000);
41static const Op OpGroupFAddNonUniformAMD = static_cast<Op>(5001);
42static const Op OpGroupFMinNonUniformAMD = static_cast<Op>(5002);
43static const Op OpGroupUMinNonUniformAMD = static_cast<Op>(5003);
44static const Op OpGroupSMinNonUniformAMD = static_cast<Op>(5004);
45static const Op OpGroupFMaxNonUniformAMD = static_cast<Op>(5005);
46static const Op OpGroupUMaxNonUniformAMD = static_cast<Op>(5006);
47static const Op OpGroupSMaxNonUniformAMD = static_cast<Op>(5007);
48
49enum ShaderBallotAMD {
50 ShaderBallotBadAMD = 0, // Don't use
51
52 SwizzleInvocationsAMD = 1,
53 SwizzleInvocationsMaskedAMD = 2,
54 WriteInvocationAMD = 3,
55 MbcntAMD = 4,
56
57 ShaderBallotCountAMD
58};
59
60// SPV_AMD_shader_trinary_minmax
61static const char* const E_SPV_AMD_shader_trinary_minmax = "SPV_AMD_shader_trinary_minmax";
62
63enum ShaderTrinaryMinMaxAMD {
64 ShaderTrinaryMinMaxBadAMD = 0, // Don't use
65
66 FMin3AMD = 1,
67 UMin3AMD = 2,
68 SMin3AMD = 3,
69 FMax3AMD = 4,
70 UMax3AMD = 5,
71 SMax3AMD = 6,
72 FMid3AMD = 7,
73 UMid3AMD = 8,
74 SMid3AMD = 9,
75
76 ShaderTrinaryMinMaxCountAMD
77};
78
79// SPV_AMD_shader_explicit_vertex_parameter
80static const char* const E_SPV_AMD_shader_explicit_vertex_parameter = "SPV_AMD_shader_explicit_vertex_parameter";
81
82static const BuiltIn BuiltInBaryCoordNoPerspAMD = static_cast<BuiltIn>(4992);
83static const BuiltIn BuiltInBaryCoordNoPerspCentroidAMD = static_cast<BuiltIn>(4993);
84static const BuiltIn BuiltInBaryCoordNoPerspSampleAMD = static_cast<BuiltIn>(4994);
85static const BuiltIn BuiltInBaryCoordSmoothAMD = static_cast<BuiltIn>(4995);
86static const BuiltIn BuiltInBaryCoordSmoothCentroidAMD = static_cast<BuiltIn>(4996);
87static const BuiltIn BuiltInBaryCoordSmoothSampleAMD = static_cast<BuiltIn>(4997);
88static const BuiltIn BuiltInBaryCoordPullModelAMD = static_cast<BuiltIn>(4998);
89
90static const Decoration DecorationExplicitInterpAMD = static_cast<Decoration>(4999);
91
92enum ShaderExplicitVertexParameterAMD {
93 ShaderExplicitVertexParameterBadAMD = 0, // Don't use
94
95 InterpolateAtVertexAMD = 1,
96
97 ShaderExplicitVertexParameterCountAMD
98};
99
100// SPV_AMD_gcn_shader
101static const char* const E_SPV_AMD_gcn_shader = "SPV_AMD_gcn_shader";
102
103enum GcnShaderAMD {
104 GcnShaderBadAMD = 0, // Don't use
105
106 CubeFaceIndexAMD = 1,
107 CubeFaceCoordAMD = 2,
108 TimeAMD = 3,
109
110 GcnShaderCountAMD
111};
112
113#endif // #ifndef GLSLextAMD_H