summaryrefslogtreecommitdiff
path: root/src/gpu
Commit message (Collapse)AuthorAge
* Add pardes's presentation on SDL_GPUGabriel Schneider41 hours
| | | | | | | | | | | | | | | | | Moved from pardes's src/gui/gui.zig (step S3 of moving its renderer here): src/gpu/Present.zig, the device, the window's claim or a software presenter through SDL_Renderer (a transparent window, which the GPU API will not claim, or a claim refused), the present mode and frames in flight, detach and attach for a window closed and opened again, the frame's target (the swapchain's image, or a capture texture in test mode and for the soft presenter), the soft present (the frame read back, put in a streaming texture and flipped) and a captured frame's read back. The window stays the embedder's and is passed in where it is used. What pardes did inside these with its own state comes back instead: a soft present's phase times (Timings), each presented frame's pixels through a frame tap, a captured frame's mapped bytes and times (readFrame, then releaseFrame) and their byte order (bgr). Present.zig imports the embedder's SDL translation as `c` and Cells.zig as `gpu_cells`.
* Add pardes's cell shaders, instance ABI and GPU resource helpersGabriel Schneider41 hours
| | | | | | | | | | | Moved verbatim from pardes's src/gui/gui.zig (step S1 of moving its renderer here): the seven GLSL shaders and their committed SPIR-V under src/gpu/shaders/, and src/gpu/Cells.zig with the instance structs the shaders read, the vertex inputs, makePipeline, the layer blend, texture2d and growInstances (which takes the device instead of pardes's Gui). Cells.zig imports the embedder's own SDL translation as `c`; pardes compiles it from this checkout. `zig build shaders` refreshes the prebuilt SPIR-V.
* gpu: add a post-process pass with optional depth sampling, and describe the ↵Gabriel Schneider41 hours
| | | | | | | | | | executor pardes shares `f.postProcess(source, target, .{...})` records a fullscreen pass that samples a completed render into a distinct target image: colour at fragment binding 0 and, with `sample_depth`, depth at 1, which needs the source's latest pass to have depth and one sample (missing depth, multisampled depth and feedback loops are rejected). The scene format's version 4 carries it, the executor records it on the caller's command buffer and owns the sampler, the web host does the same with its texture and sampler pairs, and native profiling reports the work as `postprocess`. The README says how to use it. docs/pardes-rendering.md describes the executor as pardes uses it for addon scenes: a borrowed SDL GPU device, `record` into the caller's command buffer, `run`, `output` and `postProcess`. The working copy as it stood on 2026-11-16; message written by Claude from the diff, at the author's request.
* Add glTF scene rendering, resource setup and 9P controlsGabriel Schneider2 days