Skip to content

Comments

WebGPU API docs#24202

Merged
Elchi3 merged 71 commits intomdn:mainfrom
chrisdavidmills:webgpu-docs
Apr 5, 2023
Merged

WebGPU API docs#24202
Elchi3 merged 71 commits intomdn:mainfrom
chrisdavidmills:webgpu-docs

Conversation

@chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Feb 6, 2023

Description

This PR is the main PR in a series that adds documentation for the WebGPU API (see the list of Other PRs below). WebGPU is expected to land in Chrome 114 or so (around April-ish).

Other notes:

  • There is currently no WebGPU spec or compat data written for MDN. This will be added to https://github.com/mdn/browser-compat-data soon, so don't worry about the related errors showing up.
  • A lot of the red broken links are currently down to the fact that many of the API reference pages are not yet written, or are documented in other PRs. These will become fewer in time.
  • The basic examples I wrote to go along with these docs are currently stored on glitch, but I'll put them on an MDN demo repo before the final publication.

You can see full details of the additions expected in the WebGPU docs in my research document.

Motivation

Additional details

Related issues and pull requests

Fixes #23336

Other PRs that should be merged after this one:

Other related PRs that need merging:

@chrisdavidmills chrisdavidmills requested review from a team as code owners February 6, 2023 14:23
@chrisdavidmills chrisdavidmills requested review from dipikabh and wbamberg and removed request for a team February 6, 2023 14:23
@github-actions github-actions bot added the Content:WebAPI Web API docs label Feb 6, 2023
@chrisdavidmills chrisdavidmills marked this pull request as draft February 6, 2023 14:25
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

Preview URLs (52 pages)
Flaws (337)

Note! 23 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/WebGPU_API
Title: WebGPU API
Flaw count: 86

  • macros:
    • /en-US/docs/Web/API/GPUShaderModule does not exist
    • /en-US/docs/Web/API/GPUBuffer does not exist
    • /en-US/docs/Web/API/GPUBuffer does not exist
    • /en-US/docs/Web/API/GPUQueue/writeBuffer does not exist
    • /en-US/docs/Web/API/GPUShaderModule does not exist
    • and 81 more flaws omitted

URL: /en-US/docs/Web/API/Navigator
Title: Navigator
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/Navigator/securitypolicy does not exist
    • /en-US/docs/Web/API/Navigator/standalone does not exist

URL: /en-US/docs/Web/API/GPUCanvasContext
Title: GPUCanvasContext
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/GPUTexture does not exist

URL: /en-US/docs/Web/API/GPUCanvasContext/getCurrentTexture
Title: GPUCanvasContext.getCurrentTexture()
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/GPUTexture does not exist
    • /en-US/docs/Web/API/GPUTexture does not exist

URL: /en-US/docs/Web/API/GPUCanvasContext/configure
Title: GPUCanvasContext.configure()
Flaw count: 4

  • macros:
    • /en-US/docs/Glossary/Bitwise_flags does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder/copyTextureToTexture does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder/beginRenderPass does not exist

URL: /en-US/docs/Web/API/GPUAdapter/requestDevice
Title: GPUAdapter.requestDevice()
Flaw count: 3

  • macros:
    • /en-US/docs/Web/API/GPUQueue does not exist
    • /en-US/docs/Web/API/GPUQueue/label does not exist
    • /en-US/docs/Web/API/GPUError does not exist

URL: /en-US/docs/Web/API/GPUDevice
Title: GPUDevice
Flaw count: 34

  • macros:
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUDeviceLostInfo does not exist
    • /en-US/docs/Web/API/GPUQueue does not exist
    • /en-US/docs/Web/API/GPUBindGroup does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • and 29 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createShaderModule
Title: GPUDevice.createShaderModule()
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/GPUShaderModule does not exist
    • /en-US/docs/Web/API/GPUPipelineLayout does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUShaderModule does not exist

URL: /en-US/docs/Web/API/GPUDevice/createCommandEncoder
Title: GPUDevice.createCommandEncoder()
Flaw count: 8

  • macros:
    • /en-US/docs/Web/API/GPUCommandEncoder does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder does not exist
    • /en-US/docs/Web/API/GPUCommandEncoder does not exist
    • and 3 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createRenderBundleEncoder
Title: GPUDevice.createRenderBundleEncoder()
Flaw count: 13

  • macros:
    • /en-US/docs/Web/API/GPURenderBundleEncoder does not exist
    • /en-US/docs/Web/API/GPURenderPassEncoder does not exist
    • /en-US/docs/Web/API/GPURenderPassEncoder/executeBundles does not exist
    • /en-US/docs/Web/API/GPURenderBundle does not exist
    • /en-US/docs/Web/API/GPURenderBundleEncoder does not exist
    • and 8 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/pushErrorScope
Title: GPUDevice.pushErrorScope()
Flaw count: 3

  • macros:
    • /en-US/docs/Web/API/GPUInternalError does not exist
    • /en-US/docs/Web/API/GPUOutOfMemoryError does not exist
    • /en-US/docs/Web/API/GPUValidationError does not exist

URL: /en-US/docs/Web/API/GPUDevice/importExternalTexture
Title: GPUDevice.importExternalTexture()
Flaw count: 6

  • macros:
    • /en-US/docs/Web/API/GPUExternalTexture does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUExternalTexture does not exist
    • /en-US/docs/Web/API/GPUValidationError does not exist
    • /en-US/docs/Web/API/GPUExternalTexture does not exist
    • and 1 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/popErrorScope
Title: GPUDevice.popErrorScope()
Flaw count: 3

  • macros:
    • /en-US/docs/Web/API/GPUInternalError does not exist
    • /en-US/docs/Web/API/GPUOutOfMemoryError does not exist
    • /en-US/docs/Web/API/GPUValidationError does not exist

URL: /en-US/docs/Web/API/GPUDevice/label
Title: GPUDevice.label
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/GPUError does not exist

URL: /en-US/docs/Web/API/GPUDevice/createQuerySet
Title: GPUDevice.createQuerySet()
Flaw count: 16

  • macros:
    • /en-US/docs/Web/API/GPUQuerySet does not exist
    • /en-US/docs/Web/API/GPUQuerySet does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUQuerySet does not exist
    • /en-US/docs/Web/API/GPUQuerySet does not exist
    • and 11 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createComputePipelineAsync
Title: GPUDevice.createComputePipelineAsync()
Flaw count: 8

  • macros:
    • /en-US/docs/Web/API/GPUComputePipeline does not exist
    • /en-US/docs/Web/API/GPUComputePassEncoder does not exist
    • /en-US/docs/Web/API/GPUComputePipeline does not exist
    • /en-US/docs/Web/API/GPUPipelineError does not exist
    • /en-US/docs/Web/API/GPUPipelineError does not exist
    • and 3 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createTexture
Title: GPUDevice.createTexture()
Flaw count: 9

  • macros:
    • /en-US/docs/Web/API/GPUTexture does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Glossary/Bitwise_flags does not exist
    • /en-US/docs/Web/API/GPUTexture/createView does not exist
    • /en-US/docs/Web/API/GPUTexture does not exist
    • and 3 more flaws omitted
  • broken_links:
    • Can't resolve /en-US/docs/Web/API/GPUTexture/usage#value

URL: /en-US/docs/Web/API/GPUDevice/destroy
Title: GPUDevice.destroy()
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/GPUQueue does not exist

URL: /en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync
Title: GPUDevice.createRenderPipelineAsync()
Flaw count: 8

  • macros:
    • /en-US/docs/Web/API/GPURenderPipeline does not exist
    • /en-US/docs/Web/API/GPURenderPassEncoder does not exist
    • /en-US/docs/Web/API/GPURenderBundleEncoder does not exist
    • /en-US/docs/Web/API/GPURenderPipeline does not exist
    • /en-US/docs/Web/API/GPUPipelineError does not exist
    • and 3 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/uncapturederror_event
Title: GPUDevice: uncapturederror event
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/GPUUncapturedErrorEvent does not exist

URL: /en-US/docs/Web/API/GPUDevice/queue
Title: GPUDevice.queue
Flaw count: 4

  • macros:
    • /en-US/docs/Web/API/GPUQueue does not exist
    • /en-US/docs/Web/API/GPUQueue does not exist
    • /en-US/docs/Web/API/GPUQueue does not exist
    • /en-US/docs/Web/API/GPUQueue does not exist

URL: /en-US/docs/Web/API/GPUDevice/createComputePipeline
Title: GPUDevice.createComputePipeline()
Flaw count: 10

  • macros:
    • /en-US/docs/Web/API/GPUComputePipeline does not exist
    • /en-US/docs/Web/API/GPUComputePassEncoder does not exist
    • /en-US/docs/Web/API/GPUShaderModule does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUPipelineLayout does not exist
    • and 5 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createRenderPipeline
Title: GPUDevice.createRenderPipeline()
Flaw count: 22

  • macros:
    • /en-US/docs/Web/API/GPURenderPipeline does not exist
    • /en-US/docs/Web/API/GPURenderPassEncoder does not exist
    • /en-US/docs/Web/API/GPURenderBundleEncoder does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUPipelineLayout does not exist
    • and 17 more flaws omitted

URL: /en-US/docs/Web/API/GPUDevice/createBuffer
Title: GPUDevice.createBuffer()
Flaw count: 9

  • macros:
    • /en-US/docs/Web/API/GPUBuffer does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUBuffer/getMappedRange does not exist
    • /en-US/docs/Glossary/Bitwise_flags does not exist
    • /en-US/docs/Web/API/GPUBuffer does not exist
    • and 3 more flaws omitted
  • broken_links:
    • Can't resolve /en-US/docs/Web/API/GPUBuffer/usage#value

URL: /en-US/docs/Web/API/GPUDevice/createBindGroupLayout
Title: GPUDevice.createBindGroupLayout()
Flaw count: 29

  • macros:
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroup does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroup does not exist
    • /en-US/docs/Web/API/Device/createBindGroup does not exist
    • and 23 more flaws omitted
  • broken_links:
    • No need for the pathname in anchor links if it's the same page

URL: /en-US/docs/Web/API/GPUDevice/lost
Title: GPUDevice.lost
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/GPUDeviceLostInfo does not exist
    • /en-US/docs/Web/API/GPUDeviceLostInfo does not exist

URL: /en-US/docs/Web/API/GPUDevice/createSampler
Title: GPUDevice.createSampler()
Flaw count: 5

  • macros:
    • /en-US/docs/Web/API/GPUSampler does not exist
    • /en-US/docs/Web/API/GPUError does not exist
    • /en-US/docs/Web/API/GPUSampler does not exist
    • /en-US/docs/Web/API/GPUValidationError does not exist
    • /en-US/docs/Web/API/GPUSampler does not exist

URL: /en-US/docs/Web/API/GPUDevice/createBindGroup
Title: GPUDevice.createBindGroup()
Flaw count: 28

  • macros:
    • /en-US/docs/Web/API/GPUBindGroup does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUShaderModule does not exist
    • and 22 more flaws omitted
  • broken_links:
    • No need for the pathname in anchor links if it's the same page

URL: /en-US/docs/Web/API/GPUDevice/createPipelineLayout
Title: GPUDevice.createPipelineLayout()
Flaw count: 15

  • macros:
    • /en-US/docs/Web/API/GPUPipelineLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroup does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • /en-US/docs/Web/API/GPUBindGroupLayout does not exist
    • and 10 more flaws omitted
External URLs (58)

URL: /en-US/docs/Web/API/WebGPU_API
Title: WebGPU API


URL: /en-US/docs/Web/API/GPUSupportedLimits
Title: GPUSupportedLimits


URL: /en-US/docs/Web/API/GPUCanvasContext/configure
Title: GPUCanvasContext.configure()


URL: /en-US/docs/Web/API/GPUSupportedFeatures
Title: GPUSupportedFeatures


URL: /en-US/docs/Web/API/GPUDevice
Title: GPUDevice


URL: /en-US/docs/Web/API/GPUDevice/createShaderModule
Title: GPUDevice.createShaderModule()


URL: /en-US/docs/Web/API/GPUDevice/createCommandEncoder
Title: GPUDevice.createCommandEncoder()


URL: /en-US/docs/Web/API/GPUDevice/createRenderBundleEncoder
Title: GPUDevice.createRenderBundleEncoder()


URL: /en-US/docs/Web/API/GPUDevice/pushErrorScope
Title: GPUDevice.pushErrorScope()


URL: /en-US/docs/Web/API/GPUDevice/importExternalTexture
Title: GPUDevice.importExternalTexture()


URL: /en-US/docs/Web/API/GPUDevice/popErrorScope
Title: GPUDevice.popErrorScope()


URL: /en-US/docs/Web/API/GPUDevice/createComputePipelineAsync
Title: GPUDevice.createComputePipelineAsync()


URL: /en-US/docs/Web/API/GPUDevice/createTexture
Title: GPUDevice.createTexture()


URL: /en-US/docs/Web/API/GPUDevice/createRenderPipelineAsync
Title: GPUDevice.createRenderPipelineAsync()


URL: /en-US/docs/Web/API/GPUDevice/uncapturederror_event
Title: GPUDevice: uncapturederror event


URL: /en-US/docs/Web/API/GPUDevice/createComputePipeline
Title: GPUDevice.createComputePipeline()


URL: /en-US/docs/Web/API/GPUDevice/createRenderPipeline
Title: GPUDevice.createRenderPipeline()


URL: /en-US/docs/Web/API/GPUDevice/createBuffer
Title: GPUDevice.createBuffer()


URL: /en-US/docs/Web/API/GPUDevice/createBindGroupLayout
Title: GPUDevice.createBindGroupLayout()


URL: /en-US/docs/Web/API/GPUDevice/createSampler
Title: GPUDevice.createSampler()


URL: /en-US/docs/Web/API/GPUDevice/createBindGroup
Title: GPUDevice.createBindGroup()


URL: /en-US/docs/Web/API/GPUDevice/createPipelineLayout
Title: GPUDevice.createPipelineLayout()

(comment last updated: 2023-04-05 09:30:35)

Copy link

@Kangz Kangz left a comment

Choose a reason for hiding this comment

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

LGTM overall!

Copy link
Contributor

@toji toji left a comment

Choose a reason for hiding this comment

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

Whew! Off to a hell of a start. 😁

Left some suggestions for either typos or minor clarifications I felt were worth making, but overall this is a great article! Thank you!

chrisdavidmills and others added 16 commits February 7, 2023 08:04
@chrisdavidmills chrisdavidmills marked this pull request as ready for review March 28, 2023 09:34
chrisdavidmills and others added 16 commits April 3, 2023 09:46
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Merging this as discussed in slack! Yay!!!!

@Elchi3 Elchi3 merged commit 840132f into mdn:main Apr 5, 2023
@chrisdavidmills chrisdavidmills deleted the webgpu-docs branch April 5, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intent to document: WebGPU

6 participants