You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/api/index.mdx
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,33 @@ title: Overview
3
3
description: How this API Reference relates to the standard WebGPU API.
4
4
---
5
5
6
+
## WebGPU API
7
+
6
8
React Native WebGPU implements the standard [WebGPU API](https://www.w3.org/TR/webgpu/).
7
9
Types such as `GPUDevice`, `GPUBuffer`, `GPUTexture`, and `GPURenderPipeline` behave exactly as they do on the web, so any code or tutorial written against the WebGPU specification works here unchanged.
8
10
9
-
For that reason, this reference does **not** duplicate the standard WebGPU API.
10
-
Re-documenting it would only drift out of date with the specification.
11
11
To learn the core API, use the resources below:
12
12
13
13
-[WebGPU Fundamentals](https://webgpufundamentals.org/): the best place to learn WebGPU from the ground up.
14
14
-[MDN WebGPU reference](https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API): per-type and per-method documentation.
15
15
-[WebGPU specification](https://www.w3.org/TR/webgpu/): the authoritative source.
16
16
17
+
## Core WebGPU concepts
18
+
19
+
Understanding the foundational WebGPU objects and how they interact is essential to WebGPU development.
20
+
Each concept below links to its reference on MDN.
21
+
22
+
| Concept | Description |
23
+
| ------- | ----------- |
24
+
|[Instance](https://developer.mozilla.org/en-US/docs/Web/API/GPU)| The entry point to WebGPU, exposed as `navigator.gpu`, granting access to adapters |
25
+
|[Adapter](https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter)| Represents a specific GPU on the device |
26
+
|[Device](https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice)| Your logical connection to the GPU where resources are created |
27
+
|[Queue](https://developer.mozilla.org/en-US/docs/Web/API/GPUQueue)| The mechanism used to submit commands to the GPU |
28
+
|[Shader Module](https://developer.mozilla.org/en-US/docs/Web/API/GPUShaderModule)| Your GPU code, written in the WebGPU Shading Language (WGSL) |
29
+
|[Pipelines](https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPipeline)| Objects describing the entire GPU state (shaders, blending) for a task |
30
+
|[Bind Groups](https://developer.mozilla.org/en-US/docs/Web/API/GPUBindGroup)| Ties data buffers (ex: textures) to shaders |
31
+
|[Command Encoder](https://developer.mozilla.org/en-US/docs/Web/API/GPUCommandEncoder)| An object used to build a sequence of GPU commands into a command buffer |
32
+
17
33
## What this reference covers
18
34
19
35
This section documents only the additions that are specific to React Native, the surface you will not find in the WebGPU specification:
Copy file name to clipboardExpand all lines: apps/docs/content/docs/getting-started/installation.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@ description: Your first React Native WebGPU App
5
5
6
6
React Native WebGPU brings the [WebGPU API](https://www.w3.org/TR/webgpu/) to iOS, Android, macOS, and visionOS using [Dawn](https://dawn.googlesource.com/dawn).
7
7
8
+
## Install the package
9
+
10
+
```npm
11
+
npm i react-native-webgpu
12
+
```
13
+
8
14
## Requirements
9
15
10
16
| Package | Version | Required |
@@ -14,12 +20,6 @@ React Native WebGPU brings the [WebGPU API](https://www.w3.org/TR/webgpu/) to iO
14
20
15
21
Please note that this module does not work on the legacy architecture.
16
22
17
-
## Install the package
18
-
19
-
```npm
20
-
npm i react-native-webgpu
21
-
```
22
-
23
23
## Setup
24
24
25
25
Once installed, the global `navigator.gpu` API is available - the same entry point as in Chrome or Safari:
0 commit comments