Replies: 4 comments 4 replies
|
Ого! Огромный объем же. Если для всех видях всех производителей |
|
My own opinion: No. In detailsFirst I should say that I'm not coming from a background of graphics infrastructure development. However, I do have experience of several decades of software development. In this regard I view the gogpu projects more from a user perspective (i.e., software developer that uses gogpu) than a developer perspective (that actively develops gogpu) . Please don't take my opinion personally or as an insult. I wouldn't be here if I thought that the project isn't great. So why do I say "no"?
These (1-4) reasons will require a lot of development time. It's a long process but it's a must in order to gain trust from the users. We must make sure that anyone who wish to develop using gogpu will have a friction-less experience.
SummaryI think the project needs to focus on completing its base features and do so in a spectacular way before progressing to a new content. |
|
Design direction update. After deeper study of modern GPU hardware capabilities, we're increasingly confident that Neon can be significantly simpler than Mesa — not just "Mesa rewritten in Go", but a fundamentally leaner architecture. Why simplerModern GPUs (AMD RDNA 2019+, Intel Xe 2020+, Apple M1+ 2020+) have converged in ways that make large parts of Vulkan/DX12 API complexity unnecessary at the hardware level:
What this means for Neon's scopeInstead of implementing the full Vulkan API surface (~600 functions, ~200 structs), Neon targets a much smaller primitive set:
This is roughly the surface that Sebastian Aaltonen describes as "No Graphics API" — the minimal abstraction that maps directly to what GPUs actually do. CUDA proved this model works at scale for compute; Neon aims to prove it works for graphics too. Hardware scopeWe're not trying to support 20 years of GPU hardware. Minimum requirements:
Pre-RDNA AMD (GCN), pre-Xe Intel, and NVIDIA (proprietary ISA) are explicitly out of scope. First target remains AMD RDNA — open register specs, ACO shader compiler reference in Mesa, simpler PM4 command stream. TimelineThis remains a post-v1.0 research project. Our v1.0 (December 2026) ships with Vulkan/DX12/Metal/GLES/Software backends. Neon is the long-term play for truly zero-dependency GPU access. |
|
I think Neon could be introduced incrementally rather than treated as an all-or-nothing replacement for the existing wgpu backends. The existing Vulkan, DX12, Metal, GLES, and software backends could remain the default and fallback paths. Neon would initially be an opt-in experimental backend, enabled only for the hardware generations and capabilities it supports reliably. For production use, I suggest defining an explicit adoption gate for each workload:
“End-to-end” is important here. The benchmark should include buffer upload, synchronization, command submission, execution, and readback or presentation. A faster shader or command stream alone would not be enough if data transfer and synchronization make the complete workload slower. This would allow development to progress in small usable steps:
I would avoid transparent per-command mixing inside one wgpu Device at first, since resources and synchronization belong to a specific backend. A simpler first model would be backend selection per Adapter or Device. If selective compute acceleration is useful later, it could be exposed explicitly through staging copies first, followed by dma-buf and syncobj interoperability when zero-copy sharing is ready. Neon may still be valuable in a zero-userspace-dependency mode even when performance is only comparable to Vulkan. However, it should not become the default production backend for a workload until it provides a measurable advantage or solves a deployment constraint that the existing backend cannot. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RFC: Pure Go GPU Driver (neon) — Direct Hardware Access
Summary
We're exploring a new direction for the GoGPU ecosystem: a Pure Go GPU user-mode driver that talks directly to GPU hardware via kernel interfaces, bypassing Vulkan/Metal/DX12 entirely. This would be the first GPU user-mode driver written in Go in the world.
Motivation
GoGPU already has a Pure Go WebGPU implementation (wgpu) with 5 HAL backends. But all of them sit on top of existing GPU APIs:
We replace the User-Mode Driver (Mesa NVK/RADV/ANV), not the kernel driver. The kernel driver (amdgpu, i915, nouveau) stays — it handles hardware init, scheduling, power management.
Why?
Research
We analyzed Mesa's open-source GPU drivers (NVK for NVIDIA, RADV for AMD, ANV for Intel). Measured LOC with
wc -lon actual source:Full driver comparison (measured):
Scope clarification:
Platform Support
/dev/dri/renderD128)IOGPUDeviceUserClient(IOKit) internally for GPU command submit. Mesa wraps IOKit entrypoints for AGX on macOS (wrap.dylib). Path exists but via private API — risky (Apple can break), no stability guarantee.D3DKMTSubmitCommandallows userspace command submission on GPU VA contexts. Vendor-specific command format still required.GPU Vendor ISA Documentation
Existing Go DRM Libraries
Several Go libraries have wrapped DRM ioctls, but all are KMS/modesetting only — none do GPU command submission:
The ioctl mechanism is proven in Go — NeowayLabs/drm uses pure
syscallcalls, zero CGO. ~1.7K LOC confirms our estimate for kernel interface layer.Proposed Approach
Phased Development
Phase 0: Foundation
Phase 1: Compute MVP
Phase 2: Shader Compilation
Phase 3: Rendering
Repository
Start as a new HAL backend in wgpu (
hal/drm/or similar), extract to separate repo when mature. Working name: neon.Estimated Effort
GoGPU is already 1.1M+ LOC of Pure Go. Adding 30-100K for a GPU driver is ambitious but tractable.
Questions for Discussion
Which vendor first? Intel (best docs) vs AMD (bigger community) vs Apple Silicon (Asahi ISA available, Linux only)?
Separate repo from the start? Or incubate inside wgpu as
hal/drm/?Name? Candidates: neon, forge, warp, photon, nova, apex, aurora. Open to suggestions.
Who wants to help? GPU driver experience, DRM knowledge, shader compiler expertise — all valuable.
Is this worth doing? Vulkan already works. The value is in the journey (deep GPU understanding, Pure Go purity, embedded use cases) as much as the destination.
Tagging active ecosystem contributors for input:
@lkmavi @z46-dev @jdbann @k-chimi @georgebuilds @omer316 @unxed @TuSKan @adamsanclemente @darkliquid
We'd love to hear your thoughts — especially on vendor choice, naming, and whether you'd be interested in contributing to specific parts (DRM ioctls, shader compiler, macOS DriverKit, etc.).
References
All reactions