webgpuConstants.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. /** @internal */
  2. // eslint-disable-next-line import/export
  3. export var PowerPreference;
  4. (function (PowerPreference) {
  5. PowerPreference["LowPower"] = "low-power";
  6. PowerPreference["HighPerformance"] = "high-performance";
  7. })(PowerPreference || (PowerPreference = {}));
  8. /** @internal */
  9. export var FeatureName;
  10. (function (FeatureName) {
  11. FeatureName["DepthClipControl"] = "depth-clip-control";
  12. FeatureName["Depth32FloatStencil8"] = "depth32float-stencil8";
  13. FeatureName["TextureCompressionBC"] = "texture-compression-bc";
  14. FeatureName["TextureCompressionETC2"] = "texture-compression-etc2";
  15. FeatureName["TextureCompressionASTC"] = "texture-compression-astc";
  16. FeatureName["TimestampQuery"] = "timestamp-query";
  17. FeatureName["IndirectFirstInstance"] = "indirect-first-instance";
  18. FeatureName["ShaderF16"] = "shader-f16";
  19. FeatureName["RG11B10UFloatRenderable"] = "rg11b10ufloat-renderable";
  20. FeatureName["BGRA8UnormStorage"] = "bgra8unorm-storage";
  21. FeatureName["Float32Filterable"] = "float32-filterable";
  22. })(FeatureName || (FeatureName = {}));
  23. /** @internal */
  24. export var BufferMapState;
  25. (function (BufferMapState) {
  26. BufferMapState["Unmapped"] = "unmapped";
  27. BufferMapState["Pending"] = "pending";
  28. BufferMapState["Mapped"] = "mapped";
  29. })(BufferMapState || (BufferMapState = {}));
  30. /** @internal */
  31. export var BufferUsage;
  32. (function (BufferUsage) {
  33. BufferUsage[BufferUsage["MapRead"] = 1] = "MapRead";
  34. BufferUsage[BufferUsage["MapWrite"] = 2] = "MapWrite";
  35. BufferUsage[BufferUsage["CopySrc"] = 4] = "CopySrc";
  36. BufferUsage[BufferUsage["CopyDst"] = 8] = "CopyDst";
  37. BufferUsage[BufferUsage["Index"] = 16] = "Index";
  38. BufferUsage[BufferUsage["Vertex"] = 32] = "Vertex";
  39. BufferUsage[BufferUsage["Uniform"] = 64] = "Uniform";
  40. BufferUsage[BufferUsage["Storage"] = 128] = "Storage";
  41. BufferUsage[BufferUsage["Indirect"] = 256] = "Indirect";
  42. BufferUsage[BufferUsage["QueryResolve"] = 512] = "QueryResolve";
  43. })(BufferUsage || (BufferUsage = {}));
  44. /** @internal */
  45. export var MapMode;
  46. (function (MapMode) {
  47. MapMode[MapMode["Read"] = 1] = "Read";
  48. MapMode[MapMode["Write"] = 2] = "Write";
  49. })(MapMode || (MapMode = {}));
  50. /** @internal */
  51. export var TextureDimension;
  52. (function (TextureDimension) {
  53. TextureDimension["E1d"] = "1d";
  54. TextureDimension["E2d"] = "2d";
  55. TextureDimension["E3d"] = "3d";
  56. })(TextureDimension || (TextureDimension = {}));
  57. /** @internal */
  58. export var TextureUsage;
  59. (function (TextureUsage) {
  60. TextureUsage[TextureUsage["CopySrc"] = 1] = "CopySrc";
  61. TextureUsage[TextureUsage["CopyDst"] = 2] = "CopyDst";
  62. TextureUsage[TextureUsage["TextureBinding"] = 4] = "TextureBinding";
  63. TextureUsage[TextureUsage["StorageBinding"] = 8] = "StorageBinding";
  64. TextureUsage[TextureUsage["RenderAttachment"] = 16] = "RenderAttachment";
  65. })(TextureUsage || (TextureUsage = {}));
  66. /** @internal */
  67. export var TextureViewDimension;
  68. (function (TextureViewDimension) {
  69. TextureViewDimension["E1d"] = "1d";
  70. TextureViewDimension["E2d"] = "2d";
  71. TextureViewDimension["E2dArray"] = "2d-array";
  72. TextureViewDimension["Cube"] = "cube";
  73. TextureViewDimension["CubeArray"] = "cube-array";
  74. TextureViewDimension["E3d"] = "3d";
  75. })(TextureViewDimension || (TextureViewDimension = {}));
  76. /** @internal */
  77. export var TextureAspect;
  78. (function (TextureAspect) {
  79. TextureAspect["All"] = "all";
  80. TextureAspect["StencilOnly"] = "stencil-only";
  81. TextureAspect["DepthOnly"] = "depth-only";
  82. })(TextureAspect || (TextureAspect = {}));
  83. /**
  84. * Comments taken from https://github.com/gfx-rs/wgpu/blob/master/wgpu-types/src/lib.rs
  85. * @internal
  86. */
  87. export var TextureFormat;
  88. (function (TextureFormat) {
  89. // 8-bit formats
  90. TextureFormat["R8Unorm"] = "r8unorm";
  91. TextureFormat["R8Snorm"] = "r8snorm";
  92. TextureFormat["R8Uint"] = "r8uint";
  93. TextureFormat["R8Sint"] = "r8sint";
  94. // 16-bit formats
  95. TextureFormat["R16Uint"] = "r16uint";
  96. TextureFormat["R16Sint"] = "r16sint";
  97. TextureFormat["R16Float"] = "r16float";
  98. TextureFormat["RG8Unorm"] = "rg8unorm";
  99. TextureFormat["RG8Snorm"] = "rg8snorm";
  100. TextureFormat["RG8Uint"] = "rg8uint";
  101. TextureFormat["RG8Sint"] = "rg8sint";
  102. // 32-bit formats
  103. TextureFormat["R32Uint"] = "r32uint";
  104. TextureFormat["R32Sint"] = "r32sint";
  105. TextureFormat["R32Float"] = "r32float";
  106. TextureFormat["RG16Uint"] = "rg16uint";
  107. TextureFormat["RG16Sint"] = "rg16sint";
  108. TextureFormat["RG16Float"] = "rg16float";
  109. TextureFormat["RGBA8Unorm"] = "rgba8unorm";
  110. TextureFormat["RGBA8UnormSRGB"] = "rgba8unorm-srgb";
  111. TextureFormat["RGBA8Snorm"] = "rgba8snorm";
  112. TextureFormat["RGBA8Uint"] = "rgba8uint";
  113. TextureFormat["RGBA8Sint"] = "rgba8sint";
  114. TextureFormat["BGRA8Unorm"] = "bgra8unorm";
  115. TextureFormat["BGRA8UnormSRGB"] = "bgra8unorm-srgb";
  116. // Packed 32-bit formats
  117. TextureFormat["RGB9E5UFloat"] = "rgb9e5ufloat";
  118. TextureFormat["RGB10A2UINT"] = "rgb10a2uint";
  119. TextureFormat["RGB10A2Unorm"] = "rgb10a2unorm";
  120. TextureFormat["RG11B10UFloat"] = "rg11b10ufloat";
  121. // 64-bit formats
  122. TextureFormat["RG32Uint"] = "rg32uint";
  123. TextureFormat["RG32Sint"] = "rg32sint";
  124. TextureFormat["RG32Float"] = "rg32float";
  125. TextureFormat["RGBA16Uint"] = "rgba16uint";
  126. TextureFormat["RGBA16Sint"] = "rgba16sint";
  127. TextureFormat["RGBA16Float"] = "rgba16float";
  128. // 128-bit formats
  129. TextureFormat["RGBA32Uint"] = "rgba32uint";
  130. TextureFormat["RGBA32Sint"] = "rgba32sint";
  131. TextureFormat["RGBA32Float"] = "rgba32float";
  132. // Depth and stencil formats
  133. TextureFormat["Stencil8"] = "stencil8";
  134. TextureFormat["Depth16Unorm"] = "depth16unorm";
  135. TextureFormat["Depth24Plus"] = "depth24plus";
  136. TextureFormat["Depth24PlusStencil8"] = "depth24plus-stencil8";
  137. TextureFormat["Depth32Float"] = "depth32float";
  138. // BC compressed formats usable if "texture-compression-bc" is both
  139. // supported by the device/user agent and enabled in requestDevice.
  140. TextureFormat["BC1RGBAUnorm"] = "bc1-rgba-unorm";
  141. TextureFormat["BC1RGBAUnormSRGB"] = "bc1-rgba-unorm-srgb";
  142. TextureFormat["BC2RGBAUnorm"] = "bc2-rgba-unorm";
  143. TextureFormat["BC2RGBAUnormSRGB"] = "bc2-rgba-unorm-srgb";
  144. TextureFormat["BC3RGBAUnorm"] = "bc3-rgba-unorm";
  145. TextureFormat["BC3RGBAUnormSRGB"] = "bc3-rgba-unorm-srgb";
  146. TextureFormat["BC4RUnorm"] = "bc4-r-unorm";
  147. TextureFormat["BC4RSnorm"] = "bc4-r-snorm";
  148. TextureFormat["BC5RGUnorm"] = "bc5-rg-unorm";
  149. TextureFormat["BC5RGSnorm"] = "bc5-rg-snorm";
  150. TextureFormat["BC6HRGBUFloat"] = "bc6h-rgb-ufloat";
  151. TextureFormat["BC6HRGBFloat"] = "bc6h-rgb-float";
  152. TextureFormat["BC7RGBAUnorm"] = "bc7-rgba-unorm";
  153. TextureFormat["BC7RGBAUnormSRGB"] = "bc7-rgba-unorm-srgb";
  154. // ETC2 compressed formats usable if "texture-compression-etc2" is both
  155. // supported by the device/user agent and enabled in requestDevice.
  156. TextureFormat["ETC2RGB8Unorm"] = "etc2-rgb8unorm";
  157. TextureFormat["ETC2RGB8UnormSRGB"] = "etc2-rgb8unorm-srgb";
  158. TextureFormat["ETC2RGB8A1Unorm"] = "etc2-rgb8a1unorm";
  159. TextureFormat["ETC2RGB8A1UnormSRGB"] = "etc2-rgb8a1unorm-srgb";
  160. TextureFormat["ETC2RGBA8Unorm"] = "etc2-rgba8unorm";
  161. TextureFormat["ETC2RGBA8UnormSRGB"] = "etc2-rgba8unorm-srgb";
  162. TextureFormat["EACR11Unorm"] = "eac-r11unorm";
  163. TextureFormat["EACR11Snorm"] = "eac-r11snorm";
  164. TextureFormat["EACRG11Unorm"] = "eac-rg11unorm";
  165. TextureFormat["EACRG11Snorm"] = "eac-rg11snorm";
  166. // ASTC compressed formats usable if "texture-compression-astc" is both
  167. // supported by the device/user agent and enabled in requestDevice.
  168. TextureFormat["ASTC4x4Unorm"] = "astc-4x4-unorm";
  169. TextureFormat["ASTC4x4UnormSRGB"] = "astc-4x4-unorm-srgb";
  170. TextureFormat["ASTC5x4Unorm"] = "astc-5x4-unorm";
  171. TextureFormat["ASTC5x4UnormSRGB"] = "astc-5x4-unorm-srgb";
  172. TextureFormat["ASTC5x5Unorm"] = "astc-5x5-unorm";
  173. TextureFormat["ASTC5x5UnormSRGB"] = "astc-5x5-unorm-srgb";
  174. TextureFormat["ASTC6x5Unorm"] = "astc-6x5-unorm";
  175. TextureFormat["ASTC6x5UnormSRGB"] = "astc-6x5-unorm-srgb";
  176. TextureFormat["ASTC6x6Unorm"] = "astc-6x6-unorm";
  177. TextureFormat["ASTC6x6UnormSRGB"] = "astc-6x6-unorm-srgb";
  178. TextureFormat["ASTC8x5Unorm"] = "astc-8x5-unorm";
  179. TextureFormat["ASTC8x5UnormSRGB"] = "astc-8x5-unorm-srgb";
  180. TextureFormat["ASTC8x6Unorm"] = "astc-8x6-unorm";
  181. TextureFormat["ASTC8x6UnormSRGB"] = "astc-8x6-unorm-srgb";
  182. TextureFormat["ASTC8x8Unorm"] = "astc-8x8-unorm";
  183. TextureFormat["ASTC8x8UnormSRGB"] = "astc-8x8-unorm-srgb";
  184. TextureFormat["ASTC10x5Unorm"] = "astc-10x5-unorm";
  185. TextureFormat["ASTC10x5UnormSRGB"] = "astc-10x5-unorm-srgb";
  186. TextureFormat["ASTC10x6Unorm"] = "astc-10x6-unorm";
  187. TextureFormat["ASTC10x6UnormSRGB"] = "astc-10x6-unorm-srgb";
  188. TextureFormat["ASTC10x8Unorm"] = "astc-10x8-unorm";
  189. TextureFormat["ASTC10x8UnormSRGB"] = "astc-10x8-unorm-srgb";
  190. TextureFormat["ASTC10x10Unorm"] = "astc-10x10-unorm";
  191. TextureFormat["ASTC10x10UnormSRGB"] = "astc-10x10-unorm-srgb";
  192. TextureFormat["ASTC12x10Unorm"] = "astc-12x10-unorm";
  193. TextureFormat["ASTC12x10UnormSRGB"] = "astc-12x10-unorm-srgb";
  194. TextureFormat["ASTC12x12Unorm"] = "astc-12x12-unorm";
  195. TextureFormat["ASTC12x12UnormSRGB"] = "astc-12x12-unorm-srgb";
  196. // "depth32float-stencil8" feature
  197. TextureFormat["Depth32FloatStencil8"] = "depth32float-stencil8";
  198. })(TextureFormat || (TextureFormat = {}));
  199. /** @internal */
  200. export var AddressMode;
  201. (function (AddressMode) {
  202. AddressMode["ClampToEdge"] = "clamp-to-edge";
  203. AddressMode["Repeat"] = "repeat";
  204. AddressMode["MirrorRepeat"] = "mirror-repeat";
  205. })(AddressMode || (AddressMode = {}));
  206. /** @internal */
  207. export var FilterMode;
  208. (function (FilterMode) {
  209. FilterMode["Nearest"] = "nearest";
  210. FilterMode["Linear"] = "linear";
  211. })(FilterMode || (FilterMode = {}));
  212. /** @internal */
  213. export var MipmapFilterMode;
  214. (function (MipmapFilterMode) {
  215. MipmapFilterMode["Nearest"] = "nearest";
  216. MipmapFilterMode["Linear"] = "linear";
  217. })(MipmapFilterMode || (MipmapFilterMode = {}));
  218. /** @internal */
  219. export var CompareFunction;
  220. (function (CompareFunction) {
  221. CompareFunction["Never"] = "never";
  222. CompareFunction["Less"] = "less";
  223. CompareFunction["Equal"] = "equal";
  224. CompareFunction["LessEqual"] = "less-equal";
  225. CompareFunction["Greater"] = "greater";
  226. CompareFunction["NotEqual"] = "not-equal";
  227. CompareFunction["GreaterEqual"] = "greater-equal";
  228. CompareFunction["Always"] = "always";
  229. })(CompareFunction || (CompareFunction = {}));
  230. /** @internal */
  231. export var ShaderStage;
  232. (function (ShaderStage) {
  233. ShaderStage[ShaderStage["Vertex"] = 1] = "Vertex";
  234. ShaderStage[ShaderStage["Fragment"] = 2] = "Fragment";
  235. ShaderStage[ShaderStage["Compute"] = 4] = "Compute";
  236. })(ShaderStage || (ShaderStage = {}));
  237. /** @internal */
  238. export var BufferBindingType;
  239. (function (BufferBindingType) {
  240. BufferBindingType["Uniform"] = "uniform";
  241. BufferBindingType["Storage"] = "storage";
  242. BufferBindingType["ReadOnlyStorage"] = "read-only-storage";
  243. })(BufferBindingType || (BufferBindingType = {}));
  244. /** @internal */
  245. export var SamplerBindingType;
  246. (function (SamplerBindingType) {
  247. SamplerBindingType["Filtering"] = "filtering";
  248. SamplerBindingType["NonFiltering"] = "non-filtering";
  249. SamplerBindingType["Comparison"] = "comparison";
  250. })(SamplerBindingType || (SamplerBindingType = {}));
  251. /** @internal */
  252. export var TextureSampleType;
  253. (function (TextureSampleType) {
  254. TextureSampleType["Float"] = "float";
  255. TextureSampleType["UnfilterableFloat"] = "unfilterable-float";
  256. TextureSampleType["Depth"] = "depth";
  257. TextureSampleType["Sint"] = "sint";
  258. TextureSampleType["Uint"] = "uint";
  259. })(TextureSampleType || (TextureSampleType = {}));
  260. /** @internal */
  261. export var StorageTextureAccess;
  262. (function (StorageTextureAccess) {
  263. StorageTextureAccess["WriteOnly"] = "write-only";
  264. StorageTextureAccess["ReadOnly"] = "read-only";
  265. StorageTextureAccess["ReadWrite"] = "read-write";
  266. })(StorageTextureAccess || (StorageTextureAccess = {}));
  267. /** @internal */
  268. export var CompilationMessageType;
  269. (function (CompilationMessageType) {
  270. CompilationMessageType["Error"] = "error";
  271. CompilationMessageType["Warning"] = "warning";
  272. CompilationMessageType["Info"] = "info";
  273. })(CompilationMessageType || (CompilationMessageType = {}));
  274. /** @internal */
  275. export var PipelineErrorReason;
  276. (function (PipelineErrorReason) {
  277. PipelineErrorReason["Validation"] = "validation";
  278. PipelineErrorReason["Internal"] = "internal";
  279. })(PipelineErrorReason || (PipelineErrorReason = {}));
  280. /** @internal */
  281. export var AutoLayoutMode;
  282. (function (AutoLayoutMode) {
  283. AutoLayoutMode["Auto"] = "auto";
  284. })(AutoLayoutMode || (AutoLayoutMode = {}));
  285. /** @internal */
  286. export var PrimitiveTopology;
  287. (function (PrimitiveTopology) {
  288. PrimitiveTopology["PointList"] = "point-list";
  289. PrimitiveTopology["LineList"] = "line-list";
  290. PrimitiveTopology["LineStrip"] = "line-strip";
  291. PrimitiveTopology["TriangleList"] = "triangle-list";
  292. PrimitiveTopology["TriangleStrip"] = "triangle-strip";
  293. })(PrimitiveTopology || (PrimitiveTopology = {}));
  294. /** @internal */
  295. export var FrontFace;
  296. (function (FrontFace) {
  297. FrontFace["CCW"] = "ccw";
  298. FrontFace["CW"] = "cw";
  299. })(FrontFace || (FrontFace = {}));
  300. /** @internal */
  301. export var CullMode;
  302. (function (CullMode) {
  303. CullMode["None"] = "none";
  304. CullMode["Front"] = "front";
  305. CullMode["Back"] = "back";
  306. })(CullMode || (CullMode = {}));
  307. /** @internal */
  308. export var ColorWrite;
  309. (function (ColorWrite) {
  310. ColorWrite[ColorWrite["Red"] = 1] = "Red";
  311. ColorWrite[ColorWrite["Green"] = 2] = "Green";
  312. ColorWrite[ColorWrite["Blue"] = 4] = "Blue";
  313. ColorWrite[ColorWrite["Alpha"] = 8] = "Alpha";
  314. ColorWrite[ColorWrite["All"] = 15] = "All";
  315. })(ColorWrite || (ColorWrite = {}));
  316. /** @internal */
  317. export var BlendFactor;
  318. (function (BlendFactor) {
  319. BlendFactor["Zero"] = "zero";
  320. BlendFactor["One"] = "one";
  321. BlendFactor["Src"] = "src";
  322. BlendFactor["OneMinusSrc"] = "one-minus-src";
  323. BlendFactor["SrcAlpha"] = "src-alpha";
  324. BlendFactor["OneMinusSrcAlpha"] = "one-minus-src-alpha";
  325. BlendFactor["Dst"] = "dst";
  326. BlendFactor["OneMinusDst"] = "one-minus-dst";
  327. BlendFactor["DstAlpha"] = "dst-alpha";
  328. BlendFactor["OneMinusDstAlpha"] = "one-minus-dst-alpha";
  329. BlendFactor["SrcAlphaSaturated"] = "src-alpha-saturated";
  330. BlendFactor["Constant"] = "constant";
  331. BlendFactor["OneMinusConstant"] = "one-minus-constant";
  332. })(BlendFactor || (BlendFactor = {}));
  333. /** @internal */
  334. export var BlendOperation;
  335. (function (BlendOperation) {
  336. BlendOperation["Add"] = "add";
  337. BlendOperation["Subtract"] = "subtract";
  338. BlendOperation["ReverseSubtract"] = "reverse-subtract";
  339. BlendOperation["Min"] = "min";
  340. BlendOperation["Max"] = "max";
  341. })(BlendOperation || (BlendOperation = {}));
  342. /** @internal */
  343. export var StencilOperation;
  344. (function (StencilOperation) {
  345. StencilOperation["Keep"] = "keep";
  346. StencilOperation["Zero"] = "zero";
  347. StencilOperation["Replace"] = "replace";
  348. StencilOperation["Invert"] = "invert";
  349. StencilOperation["IncrementClamp"] = "increment-clamp";
  350. StencilOperation["DecrementClamp"] = "decrement-clamp";
  351. StencilOperation["IncrementWrap"] = "increment-wrap";
  352. StencilOperation["DecrementWrap"] = "decrement-wrap";
  353. })(StencilOperation || (StencilOperation = {}));
  354. /** @internal */
  355. export var IndexFormat;
  356. (function (IndexFormat) {
  357. IndexFormat["Uint16"] = "uint16";
  358. IndexFormat["Uint32"] = "uint32";
  359. })(IndexFormat || (IndexFormat = {}));
  360. /** @internal */
  361. export var VertexFormat;
  362. (function (VertexFormat) {
  363. VertexFormat["Uint8x2"] = "uint8x2";
  364. VertexFormat["Uint8x4"] = "uint8x4";
  365. VertexFormat["Sint8x2"] = "sint8x2";
  366. VertexFormat["Sint8x4"] = "sint8x4";
  367. VertexFormat["Unorm8x2"] = "unorm8x2";
  368. VertexFormat["Unorm8x4"] = "unorm8x4";
  369. VertexFormat["Snorm8x2"] = "snorm8x2";
  370. VertexFormat["Snorm8x4"] = "snorm8x4";
  371. VertexFormat["Uint16x2"] = "uint16x2";
  372. VertexFormat["Uint16x4"] = "uint16x4";
  373. VertexFormat["Sint16x2"] = "sint16x2";
  374. VertexFormat["Sint16x4"] = "sint16x4";
  375. VertexFormat["Unorm16x2"] = "unorm16x2";
  376. VertexFormat["Unorm16x4"] = "unorm16x4";
  377. VertexFormat["Snorm16x2"] = "snorm16x2";
  378. VertexFormat["Snorm16x4"] = "snorm16x4";
  379. VertexFormat["Float16x2"] = "float16x2";
  380. VertexFormat["Float16x4"] = "float16x4";
  381. VertexFormat["Float32"] = "float32";
  382. VertexFormat["Float32x2"] = "float32x2";
  383. VertexFormat["Float32x3"] = "float32x3";
  384. VertexFormat["Float32x4"] = "float32x4";
  385. VertexFormat["Uint32"] = "uint32";
  386. VertexFormat["Uint32x2"] = "uint32x2";
  387. VertexFormat["Uint32x3"] = "uint32x3";
  388. VertexFormat["Uint32x4"] = "uint32x4";
  389. VertexFormat["Sint32"] = "sint32";
  390. VertexFormat["Sint32x2"] = "sint32x2";
  391. VertexFormat["Sint32x3"] = "sint32x3";
  392. VertexFormat["Sint32x4"] = "sint32x4";
  393. VertexFormat["UNORM10x10x10x2"] = "unorm10-10-10-2";
  394. })(VertexFormat || (VertexFormat = {}));
  395. /** @internal */
  396. export var VertexStepMode;
  397. (function (VertexStepMode) {
  398. VertexStepMode["Vertex"] = "vertex";
  399. VertexStepMode["Instance"] = "instance";
  400. })(VertexStepMode || (VertexStepMode = {}));
  401. /** @internal */
  402. export var ComputePassTimestampLocation;
  403. (function (ComputePassTimestampLocation) {
  404. ComputePassTimestampLocation["Beginning"] = "beginning";
  405. ComputePassTimestampLocation["End"] = "end";
  406. })(ComputePassTimestampLocation || (ComputePassTimestampLocation = {}));
  407. /** @internal */
  408. export var RenderPassTimestampLocation;
  409. (function (RenderPassTimestampLocation) {
  410. RenderPassTimestampLocation["Beginning"] = "beginning";
  411. RenderPassTimestampLocation["End"] = "end";
  412. })(RenderPassTimestampLocation || (RenderPassTimestampLocation = {}));
  413. /** @internal */
  414. export var LoadOp;
  415. (function (LoadOp) {
  416. LoadOp["Load"] = "load";
  417. LoadOp["Clear"] = "clear";
  418. })(LoadOp || (LoadOp = {}));
  419. /** @internal */
  420. export var StoreOp;
  421. (function (StoreOp) {
  422. StoreOp["Store"] = "store";
  423. StoreOp["Discard"] = "discard";
  424. })(StoreOp || (StoreOp = {}));
  425. /** @internal */
  426. export var QueryType;
  427. (function (QueryType) {
  428. QueryType["Occlusion"] = "occlusion";
  429. QueryType["Timestamp"] = "timestamp";
  430. })(QueryType || (QueryType = {}));
  431. /** @internal */
  432. export var CanvasAlphaMode;
  433. (function (CanvasAlphaMode) {
  434. CanvasAlphaMode["Opaque"] = "opaque";
  435. CanvasAlphaMode["Premultiplied"] = "premultiplied";
  436. })(CanvasAlphaMode || (CanvasAlphaMode = {}));
  437. /** @internal */
  438. export var DeviceLostReason;
  439. (function (DeviceLostReason) {
  440. DeviceLostReason["Unknown"] = "unknown";
  441. DeviceLostReason["Destroyed"] = "destroyed";
  442. })(DeviceLostReason || (DeviceLostReason = {}));
  443. /** @internal */
  444. export var ErrorFilter;
  445. (function (ErrorFilter) {
  446. ErrorFilter["Validation"] = "validation";
  447. ErrorFilter["OutOfMemory"] = "out-of-memory";
  448. ErrorFilter["Internal"] = "internal";
  449. })(ErrorFilter || (ErrorFilter = {}));
  450. //# sourceMappingURL=webgpuConstants.js.map