Hi, I hope you don't mind a low effort question. I'm currently learning wayland and planning to write a client. I will want to use gpu to draw in the app. Can wgpu be used in wayland? How difficult would wgpu be compared to opengl for someone who is new to graphics progamming?
In some ways, OpenGL is easier because it's fully stateful, so there's less setup code and it hides a decent amount of the asynchronousness of GPU programming. However, I think WGPU's errors are much, much better and will serve as a strong launching off point for things like Vulkan or DirectX 12, or even just complicated WGPU applications.
Sorry to drop a bombshell question in here, but I've hit a really slow FXC case with PipelineCompilationOptions::zero_initialize_workgroup_memory = true and large var<workgroup> arrays. naga's HLSL backend emits the zero-init as whole-array assignments done by lane 0:
FXC (cs_5_1) takes 40 s to 5+ min per entry point on these kernels meanwhile Vulkan compiles them in a fraction of a second. If I edit the HLSL to a strided loop instead:
for (uint i = lane; i < 1024u; i += 128u) { quads[i] = 0u; }
it brings the same kernels to 0.4-1.9 s with FXC, about the same as turning zero-init off entirely. Is this a known issue?
Edit: format, for whatever reason markdown didnt work
Unfortunately the entirety of fxc is a known issue :) It's a 10+ year unmaintained compiler made for the days when shaders were 96 instructions not massive. There are a million ways to cause it to explode into massive runtime. If at all possible, if using the D3D12 backend, use DXC. It also has some problems with this, but its _much much_ better.
> Zero Init
This one particular problem though is something with a fix on the way, as it makes other shader compilers unhappy too. Probably in time for v32, but no promises there.
If you want inline ray queries, then January 2025 :). Ray tracing pipelines, this version! Both still experimental, but inline ray queries have been baking for a while!
imply that multiple queues (like a separate transfer queue) are finally implemented? Been waiting for that for years now. I'm trying to get asset loading into the GPU out of the main thread.
Congrats on the release! Is there a rough plan for first-class VK_EXT_present_timing support? I've seen #2869 and jameysharp's prototype via set_next_present_chain and open_with_callback - is that the intended path for now, or is a proper presentation-timing API on the roadmap?
Short term the various prototype apis will let this through sooner, but we do want a proper presentation timing api - the apis across platforms are just quite different, so finding a good api will take some thinking.
Looks like an awesome release, thank you and the contributors for all the hard work! Damage-aware presentation looks amazing, can't wait to give it a shot.
I've been learning wgpu recently and it is awesome! There's a lot of scaffolding needed to get started but once you get going it's powerful and super neat. Having a blast and learning a lot.
41
u/Sirflankalot wgpu · rend3 18h ago
Maintainer here, AMA!
4
u/Animats 13h ago
And I just finished months of work going from WGPU 24 to WGPU 30. Over 600 lines of changes required.
Does the change
imply that multiple queues (like a separate transfer queue) are finally implemented? Been waiting for that for years now. I'm trying to get asset loading into the GPU out of the main thread.
2
u/ayanada 13h ago
Congrats on the release! Is there a rough plan for first-class VK_EXT_present_timing support? I've seen #2869 and jameysharp's prototype via set_next_present_chain and open_with_callback - is that the intended path for now, or is a proper presentation-timing API on the roadmap?
4
u/moon-w0man 15h ago
Looks like an awesome release, thank you and the contributors for all the hard work! Damage-aware presentation looks amazing, can't wait to give it a shot.
2
u/Animats 10h ago
Note: wgpu-profiler needs a new version with dependencies adjusted to work with WGPU 31.
2
u/Emotional_Ad_4518 7h ago
Thank you for your hardwork, been using it in my egui 3D workspace app. Work very good so far
1
u/pgh_ski 15m ago
I've been learning wgpu recently and it is awesome! There's a lot of scaffolding needed to get started but once you get going it's powerful and super neat. Having a blast and learning a lot.