Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types for WebGPU #5029

Merged
merged 7 commits into from
Feb 2, 2023
Merged

Add types for WebGPU #5029

merged 7 commits into from
Feb 2, 2023

Conversation

willeastcott
Copy link
Contributor

Add IntelliSense support for WebGPU types:

image

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@willeastcott willeastcott added the area: graphics Graphics related issue label Feb 2, 2023
@willeastcott willeastcott self-assigned this Feb 2, 2023
@mvaligursky
Copy link
Contributor

I tried adding those before, fingers crossed you get it to work.
We'll then need to remove these I think

engine/package.json

Lines 37 to 57 in f1770e4

"GPUAdapter": "readonly",
"GPUBindGroup": "readonly",
"GPUBindGroupDescriptor": "readonly",
"GPUBindGroupLayout": "readonly",
"GPUBlendState": "readonly",
"GPUBuffer": "readonly",
"GPUBufferUsage": "readonly",
"GPUCanvasConfiguration": "readonly",
"GPUColorWrite": "readonly",
"GPUDevice": "readonly",
"GPUShaderStage": "readonly",
"GPUPipelineLayout": "readonly",
"GPURenderPassDescriptor": "readonly",
"GPURenderPipeline": "readonly",
"GPUSampler": "readonly",
"GPUTexture": "readonly",
"GPUTextureDescriptor": "readonly",
"GPUTextureUsage": "readonly",
"GPUTextureView": "readonly",
"GPUVertexBufferLayout": "readonly",
"opentype": "readonly",

@willeastcott
Copy link
Contributor Author

willeastcott commented Feb 2, 2023

@mvaligursky Seems to work. Can you maybe verify for yourself using this branch? Remember to npm install.

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, seems to work great! I added some types back in, will do the rest in a separate PR when this is merged.

"GPUBindGroupDescriptor": "readonly",
"GPUBindGroupLayout": "readonly",
"GPUBlendState": "readonly",
"GPUBuffer": "readonly",
"GPUBufferUsage": "readonly",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these 4 should be removed as well I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter complains if you remove those 4.

Martin Valigursky added 2 commits February 2, 2023 15:15
@mvaligursky mvaligursky merged commit 42b4c6c into main Feb 2, 2023
@mvaligursky mvaligursky deleted the webgpu-types branch February 2, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants