r/vulkan • • 16h ago

cudash - run Cuda and Vulkan compute graphs the easy way

25 Upvotes

I took my problem - Vulkan compute needs a lot of boilerplate - and ran with it to understand what I need to do to have it run a simple way with capabilities like Cuda and Cuda Graph.

What I did

  • Kernel arguments are plain pointers, with no descriptor sets, using buffer device addresses.

  • Streams map onto the Vulkan queue, with automatic ordering between streams.

  • Graph capture records command buffers.

  • Slang compiles the same source to SPIR-V and PTX to help me check if my Vulkan Compute and Cuda parts are doing the same.

I'm currently very happy with it for my use cases so I'd like to share it and get some feedback: Any Vulkan pitfalls I’ve missed? (What) would you want a layer like this to do your compute?


r/vulkan • • 23h ago

Native Vulkan ar / 3d Viewer for android : Raster and Ray tracing Hybrid

22 Upvotes

Hi..
I am in the process of making an ar viewer in vulkan for android to run natively.

For rendering i am following a hybrid structure mixing Raster IBL approximations and path tracing, the gems are traced with tracing the ray directions and metals with split sum approximations and only traced for inter reflections once the movement stops.

The engine is general purpose focusing on jewellery embedded in an sdk to integrate with 3 lines of kotlin.

The c++ engine takes care of initializing the context based on the hardware capabilities like vulkan 1.1 support, hardware RT cores and compute path fallbacks.I have tested on mali, adreno and xclipse(Exynos) gpus.

Most of the optimization i did are around the memory and cache coherency on mobile gpus, since last couple of years got really obsessed with graphics maths and its implementations but i come from c++ background so pls let me know about the visuals of the same and how can i improve further.

It is closed source for now but happy to share any details to any one interested.

Thanks


r/vulkan • • 10h ago

vulkan-py easymode. all the boilerplate is in easy.py. vulkan-py fork https://github.com/billyblackburn/vulkan-py-easy/tree/main

0 Upvotes

Example Line-Count Reduction

ExampleBeforeAfterWhat changed
examples/vector_add.py~300+ lines (raw vulkan_py)~57 linesUses get_default_device(), create_buffer_with_data(), create_shader_module(), dispatch()
examples/hello_triangle.py534 lines71 linesUses GraphicsDevice, create_render_pass(), create_graphics_pipeline(), create_framebuffers(), FrameSync
examples/lighting_demo.py1,860 lines815 linesUses GraphicsDevice, create_depth_resources(), create_uniform_descriptor_sets(), create_graphics_pipeline(), begin_render_pass()

r/vulkan • • 19h ago

Mutter Vulkan backend: release 1.2 improves GPU memory management

Thumbnail
reddit.com
1 Upvotes

r/vulkan • • 1d ago

What's a good benchmark Vulkan PortMaster game?

2 Upvotes

Hello hivemind.

I need 2-3 games or demos for testing with Vulkan on a low-end RK3326 SoC console. Can anyone recommend any good test games for this that are close to the hardware limit and support Vulkan on PortMaster?

Bonus points if they're open source games that I don't need game files for.

Thanks lots!


r/vulkan • • 2d ago

After 7 years my game with a custom Vulkan renderer is finally out

105 Upvotes

I've been posting updates a few times here the last months about the Vulkan renderer I made for my game Satelital. It just launched and is running on actual hardware of people! Which is mindblowing to me.

The demo helped me to find so many weird combinations of GPUs and old drivers I didn't had access to.

I also added other funcionality to the engine, to properly frame limit on screens with very high refresh rates. Which is quite useful in laptops to save some battery.

Here is my changelog:

- Frame pacing was quite trickry, there doesn't seem to be a unique common way of doing this, so you have vendor specific extensions like VK_EXT_present_timing to present_wait2, then present_wait and finally GOOGLE_display_timing. I use time in between frames on Vsync to avoid having tearing.

- HDR on Windows and macOS. I'm using scRGB (RGBA16F + EXTENDED_SRGB_LINEAR) which also works with MoltenVK. On Windows I switch the monitor to HDR when the game starts and restore its previous state on exit.

- I had some issues with AMD switchable graphics and Vulkan layers installed by other software. On some laptops I was picking the discrete GPU when it wasn't actually connected to the display, which resulted in a black screen.

- I added VK_EXT_device_fault along with a lot of logging for recent draw calls and memory usage. Whenever the game crashes or gives some error I can ask the player to send this, and it's been super useful to debu issues.

- I ended up lowering the minimum Vulkan version to 1.1 to support some older hardware.

It was hard to try to fix issues that didn't happened on any of my development machines, which is why I'm interested in hearing from other people who've shipped Vulkan games. What kind of issues did you run into that you never saw during development?

Also if you are interested in the game, Satelital is a puzzle game set in a small alien solar system. Each planet has its own puzzle rules and there's no tutorial explaining how things work. You have to figure them out by observing and experimenting. I made everything myself, including the engine, renderer, art and music.

You can check it here, the game is out and there is a free demo too:
https://store.steampowered.com/app/3256790/Satelital/


r/vulkan • • 2d ago

Slang extension for JetBrains IDEs

Thumbnail reddit.com
9 Upvotes

r/vulkan • • 1d ago

[Written with AI assistance] Cross-compiling Mesa 27.0 Zink to COFF-ARM64EC with native arm64 KosmicKrisp (Vulkan 1.4 -> Metal) for WGL OpenGL 4.6 viewports

0 Upvotes

Test setup running x86_64 Windows WGL OpenGL 4.6 (Compatibility Profile) workstation viewports on Apple M4 without Rosetta 2 or virtualization, pairing a COFF-ARM64EC build of Mesa 27.0.0-devel Zink (libgallium_wgl.dll) with a native arm64 build of KosmicKrisp inside a single arm64 Wine 11.20 + FEX process.

 Architecture notes and patch diffs: muradjabir.com/blog/post-rosetta-opengl-apple-silicon


r/vulkan • • 3d ago

A new physically based SSAO is now open source! CORTAO - Circular Occluder Ray-Traced Ambient Occlusion

288 Upvotes

Hi, everyone!

Today I'm releasing CORTAO, a new physically based SSAO technique invented and developed by me, as open source. Vulkan is supported through first class GLSL support, and the majority of CORTAO's development was done using Vulkan.

https://github.com/theagentd/CORTAO

Circular Occluder Ray-Traced Ambient Occlusion, or CORTAO, is a brand new physically based ambient occlusion technique. Unlike existing horizon-based state-of-the-art techniques, CORTAO is based screen space raytracing with up to 32 rays per pixel, allowing it to avoid the inherent limitations of existing techniques. Through a combination of much better convergence and clever optimizations, CORTAO is able to achieve much better quality for the same performance cost as GTAO.

All this allows CORTAO to just work without any scene-specific tweaking at all regardless of the type of scenes, whether it's a simple indoor room, an open world with heavy foliage and vegetation, or a vast space scene with extreme depth range.

Compared to existing techniques such as GTAO:

  • CORTAO provides a never-before-seen level of physical accuracy rivaling that of brute-force hardware raytracing, while only relying on screen space information.

  • CORTAO handles depth discontinuities in complex scenes in a more conservative way, avoiding the view-dependent occlusion of GTAO and producing less obvious artifacts when screen space information is limited.

  • CORTAO at the same time has greatly improved convergence, producing much higher quality results at lower sample counts even for scenes where GTAO works well, which is especially important for low-end hardware.

What started as a fun little personal project two years ago has now grown into something much bigger than I could've ever imagined, with multiple collaborations and conference applications, most of which I cannot talk about publicly yet. The open source release of CORTAO marks an important milestone where I'm finally sharing my work with the world, but the work is far from finished. There's a long to-do list of improvements and extensions that I will be exploring over the coming months and maybe even years. I'd be honored if you checked it out, and if you have any questions, I'd love to answer them.

AI disclosure: No AI was used in the development of CORTAO.


r/vulkan • • 3d ago

Issue in Vulkan Rendering for 1M objects in C++

8 Upvotes

I have been following the Introduction - Vulkan Tutorial couples of times and this time i was doing something a bit different. I have create this Lonewolf30/CityFoundingSimulator but currently with 1M objects i seem to have an issue in only getting 4 FPS, as far as i can narrow it down i seem to have an issue in the vulkan rendering sequence but i cant seem to profile using VTune as to where the slowdown is, can somebody please point me in the right direction of what i am doing wrong.

If there are any other code suggestions play let me know so i can implement them.

I have been working on this project for a while on and off, no AI was used in the creation of the rendering system, the only part i used AI in was for help with the TerrainChunkRenderer::OptimiseMeshData() algorithm.


r/vulkan • • 2d ago

AI content Building an open-source character posing and rendering tool (C++/Qt6). Looking for architectural feedback and graphics-focused contributors.

Post image
0 Upvotes

r/vulkan • • 4d ago

Vulkan update or keep OpenGL for mobile devices

Thumbnail reddit.com
5 Upvotes

r/vulkan • • 5d ago

Vulkanised and Real-Time Shading Symposium (RTSS) 2027 full programs released

25 Upvotes

Khronos has posted the full schedules for Vulkanised 2027 and RTSS 2027. Both are in Kortrijk, Belgium, at Howest University of Applied Sciences, running back to back: Vulkanised on February 8-10, RTSS on February 11-12.

Some highlights:

  • Vulkanised opens with a Vulkan roadmap/simplification session from Working Group Chair Ralph Potter and Tobias Hector, followed by engine talks (Unreal Engine’s Vulkan integration) and NVIDIA ray and path tracing sessions

  • RTSS opens with a keynote from Ken Perlin, who wrote the first shading language for his 1985 SIGGRAPH paper, on the past, present, and future of real-time shaders

  • RTSS has a strong Slang track plus sessions on HLSL, SYCL, Rust-GPU, and WGSL/WESL

Early-bird registration is open through January 15, 2027.

Full press release: https://www.khronos.org/news/press/vulkanised-and-rtss-2027-programs-released?utm_medium=social&utm_source=reddit&utm_campaign=Vulkanised_RTSS_Program&utm_content=press


r/vulkan • • 5d ago

Testers wanted: experimental Slang GPU path for darktable (Metal/Vulkan) - darktable

Thumbnail
discuss.pixls.us
3 Upvotes

I’ve been working on a proof of concept that ports darktable’s OpenCL kernels to Slang. Slang compiles them to Metal on macOS and Vulkan on Linux. This is not part of darktable: the maintainers haven’t adopted it, and it lives on my fork. I would appreciate any developers or users who can help test and provide performance results and logs. So far the testing support has been super helpful for identifying issues across various hardware configurations.


r/vulkan • • 5d ago

Does Vulkan on C# make sense?

Thumbnail reddit.com
5 Upvotes

r/vulkan • • 6d ago

Mutter Vulkan backend update: GNOME Shell integration, async resource cleanup, and rendering optimizations

Thumbnail
reddit.com
2 Upvotes

r/vulkan • • 7d ago

Hey guys, look at this beauty! My very own triangle! 😂

110 Upvotes

r/vulkan • • 8d ago

I’m curious about how you guys handle resource cleanup in Vulkan.

Post image
116 Upvotes

Do you usually destroy resources manually in reverse order of creation, or do you organize them into separate cleanup functions?


r/vulkan • • 7d ago

Recommended books for novice / intermediate learning

Thumbnail reddit.com
4 Upvotes

r/vulkan • • 7d ago

I’m curious about the flags fields in Vulkan structs. Which structs commonly use them, and how do you know when you need to set specific flags?

4 Upvotes

r/vulkan • • 6d ago

Is mailbox present mode really triple buffering?

0 Upvotes

working through vulkan-tutorial.com and it's talking about present modes. For VK_PRESENT_MODE_MAILBOX_KHR it says "This is commonly known as "triple buffering", although the existence of three buffers alone does not necessarily mean that the framerate is unlocked."

But the overall description of the mode doesn't seem to indicate there's actually 3 buffers involved. It seems more like there's just 2 but there's a "replacement" process: "Instead of blocking the application when the queue is full, the images that are already queued are simply replaced with the newer ones".

So why is it claimed that this is triple buffering? Am I missing something?

Also a secondary, pedantic question: I've never come across a mailbox system where the old mail is replaced when new mail is available; the old mail simply accumulates. Seems like an odd terminology choice to use. What's that about?


r/vulkan • • 8d ago

Does Vulkan really need GLM?

19 Upvotes

I feel like most of the math operations required for Vulkan, such as matrix transformations, vector operations, and camera calculations, are manageable with a bit of hand-written C code.

Is there any real advantage to using GLM, or is implementing these operations yourself a reasonable approach?