sysgpu: Examples that allocate against vulkan backend crash with out of memory error #1352
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach#1352
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?
System details:
zig version: 0.14.0-dev.2577+271452d22
mach:
b14f8e69eeVulkan driver version: 53.308.0
NVIDIA GeForce RTX 3080
OS: NixOs 24.11.7
steps to reproduce
Attempt to build an example that allocates memory (
zig build run-[glyphs,hardware-check,sprite,etc])See the following stacktrace:
Notes
I added some debug logging and it appears the function
findBestAllocatorhttps://github.com/hexops/mach/blob/main/src/sysgpu/vulkan.zig#L3545 was always returning 1 (MemoryKindof linear) however when I check out https://github.com/hexops/mach/pull/1349/commits/e4f09e94fa9e7f9b2e37bd04f456c07edd783e13 from the libdecor PR and force the allocator to be 3 (linear_write_mappable), the glyphs and hardware check demos work for me.(I checked out the libdecor branch to try out wayland otherwise I can't run x11 it throws an out of date khr error with forcing it with the alternative allocator index)
I'm printing out the size it attempts to allocate and its pretty small (65mb at most):
So doesn't seem like its an actual OOM issue, maybe the
findBestAllocatorfunction isn't returning the correct one?Interestingly the core-triangle example doesn't error out and doesn't hit my debug logging so I guess it doesn't allocate?
You're not alone here at least :) https://discord.com/channels/996677443681267802/996677444360736831/1328445547748528231
Well glad its not just me then! Will try and poke around with the vulkan backend, probably some 'fun' interaction between vulkan and nvidia causing issues :)