Skip to content

Commit 144af3f

Browse files
authored
Add WebGPU constants (#2469)
1 parent e9e5e84 commit 144af3f

21 files changed

Lines changed: 685 additions & 3 deletions

baselines/dom.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43057,6 +43057,47 @@ declare namespace CSS {
4305743057
function vw(value: number): CSSUnitValue;
4305843058
}
4305943059

43060+
declare namespace GPUBufferUsage {
43061+
const MAP_READ: 0x0001;
43062+
const MAP_WRITE: 0x0002;
43063+
const COPY_SRC: 0x0004;
43064+
const COPY_DST: 0x0008;
43065+
const INDEX: 0x0010;
43066+
const VERTEX: 0x0020;
43067+
const UNIFORM: 0x0040;
43068+
const STORAGE: 0x0080;
43069+
const INDIRECT: 0x0100;
43070+
const QUERY_RESOLVE: 0x0200;
43071+
}
43072+
43073+
declare namespace GPUColorWrite {
43074+
const RED: 0x1;
43075+
const GREEN: 0x2;
43076+
const BLUE: 0x4;
43077+
const ALPHA: 0x8;
43078+
const ALL: 0xF;
43079+
}
43080+
43081+
declare namespace GPUMapMode {
43082+
const READ: 0x0001;
43083+
const WRITE: 0x0002;
43084+
}
43085+
43086+
declare namespace GPUShaderStage {
43087+
const VERTEX: 0x1;
43088+
const FRAGMENT: 0x2;
43089+
const COMPUTE: 0x4;
43090+
}
43091+
43092+
declare namespace GPUTextureUsage {
43093+
const COPY_SRC: 0x01;
43094+
const COPY_DST: 0x02;
43095+
const TEXTURE_BINDING: 0x04;
43096+
const STORAGE_BINDING: 0x08;
43097+
const RENDER_ATTACHMENT: 0x10;
43098+
const TRANSIENT_ATTACHMENT: 0x20;
43099+
}
43100+
4306043101
declare namespace WebAssembly {
4306143102
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
4306243103
interface CompileError extends Error {

baselines/serviceworker.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12835,6 +12835,47 @@ declare var WritableStreamDefaultWriter: {
1283512835
new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
1283612836
};
1283712837

12838+
declare namespace GPUBufferUsage {
12839+
const MAP_READ: 0x0001;
12840+
const MAP_WRITE: 0x0002;
12841+
const COPY_SRC: 0x0004;
12842+
const COPY_DST: 0x0008;
12843+
const INDEX: 0x0010;
12844+
const VERTEX: 0x0020;
12845+
const UNIFORM: 0x0040;
12846+
const STORAGE: 0x0080;
12847+
const INDIRECT: 0x0100;
12848+
const QUERY_RESOLVE: 0x0200;
12849+
}
12850+
12851+
declare namespace GPUColorWrite {
12852+
const RED: 0x1;
12853+
const GREEN: 0x2;
12854+
const BLUE: 0x4;
12855+
const ALPHA: 0x8;
12856+
const ALL: 0xF;
12857+
}
12858+
12859+
declare namespace GPUMapMode {
12860+
const READ: 0x0001;
12861+
const WRITE: 0x0002;
12862+
}
12863+
12864+
declare namespace GPUShaderStage {
12865+
const VERTEX: 0x1;
12866+
const FRAGMENT: 0x2;
12867+
const COMPUTE: 0x4;
12868+
}
12869+
12870+
declare namespace GPUTextureUsage {
12871+
const COPY_SRC: 0x01;
12872+
const COPY_DST: 0x02;
12873+
const TEXTURE_BINDING: 0x04;
12874+
const STORAGE_BINDING: 0x08;
12875+
const RENDER_ATTACHMENT: 0x10;
12876+
const TRANSIENT_ATTACHMENT: 0x20;
12877+
}
12878+
1283812879
declare namespace WebAssembly {
1283912880
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
1284012881
interface CompileError extends Error {

baselines/sharedworker.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12561,6 +12561,47 @@ declare var XMLHttpRequestUpload: {
1256112561
new(): XMLHttpRequestUpload;
1256212562
};
1256312563

12564+
declare namespace GPUBufferUsage {
12565+
const MAP_READ: 0x0001;
12566+
const MAP_WRITE: 0x0002;
12567+
const COPY_SRC: 0x0004;
12568+
const COPY_DST: 0x0008;
12569+
const INDEX: 0x0010;
12570+
const VERTEX: 0x0020;
12571+
const UNIFORM: 0x0040;
12572+
const STORAGE: 0x0080;
12573+
const INDIRECT: 0x0100;
12574+
const QUERY_RESOLVE: 0x0200;
12575+
}
12576+
12577+
declare namespace GPUColorWrite {
12578+
const RED: 0x1;
12579+
const GREEN: 0x2;
12580+
const BLUE: 0x4;
12581+
const ALPHA: 0x8;
12582+
const ALL: 0xF;
12583+
}
12584+
12585+
declare namespace GPUMapMode {
12586+
const READ: 0x0001;
12587+
const WRITE: 0x0002;
12588+
}
12589+
12590+
declare namespace GPUShaderStage {
12591+
const VERTEX: 0x1;
12592+
const FRAGMENT: 0x2;
12593+
const COMPUTE: 0x4;
12594+
}
12595+
12596+
declare namespace GPUTextureUsage {
12597+
const COPY_SRC: 0x01;
12598+
const COPY_DST: 0x02;
12599+
const TEXTURE_BINDING: 0x04;
12600+
const STORAGE_BINDING: 0x08;
12601+
const RENDER_ATTACHMENT: 0x10;
12602+
const TRANSIENT_ATTACHMENT: 0x20;
12603+
}
12604+
1256412605
declare namespace WebAssembly {
1256512606
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
1256612607
interface CompileError extends Error {

baselines/ts5.5/dom.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43031,6 +43031,47 @@ declare namespace CSS {
4303143031
function vw(value: number): CSSUnitValue;
4303243032
}
4303343033

43034+
declare namespace GPUBufferUsage {
43035+
const MAP_READ: 0x0001;
43036+
const MAP_WRITE: 0x0002;
43037+
const COPY_SRC: 0x0004;
43038+
const COPY_DST: 0x0008;
43039+
const INDEX: 0x0010;
43040+
const VERTEX: 0x0020;
43041+
const UNIFORM: 0x0040;
43042+
const STORAGE: 0x0080;
43043+
const INDIRECT: 0x0100;
43044+
const QUERY_RESOLVE: 0x0200;
43045+
}
43046+
43047+
declare namespace GPUColorWrite {
43048+
const RED: 0x1;
43049+
const GREEN: 0x2;
43050+
const BLUE: 0x4;
43051+
const ALPHA: 0x8;
43052+
const ALL: 0xF;
43053+
}
43054+
43055+
declare namespace GPUMapMode {
43056+
const READ: 0x0001;
43057+
const WRITE: 0x0002;
43058+
}
43059+
43060+
declare namespace GPUShaderStage {
43061+
const VERTEX: 0x1;
43062+
const FRAGMENT: 0x2;
43063+
const COMPUTE: 0x4;
43064+
}
43065+
43066+
declare namespace GPUTextureUsage {
43067+
const COPY_SRC: 0x01;
43068+
const COPY_DST: 0x02;
43069+
const TEXTURE_BINDING: 0x04;
43070+
const STORAGE_BINDING: 0x08;
43071+
const RENDER_ATTACHMENT: 0x10;
43072+
const TRANSIENT_ATTACHMENT: 0x20;
43073+
}
43074+
4303443075
declare namespace WebAssembly {
4303543076
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
4303643077
interface CompileError extends Error {

baselines/ts5.5/serviceworker.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12832,6 +12832,47 @@ declare var WritableStreamDefaultWriter: {
1283212832
new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
1283312833
};
1283412834

12835+
declare namespace GPUBufferUsage {
12836+
const MAP_READ: 0x0001;
12837+
const MAP_WRITE: 0x0002;
12838+
const COPY_SRC: 0x0004;
12839+
const COPY_DST: 0x0008;
12840+
const INDEX: 0x0010;
12841+
const VERTEX: 0x0020;
12842+
const UNIFORM: 0x0040;
12843+
const STORAGE: 0x0080;
12844+
const INDIRECT: 0x0100;
12845+
const QUERY_RESOLVE: 0x0200;
12846+
}
12847+
12848+
declare namespace GPUColorWrite {
12849+
const RED: 0x1;
12850+
const GREEN: 0x2;
12851+
const BLUE: 0x4;
12852+
const ALPHA: 0x8;
12853+
const ALL: 0xF;
12854+
}
12855+
12856+
declare namespace GPUMapMode {
12857+
const READ: 0x0001;
12858+
const WRITE: 0x0002;
12859+
}
12860+
12861+
declare namespace GPUShaderStage {
12862+
const VERTEX: 0x1;
12863+
const FRAGMENT: 0x2;
12864+
const COMPUTE: 0x4;
12865+
}
12866+
12867+
declare namespace GPUTextureUsage {
12868+
const COPY_SRC: 0x01;
12869+
const COPY_DST: 0x02;
12870+
const TEXTURE_BINDING: 0x04;
12871+
const STORAGE_BINDING: 0x08;
12872+
const RENDER_ATTACHMENT: 0x10;
12873+
const TRANSIENT_ATTACHMENT: 0x20;
12874+
}
12875+
1283512876
declare namespace WebAssembly {
1283612877
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
1283712878
interface CompileError extends Error {

baselines/ts5.5/sharedworker.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12558,6 +12558,47 @@ declare var XMLHttpRequestUpload: {
1255812558
new(): XMLHttpRequestUpload;
1255912559
};
1256012560

12561+
declare namespace GPUBufferUsage {
12562+
const MAP_READ: 0x0001;
12563+
const MAP_WRITE: 0x0002;
12564+
const COPY_SRC: 0x0004;
12565+
const COPY_DST: 0x0008;
12566+
const INDEX: 0x0010;
12567+
const VERTEX: 0x0020;
12568+
const UNIFORM: 0x0040;
12569+
const STORAGE: 0x0080;
12570+
const INDIRECT: 0x0100;
12571+
const QUERY_RESOLVE: 0x0200;
12572+
}
12573+
12574+
declare namespace GPUColorWrite {
12575+
const RED: 0x1;
12576+
const GREEN: 0x2;
12577+
const BLUE: 0x4;
12578+
const ALPHA: 0x8;
12579+
const ALL: 0xF;
12580+
}
12581+
12582+
declare namespace GPUMapMode {
12583+
const READ: 0x0001;
12584+
const WRITE: 0x0002;
12585+
}
12586+
12587+
declare namespace GPUShaderStage {
12588+
const VERTEX: 0x1;
12589+
const FRAGMENT: 0x2;
12590+
const COMPUTE: 0x4;
12591+
}
12592+
12593+
declare namespace GPUTextureUsage {
12594+
const COPY_SRC: 0x01;
12595+
const COPY_DST: 0x02;
12596+
const TEXTURE_BINDING: 0x04;
12597+
const STORAGE_BINDING: 0x08;
12598+
const RENDER_ATTACHMENT: 0x10;
12599+
const TRANSIENT_ATTACHMENT: 0x20;
12600+
}
12601+
1256112602
declare namespace WebAssembly {
1256212603
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
1256312604
interface CompileError extends Error {

baselines/ts5.5/webworker.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14642,6 +14642,47 @@ declare var XMLHttpRequestUpload: {
1464214642
new(): XMLHttpRequestUpload;
1464314643
};
1464414644

14645+
declare namespace GPUBufferUsage {
14646+
const MAP_READ: 0x0001;
14647+
const MAP_WRITE: 0x0002;
14648+
const COPY_SRC: 0x0004;
14649+
const COPY_DST: 0x0008;
14650+
const INDEX: 0x0010;
14651+
const VERTEX: 0x0020;
14652+
const UNIFORM: 0x0040;
14653+
const STORAGE: 0x0080;
14654+
const INDIRECT: 0x0100;
14655+
const QUERY_RESOLVE: 0x0200;
14656+
}
14657+
14658+
declare namespace GPUColorWrite {
14659+
const RED: 0x1;
14660+
const GREEN: 0x2;
14661+
const BLUE: 0x4;
14662+
const ALPHA: 0x8;
14663+
const ALL: 0xF;
14664+
}
14665+
14666+
declare namespace GPUMapMode {
14667+
const READ: 0x0001;
14668+
const WRITE: 0x0002;
14669+
}
14670+
14671+
declare namespace GPUShaderStage {
14672+
const VERTEX: 0x1;
14673+
const FRAGMENT: 0x2;
14674+
const COMPUTE: 0x4;
14675+
}
14676+
14677+
declare namespace GPUTextureUsage {
14678+
const COPY_SRC: 0x01;
14679+
const COPY_DST: 0x02;
14680+
const TEXTURE_BINDING: 0x04;
14681+
const STORAGE_BINDING: 0x08;
14682+
const RENDER_ATTACHMENT: 0x10;
14683+
const TRANSIENT_ATTACHMENT: 0x20;
14684+
}
14685+
1464514686
declare namespace WebAssembly {
1464614687
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
1464714688
interface CompileError extends Error {

baselines/ts5.6/dom.generated.d.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43054,6 +43054,47 @@ declare namespace CSS {
4305443054
function vw(value: number): CSSUnitValue;
4305543055
}
4305643056

43057+
declare namespace GPUBufferUsage {
43058+
const MAP_READ: 0x0001;
43059+
const MAP_WRITE: 0x0002;
43060+
const COPY_SRC: 0x0004;
43061+
const COPY_DST: 0x0008;
43062+
const INDEX: 0x0010;
43063+
const VERTEX: 0x0020;
43064+
const UNIFORM: 0x0040;
43065+
const STORAGE: 0x0080;
43066+
const INDIRECT: 0x0100;
43067+
const QUERY_RESOLVE: 0x0200;
43068+
}
43069+
43070+
declare namespace GPUColorWrite {
43071+
const RED: 0x1;
43072+
const GREEN: 0x2;
43073+
const BLUE: 0x4;
43074+
const ALPHA: 0x8;
43075+
const ALL: 0xF;
43076+
}
43077+
43078+
declare namespace GPUMapMode {
43079+
const READ: 0x0001;
43080+
const WRITE: 0x0002;
43081+
}
43082+
43083+
declare namespace GPUShaderStage {
43084+
const VERTEX: 0x1;
43085+
const FRAGMENT: 0x2;
43086+
const COMPUTE: 0x4;
43087+
}
43088+
43089+
declare namespace GPUTextureUsage {
43090+
const COPY_SRC: 0x01;
43091+
const COPY_DST: 0x02;
43092+
const TEXTURE_BINDING: 0x04;
43093+
const STORAGE_BINDING: 0x08;
43094+
const RENDER_ATTACHMENT: 0x10;
43095+
const TRANSIENT_ATTACHMENT: 0x20;
43096+
}
43097+
4305743098
declare namespace WebAssembly {
4305843099
/** The **`WebAssembly.CompileError`** object indicates an error during WebAssembly decoding or validation. */
4305943100
interface CompileError extends Error {

0 commit comments

Comments
 (0)