Skip to content

Commit

Permalink
Roll @webgpu/types to 0.1.42 (gpuweb#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x authored May 30, 2024
1 parent 0027988 commit dcbef9c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/serve-index": "^1.9.3",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@webgpu/types": "^0.1.40",
"@webgpu/types": "^0.1.42",
"ansi-colors": "4.1.3",
"babel-plugin-add-header-comment": "^1.0.3",
"babel-plugin-const-enum": "^1.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class F extends ValidationTest {
createBindGroupLayoutForTest(
textureUsage: TextureBindingType,
sampleType: 'unfilterable-float' | 'depth' | 'uint',
visibility: GPUShaderStage['FRAGMENT'] | GPUShaderStage['COMPUTE'] = GPUShaderStage['FRAGMENT']
visibility: number = GPUShaderStage.FRAGMENT
): GPUBindGroupLayout {
const bindGroupLayoutEntry: GPUBindGroupLayoutEntry = {
binding: 0,
Expand Down Expand Up @@ -60,7 +60,7 @@ class F extends ValidationTest {
textureView: GPUTextureView,
textureUsage: TextureBindingType,
sampleType: 'unfilterable-float' | 'depth' | 'uint',
visibility: GPUShaderStage['FRAGMENT'] | GPUShaderStage['COMPUTE'] = GPUShaderStage['FRAGMENT']
visibility: number = GPUShaderStage.FRAGMENT
) {
return this.device.createBindGroup({
layout: this.createBindGroupLayoutForTest(textureUsage, sampleType, visibility),
Expand Down
10 changes: 5 additions & 5 deletions src/webgpu/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BufferUsage = {
INDIRECT: 0x0100,
QUERY_RESOLVE: 0x0200,
} as const;
checkType<Omit<GPUBufferUsage, '__brand'>>(BufferUsage);
checkType<typeof GPUBufferUsage>(BufferUsage);

const TextureUsage = {
COPY_SRC: 0x01,
Expand All @@ -26,7 +26,7 @@ const TextureUsage = {
STORAGE: 0x08,
RENDER_ATTACHMENT: 0x10,
} as const;
checkType<Omit<GPUTextureUsage, '__brand'>>(TextureUsage);
checkType<typeof GPUTextureUsage>(TextureUsage);

const ColorWrite = {
RED: 0x1,
Expand All @@ -35,20 +35,20 @@ const ColorWrite = {
ALPHA: 0x8,
ALL: 0xf,
} as const;
checkType<Omit<GPUColorWrite, '__brand'>>(ColorWrite);
checkType<typeof GPUColorWrite>(ColorWrite);

const ShaderStage = {
VERTEX: 0x1,
FRAGMENT: 0x2,
COMPUTE: 0x4,
} as const;
checkType<Omit<GPUShaderStage, '__brand'>>(ShaderStage);
checkType<typeof GPUShaderStage>(ShaderStage);

const MapMode = {
READ: 0x1,
WRITE: 0x2,
} as const;
checkType<Omit<GPUMapMode, '__brand'>>(MapMode);
checkType<typeof GPUMapMode>(MapMode);

export const GPUConst = {
BufferUsage,
Expand Down

0 comments on commit dcbef9c

Please sign in to comment.