1 // GENERATED FILE - DO NOT EDIT. 2 // Generated by gen_vk_internal_shaders.py using data from shaders/src/* 3 // 4 // Copyright 2020 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 BufferUtils_comp 52 { 53 enum flags 54 { 55 kIsAligned = 0x00000001, 56 }; 57 enum Function 58 { 59 kIsClear = 0x00000000, 60 kIsCopy = 0x00000002, 61 }; 62 enum Format 63 { 64 kIsFloat = 0x00000000, 65 kIsSint = 0x00000004, 66 kIsUint = 0x00000008, 67 }; 68 constexpr size_t kArrayLen = 0x0000000C; 69 } // namespace BufferUtils_comp 70 71 namespace ConvertIndex_comp 72 { 73 enum flags 74 { 75 kIsPrimitiveRestartEnabled = 0x00000001, 76 kIsIndirect = 0x00000002, 77 }; 78 constexpr size_t kArrayLen = 0x00000004; 79 } // namespace ConvertIndex_comp 80 81 namespace ConvertIndexIndirectLineLoop_comp 82 { 83 enum IndicesBitsWidth 84 { 85 kIs8Bits = 0x00000000, 86 kIs16Bits = 0x00000001, 87 kIs32Bits = 0x00000002, 88 }; 89 constexpr size_t kArrayLen = 0x00000003; 90 } // namespace ConvertIndexIndirectLineLoop_comp 91 92 namespace ConvertIndirectLineLoop_comp 93 { 94 constexpr size_t kArrayLen = 0x00000001; 95 } // namespace ConvertIndirectLineLoop_comp 96 97 namespace ConvertVertex_comp 98 { 99 enum Conversion 100 { 101 kSintToSint = 0x00000000, 102 kUintToUint = 0x00000001, 103 kSintToFloat = 0x00000002, 104 kUintToFloat = 0x00000003, 105 kSnormToFloat = 0x00000004, 106 kUnormToFloat = 0x00000005, 107 kFixedToFloat = 0x00000006, 108 kFloatToFloat = 0x00000007, 109 kA2BGR10SintToSint = 0x00000008, 110 kA2BGR10UintToUint = 0x00000009, 111 kA2BGR10SintToFloat = 0x0000000A, 112 kA2BGR10UintToFloat = 0x0000000B, 113 kA2BGR10SnormToFloat = 0x0000000C, 114 kRGB10A2SintToFloat = 0x0000000D, 115 kRGB10A2UintToFloat = 0x0000000E, 116 kRGB10A2SnormToFloat = 0x0000000F, 117 kRGB10A2UnormToFloat = 0x00000010, 118 }; 119 constexpr size_t kArrayLen = 0x00000011; 120 } // namespace ConvertVertex_comp 121 122 namespace FullScreenQuad_vert 123 { 124 constexpr size_t kArrayLen = 0x00000001; 125 } // namespace FullScreenQuad_vert 126 127 namespace ImageClear_frag 128 { 129 enum AttachmentIndex 130 { 131 kAttachment0 = 0x00000000, 132 kAttachment1 = 0x00000001, 133 kAttachment2 = 0x00000002, 134 kAttachment3 = 0x00000003, 135 kAttachment4 = 0x00000004, 136 kAttachment5 = 0x00000005, 137 kAttachment6 = 0x00000006, 138 kAttachment7 = 0x00000007, 139 }; 140 enum Format 141 { 142 kIsFloat = 0x00000000, 143 kIsSint = 0x00000008, 144 kIsUint = 0x00000010, 145 }; 146 constexpr size_t kArrayLen = 0x00000018; 147 } // namespace ImageClear_frag 148 149 namespace ImageCopy_frag 150 { 151 enum flags 152 { 153 kSrcIsArray = 0x00000001, 154 }; 155 enum SrcFormat 156 { 157 kSrcIsFloat = 0x00000000, 158 kSrcIsSint = 0x00000002, 159 kSrcIsUint = 0x00000004, 160 }; 161 enum DestFormat 162 { 163 kDestIsFloat = 0x00000000, 164 kDestIsSint = 0x00000008, 165 kDestIsUint = 0x00000010, 166 }; 167 constexpr size_t kArrayLen = 0x00000016; 168 } // namespace ImageCopy_frag 169 170 namespace OverlayCull_comp 171 { 172 enum SubgroupSize 173 { 174 kIs8x4 = 0x00000000, 175 kIs8x8 = 0x00000001, 176 }; 177 enum SubgroupOp 178 { 179 kSupportsBallot = 0x00000000, 180 kSupportsArithmetic = 0x00000002, 181 kSupportsNone = 0x00000004, 182 }; 183 constexpr size_t kArrayLen = 0x00000006; 184 } // namespace OverlayCull_comp 185 186 namespace OverlayDraw_comp 187 { 188 enum SubgroupSize 189 { 190 kIs8x4 = 0x00000000, 191 kIs8x8 = 0x00000001, 192 }; 193 constexpr size_t kArrayLen = 0x00000002; 194 } // namespace OverlayDraw_comp 195 196 } // namespace InternalShader 197 198 class ShaderLibrary final : angle::NonCopyable 199 { 200 public: 201 ShaderLibrary(); 202 ~ShaderLibrary(); 203 204 void destroy(VkDevice device); 205 206 angle::Result getBlitResolve_frag(Context *context, 207 uint32_t shaderFlags, 208 RefCounted<ShaderAndSerial> **shaderOut); 209 angle::Result getBlitResolveStencilNoExport_comp(Context *context, 210 uint32_t shaderFlags, 211 RefCounted<ShaderAndSerial> **shaderOut); 212 angle::Result getBufferUtils_comp(Context *context, 213 uint32_t shaderFlags, 214 RefCounted<ShaderAndSerial> **shaderOut); 215 angle::Result getConvertIndex_comp(Context *context, 216 uint32_t shaderFlags, 217 RefCounted<ShaderAndSerial> **shaderOut); 218 angle::Result getConvertIndexIndirectLineLoop_comp(Context *context, 219 uint32_t shaderFlags, 220 RefCounted<ShaderAndSerial> **shaderOut); 221 angle::Result getConvertIndirectLineLoop_comp(Context *context, 222 uint32_t shaderFlags, 223 RefCounted<ShaderAndSerial> **shaderOut); 224 angle::Result getConvertVertex_comp(Context *context, 225 uint32_t shaderFlags, 226 RefCounted<ShaderAndSerial> **shaderOut); 227 angle::Result getFullScreenQuad_vert(Context *context, 228 uint32_t shaderFlags, 229 RefCounted<ShaderAndSerial> **shaderOut); 230 angle::Result getImageClear_frag(Context *context, 231 uint32_t shaderFlags, 232 RefCounted<ShaderAndSerial> **shaderOut); 233 angle::Result getImageCopy_frag(Context *context, 234 uint32_t shaderFlags, 235 RefCounted<ShaderAndSerial> **shaderOut); 236 angle::Result getOverlayCull_comp(Context *context, 237 uint32_t shaderFlags, 238 RefCounted<ShaderAndSerial> **shaderOut); 239 angle::Result getOverlayDraw_comp(Context *context, 240 uint32_t shaderFlags, 241 RefCounted<ShaderAndSerial> **shaderOut); 242 243 private: 244 RefCounted<ShaderAndSerial> 245 mBlitResolve_frag_shaders[InternalShader::BlitResolve_frag::kArrayLen]; 246 RefCounted<ShaderAndSerial> mBlitResolveStencilNoExport_comp_shaders 247 [InternalShader::BlitResolveStencilNoExport_comp::kArrayLen]; 248 RefCounted<ShaderAndSerial> 249 mBufferUtils_comp_shaders[InternalShader::BufferUtils_comp::kArrayLen]; 250 RefCounted<ShaderAndSerial> 251 mConvertIndex_comp_shaders[InternalShader::ConvertIndex_comp::kArrayLen]; 252 RefCounted<ShaderAndSerial> mConvertIndexIndirectLineLoop_comp_shaders 253 [InternalShader::ConvertIndexIndirectLineLoop_comp::kArrayLen]; 254 RefCounted<ShaderAndSerial> mConvertIndirectLineLoop_comp_shaders 255 [InternalShader::ConvertIndirectLineLoop_comp::kArrayLen]; 256 RefCounted<ShaderAndSerial> 257 mConvertVertex_comp_shaders[InternalShader::ConvertVertex_comp::kArrayLen]; 258 RefCounted<ShaderAndSerial> 259 mFullScreenQuad_vert_shaders[InternalShader::FullScreenQuad_vert::kArrayLen]; 260 RefCounted<ShaderAndSerial> 261 mImageClear_frag_shaders[InternalShader::ImageClear_frag::kArrayLen]; 262 RefCounted<ShaderAndSerial> mImageCopy_frag_shaders[InternalShader::ImageCopy_frag::kArrayLen]; 263 RefCounted<ShaderAndSerial> 264 mOverlayCull_comp_shaders[InternalShader::OverlayCull_comp::kArrayLen]; 265 RefCounted<ShaderAndSerial> 266 mOverlayDraw_comp_shaders[InternalShader::OverlayDraw_comp::kArrayLen]; 267 }; 268 } // namespace vk 269 } // namespace rx 270 271 #endif // LIBANGLE_RENDERER_VULKAN_VK_INTERNAL_SHADERS_AUTOGEN_H_ 272