docs: add ASCII diagram of GPU init chain to S3
This commit is contained in:
@@ -192,6 +192,18 @@ exits.
|
||||
|
||||
New concept: **5-layer GPU connection.** Each layer adds a capability:
|
||||
|
||||
```text
|
||||
Instance
|
||||
│
|
||||
├──> Surface (winit window → GPU surface)
|
||||
│
|
||||
├──> Adapter (select GPU: integrated vs discrete)
|
||||
│
|
||||
├──> Device + Queue (GPU connection + command submission)
|
||||
│
|
||||
└──> SurfaceConfiguration (swapchain: format, size, present mode)
|
||||
```
|
||||
|
||||
1. **[Instance](concepts/GLOSSARY.md#instance)** — opens a connection to the
|
||||
graphics driver. On Vulkan this loads the Vulkan loader and registers
|
||||
instance-level extensions. On WebGL this picks the browser GPU context.
|
||||
@@ -935,6 +947,19 @@ continues the next frame while the GPU works in the background.
|
||||
> `encoder.finish()` seals the script. `queue.submit()` dispatches it. The GPU
|
||||
> executes it later, in parallel. There is no `.await` on a draw call.
|
||||
|
||||
### Render Loop Cycle
|
||||
|
||||
```
|
||||
[RedrawRequested event]
|
||||
│
|
||||
▼
|
||||
get_current_texture() → [Success?] → Yes → record commands
|
||||
│ │
|
||||
└── No (Timeout/Occluded) → skip frame │
|
||||
▼
|
||||
device.poll() → encoder.begin_render_pass() → draw() → submit() → present()
|
||||
```
|
||||
|
||||
### The `render(&mut self)` Method Signature
|
||||
|
||||
```rust
|
||||
|
||||
Reference in New Issue
Block a user