gpu: verify lifetimes of descriptor memory, investigate alternatives to copying strategy #183
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#183
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In a few places we have to copy descriptors & structs before passing into the native implementation because our interface is not always ABI compatible with
webgpu.h:https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/hexops/mach%24%40webgpu+file:gpu+page_allocator&patternType=literal
We're currently using a pretty gnarly approach: we use stack space if the data we have to copy is small enough, and heap-allocate otherwise. Obviously, the memory is always gone (stack or not) once the function returns. It's not exactly clear from
webgpu.hwhat the lifetime of certain memory is, as there are no docs. I believe descriptors must live only until the function which takes the descriptor returns, but this needs to be confirmed.gpu.Queuewas going out of scope before the callback got called, so the wrapper callback couldn't call thegpu.Queue.WorkDoneCallbackit held" from this matrix chathttps://github.com/hexops/mach/pull/403