• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_vk_internal_shaders.py using data from shaders/src/*
3 //
4 // Copyright 2018 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // vk_internal_shaders_autogen.h:
9 //   Pre-generated shader library for the ANGLE Vulkan back-end.
10 
11 #ifndef LIBANGLE_RENDERER_VULKAN_VK_INTERNAL_SHADERS_AUTOGEN_H_
12 #define LIBANGLE_RENDERER_VULKAN_VK_INTERNAL_SHADERS_AUTOGEN_H_
13 
14 #include "libANGLE/renderer/vulkan/vk_utils.h"
15 
16 namespace rx
17 {
18 namespace vk
19 {
20 namespace InternalShader
21 {
22 namespace BlitResolve_frag
23 {
24 enum flags
25 {
26     kSrcIsArray = 0x00000001,
27     kIsResolve  = 0x00000002,
28 };
29 enum Blit
30 {
31     kBlitColorFloat   = 0x00000000,
32     kBlitColorInt     = 0x00000004,
33     kBlitColorUint    = 0x00000008,
34     kBlitDepth        = 0x0000000C,
35     kBlitStencil      = 0x00000010,
36     kBlitDepthStencil = 0x00000014,
37 };
38 constexpr size_t kArrayLen = 0x00000018;
39 }  // namespace BlitResolve_frag
40 
41 namespace BlitResolveStencilNoExport_comp
42 {
43 enum flags
44 {
45     kSrcIsArray = 0x00000001,
46     kIsResolve  = 0x00000002,
47 };
48 constexpr size_t kArrayLen = 0x00000004;
49 }  // namespace BlitResolveStencilNoExport_comp
50 
51 namespace ConvertIndex_comp
52 {
53 enum flags
54 {
55     kIsPrimitiveRestartEnabled = 0x00000001,
56     kIsIndirect                = 0x00000002,
57 };
58 constexpr size_t kArrayLen = 0x00000004;
59 }  // namespace ConvertIndex_comp
60 
61 namespace ConvertIndexIndirectLineLoop_comp
62 {
63 enum IndicesBitsWidth
64 {
65     kIs8Bits  = 0x00000000,
66     kIs16Bits = 0x00000001,
67     kIs32Bits = 0x00000002,
68 };
69 constexpr size_t kArrayLen = 0x00000003;
70 }  // namespace ConvertIndexIndirectLineLoop_comp
71 
72 namespace ConvertIndirectLineLoop_comp
73 {
74 constexpr size_t kArrayLen = 0x00000001;
75 }  // namespace ConvertIndirectLineLoop_comp
76 
77 namespace ConvertVertex_comp
78 {
79 enum Conversion
80 {
81     kSintToSint   = 0x00000000,
82     kUintToUint   = 0x00000001,
83     kSintToFloat  = 0x00000002,
84     kUintToFloat  = 0x00000003,
85     kSnormToFloat = 0x00000004,
86     kUnormToFloat = 0x00000005,
87     kFixedToFloat = 0x00000006,
88     kFloatToFloat = 0x00000007,
89 };
90 constexpr size_t kArrayLen = 0x00000008;
91 }  // namespace ConvertVertex_comp
92 
93 namespace FullScreenQuad_vert
94 {
95 constexpr size_t kArrayLen = 0x00000001;
96 }  // namespace FullScreenQuad_vert
97 
98 namespace GenerateMipmap_comp
99 {
100 enum MaxSupportedDest
101 {
102     kDestSize4 = 0x00000000,
103     kDestSize6 = 0x00000001,
104 };
105 enum Format
106 {
107     kIsRGBA8          = 0x00000000,
108     kIsRGBA8_UseHalf  = 0x00000002,
109     kIsRGBA16         = 0x00000004,
110     kIsRGBA16_UseHalf = 0x00000006,
111     kIsRGBA32F        = 0x00000008,
112 };
113 constexpr size_t kArrayLen = 0x0000000A;
114 }  // namespace GenerateMipmap_comp
115 
116 namespace ImageClear_frag
117 {
118 enum flags
119 {
120     kClearDepth = 0x00000001,
121 };
122 enum AttachmentIndex
123 {
124     kAttachment0 = 0x00000000,
125     kAttachment1 = 0x00000002,
126     kAttachment2 = 0x00000004,
127     kAttachment3 = 0x00000006,
128     kAttachment4 = 0x00000008,
129     kAttachment5 = 0x0000000A,
130     kAttachment6 = 0x0000000C,
131     kAttachment7 = 0x0000000E,
132 };
133 enum Format
134 {
135     kIsFloat = 0x00000000,
136     kIsSint  = 0x00000010,
137     kIsUint  = 0x00000020,
138 };
139 constexpr size_t kArrayLen = 0x00000030;
140 }  // namespace ImageClear_frag
141 
142 namespace ImageCopy_frag
143 {
144 enum DestFormat
145 {
146     kDestIsFloat = 0x00000000,
147     kDestIsSint  = 0x00000001,
148     kDestIsUint  = 0x00000002,
149 };
150 enum SrcFormat
151 {
152     kSrcIsFloat = 0x00000000,
153     kSrcIsSint  = 0x00000004,
154     kSrcIsUint  = 0x00000008,
155 };
156 enum SrcType
157 {
158     kSrcIs2D      = 0x00000000,
159     kSrcIs2DArray = 0x00000010,
160     kSrcIs3D      = 0x00000020,
161 };
162 constexpr size_t kArrayLen = 0x0000002B;
163 }  // namespace ImageCopy_frag
164 
165 namespace OverlayCull_comp
166 {
167 enum SubgroupSize
168 {
169     kIs8x4 = 0x00000000,
170     kIs8x8 = 0x00000001,
171 };
172 enum SubgroupOp
173 {
174     kSupportsBallot     = 0x00000000,
175     kSupportsArithmetic = 0x00000002,
176     kSupportsNone       = 0x00000004,
177 };
178 constexpr size_t kArrayLen = 0x00000006;
179 }  // namespace OverlayCull_comp
180 
181 namespace OverlayDraw_comp
182 {
183 enum SubgroupSize
184 {
185     kIs8x4 = 0x00000000,
186     kIs8x8 = 0x00000001,
187 };
188 constexpr size_t kArrayLen = 0x00000002;
189 }  // namespace OverlayDraw_comp
190 
191 }  // namespace InternalShader
192 
193 class ShaderLibrary final : angle::NonCopyable
194 {
195   public:
196     ShaderLibrary();
197     ~ShaderLibrary();
198 
199     void destroy(VkDevice device);
200 
201     angle::Result getBlitResolve_frag(Context *context,
202                                       uint32_t shaderFlags,
203                                       RefCounted<ShaderAndSerial> **shaderOut);
204     angle::Result getBlitResolveStencilNoExport_comp(Context *context,
205                                                      uint32_t shaderFlags,
206                                                      RefCounted<ShaderAndSerial> **shaderOut);
207     angle::Result getConvertIndex_comp(Context *context,
208                                        uint32_t shaderFlags,
209                                        RefCounted<ShaderAndSerial> **shaderOut);
210     angle::Result getConvertIndexIndirectLineLoop_comp(Context *context,
211                                                        uint32_t shaderFlags,
212                                                        RefCounted<ShaderAndSerial> **shaderOut);
213     angle::Result getConvertIndirectLineLoop_comp(Context *context,
214                                                   uint32_t shaderFlags,
215                                                   RefCounted<ShaderAndSerial> **shaderOut);
216     angle::Result getConvertVertex_comp(Context *context,
217                                         uint32_t shaderFlags,
218                                         RefCounted<ShaderAndSerial> **shaderOut);
219     angle::Result getFullScreenQuad_vert(Context *context,
220                                          uint32_t shaderFlags,
221                                          RefCounted<ShaderAndSerial> **shaderOut);
222     angle::Result getGenerateMipmap_comp(Context *context,
223                                          uint32_t shaderFlags,
224                                          RefCounted<ShaderAndSerial> **shaderOut);
225     angle::Result getImageClear_frag(Context *context,
226                                      uint32_t shaderFlags,
227                                      RefCounted<ShaderAndSerial> **shaderOut);
228     angle::Result getImageCopy_frag(Context *context,
229                                     uint32_t shaderFlags,
230                                     RefCounted<ShaderAndSerial> **shaderOut);
231     angle::Result getOverlayCull_comp(Context *context,
232                                       uint32_t shaderFlags,
233                                       RefCounted<ShaderAndSerial> **shaderOut);
234     angle::Result getOverlayDraw_comp(Context *context,
235                                       uint32_t shaderFlags,
236                                       RefCounted<ShaderAndSerial> **shaderOut);
237 
238   private:
239     RefCounted<ShaderAndSerial>
240         mBlitResolve_frag_shaders[InternalShader::BlitResolve_frag::kArrayLen];
241     RefCounted<ShaderAndSerial> mBlitResolveStencilNoExport_comp_shaders
242         [InternalShader::BlitResolveStencilNoExport_comp::kArrayLen];
243     RefCounted<ShaderAndSerial>
244         mConvertIndex_comp_shaders[InternalShader::ConvertIndex_comp::kArrayLen];
245     RefCounted<ShaderAndSerial> mConvertIndexIndirectLineLoop_comp_shaders
246         [InternalShader::ConvertIndexIndirectLineLoop_comp::kArrayLen];
247     RefCounted<ShaderAndSerial> mConvertIndirectLineLoop_comp_shaders
248         [InternalShader::ConvertIndirectLineLoop_comp::kArrayLen];
249     RefCounted<ShaderAndSerial>
250         mConvertVertex_comp_shaders[InternalShader::ConvertVertex_comp::kArrayLen];
251     RefCounted<ShaderAndSerial>
252         mFullScreenQuad_vert_shaders[InternalShader::FullScreenQuad_vert::kArrayLen];
253     RefCounted<ShaderAndSerial>
254         mGenerateMipmap_comp_shaders[InternalShader::GenerateMipmap_comp::kArrayLen];
255     RefCounted<ShaderAndSerial>
256         mImageClear_frag_shaders[InternalShader::ImageClear_frag::kArrayLen];
257     RefCounted<ShaderAndSerial> mImageCopy_frag_shaders[InternalShader::ImageCopy_frag::kArrayLen];
258     RefCounted<ShaderAndSerial>
259         mOverlayCull_comp_shaders[InternalShader::OverlayCull_comp::kArrayLen];
260     RefCounted<ShaderAndSerial>
261         mOverlayDraw_comp_shaders[InternalShader::OverlayDraw_comp::kArrayLen];
262 };
263 }  // namespace vk
264 }  // namespace rx
265 
266 #endif  // LIBANGLE_RENDERER_VULKAN_VK_INTERNAL_SHADERS_AUTOGEN_H_
267