r/vulkan

▲ 154 r/vulkan+23 crossposts

I would like to share my latest open source local LLM inference tool implemented in C#. It supports models like Gemma4, Qwen3.6 with multi-modal (image, vision, audio), reasoning and function tool. It can run on Windows/MacOS/Linux and fully leverage GPU's capability. The API is completely compatible with OpenAI and Ollama interface.

Really appreciated if you can try it and give me some feedback. If you like it, it will be a big thank you if you can star it. Thank you very much!

u/fuzhongkai — 14 hours ago
▲ 40 r/vulkan

New Tutorial: Advanced Vulkan Compute -- The Power of Parallelism

"Unlock the GPU as a general-purpose engine, not just a rasterizer."

This series takes you past `vkCmdDispatch` and into how compute actually executes on real hardware — occupancy, latency hiding, the Vulkan memory model, and subgroup operations that let invocations talk to each other without touching global memory.

* Vulkan 1.4 scalar layouts, shared memory (LDS), and memory consistency deep-dives

* Subgroup partitioning and non-uniform indexing — the "hidden power" most tutorials skip

* Run OpenCL kernels on top of Vulkan for a heterogeneous compute ecosystem

* Indirect dispatch, GPU-driven pipelines, and async compute orchestration

* Cooperative matrices, performance auditing, and AI-assisted compute diagnostics

* Dedicated coverage of mobile and embedded compute constraints

https://docs.vulkan.org/tutorial/latest/Advanced_Vulkan_Compute/introduction.html

reddit.com
u/thekhronosgroup — 17 hours ago
▲ 0 r/vulkan+2 crossposts

Built a LLM engine that trains on any GPU — Nvidia, AMD, Intel iGPU — in one C++ binary. No CUDA, no PyTorch. AGPL

Inference run everywhere. Training still means CUDA and a framework stack. I thought that was a convention, not a law of physics, so I built sym_engine: a single C++ binary (~6,000 lines + 21 Vulkan compute shaders) that pretrains, finetunes, evals, and runs inference on any Vulkan-capable GPU. No autograd — gradients are derived, forward and backward both visible in the source.

What I've actually verified, not what I hope: training on an RTX 5090, an AMD APU, and an Intel iGPU - the video shows two of them training simultaneously on one machine, CPU at 1%. Same binary, same shaders, fp32: RTX 5090 - 10.4M model, ~44,000 tok/s. Intel iGPU (64 EU) - 1.2M model, ~50,000 tok/s; 10.4M model, ~1,800 tok/s. The spread is the hardware's bandwidth, not the software — when the model fits the silicon's budget, an iGPU trains at desktop-GPU pace. Physics can't fit what won't fit. Largest trained so far: 318M params 32 GB VRAM

The target is edge devices - that was the goal from day one. To prove it, I gamified the engine into an Android app demoed in the link also: (CPU path on-device; the Adreno Vulkan path is in progress) a virtual pet whose brain is its own 120K-parameter model, training and inferring in real time on the phone as you play. Its save file is literally the weights. That's the point of the architecture: models that learn where they run - on-device, offline, no cloud, no API.

What it's not: a llama.cpp competitor. That runs other people's models fast; this grows your own small models on whatever silicon you have. No KV cache by design - training and inference share one code path. Known limits: single GPU per instance, Python needed once for tokenizer prep.

AGPL-3.0, sole copyright, not accepting contributions but forks welcome. Repo: https://github.com/chrismelanov85/SYM\_ENGINE

youtube.com
u/melanov85 — 1 day ago
▲ 2 r/vulkan

Execution order of commands in commandbuffers

I have questions on start of exections of cmds

We all know that cmd2 can start executing only after cmd1 .

If cmd2 is recorded latter than cmd1

If there are 2 different subpasses in a renderpass

Can cmds in subpass 1 start before cmds in subpass 0 within that render pass?

Or they also have the implicit ordering?

reddit.com
u/Hot_Refuse_4751 — 3 days ago
▲ 52 r/vulkan

What are some good modern (preferably video) tutorials?

I found this tutorial on youtube which explains modern Vulkan quite nicely, but the file structure and code is pretty hard to follow. Of course there are official tutorials by the Khronos group, but I've heard they're a bit outdated (vulkan 1.0).

I am specifically searching for a video tutorial that explains the setup for vulkan and SDL3 in Visual Studio and is relatively modern.

u/Key-Okra1636 — 4 days ago
▲ 1 r/vulkan

How good is the C++ module integration, does it even work?

I recently started a little side quest of learning the ins and outs of modern C++ and I was wondering if the new features work with Vulcan and would it make any Vulkan program run faster?

Also feel free to share some C++ and Vulkan optimisations you discovered or provide a link to some example programs.

reddit.com
u/Green_223 — 4 days ago
▲ 20 r/vulkan+1 crossposts

Hey Guys I have been working on my Game Engine for almost 5 years, and this is the second episode in the series where I go over how i added lighting, check it out its really interesting!!

youtu.be
u/ValousN — 4 days ago
▲ 4 r/vulkan

Huge performance drop when enabling TASK/MESH shader pipeline statistics queries (Vulkan)

I'm working on a fully GPU-driven Vulkan renderer using mesh shaders and vkCmdDrawMeshTasksIndirectCountEXT.

I wanted to collect some frame statistics with a VK_QUERY_TYPE_PIPELINE_STATISTICS query pool. The classic statistics (fragment, clipping, etc.) work fine and have basically no measurable overhead.

However, as soon as I enable:

VK_QUERY_PIPELINE_STATISTIC_TASK_SHADER_INVOCATIONS_BIT_EXT
VK_QUERY_PIPELINE_STATISTIC_MESH_SHADER_INVOCATIONS_BIT_EXT

GPU performance tanks.

Without these counters my frame is around 1–1.5 ms. With them enabled, more complex scenes jump to ~80 ms.

It seems to scale with the amount of work done by the task/mesh shaders more visible objects means more task/mesh shader invocations, and the performance degradation becomes much worse.

My main question is: is this expected? Do these invocation counters force the driver onto some slower path or disable optimizations to guarantee accurate statistics?

I'm mostly interested in whether this is a known limitation of the extension or an NVIDIA driver behavior.

I could easily implement my own counters using atomics/subgroup operations in the shaders, so I have a workaround. I just assumed the built-in pipeline statistics would be the cleaner solution.

System:

  • RTX 4060
  • Windows 11
  • NVIDIA Driver 610.62
  • Vulkan SDK 1.4.350.1

 

Has anyone else seen this?

reddit.com
u/MortixTheGuy — 4 days ago
▲ 58 r/vulkan+2 crossposts

Reverse-Z is the perfect hack

I shelved a Reverse-Z branch in my engine (stuck on OpenGL 4.1 for macOS, no glClipControl), and the roadblock sent me down the rabbit hole of actually understanding why it works instead of just how to implement it.

I ended up writing about what I learned with interactive graphs and all:
https://www.shlom.dev/articles/reverse-z-perfect-hack/

Happy to hear where I got things wrong or imprecise.

Hopefully this helps someone else :)

reddit.com
u/shlomnissan — 6 days ago
▲ 0 r/vulkan+1 crossposts

I Use AI for Graphics Programming. I Still Own the Code

I’m an older programmer who has loved real-time graphics and programming for decades. I’m not a superhero dev, and I’ve never worked solely as a graphics programmer, though I’d love to. My professional work tends to sit nearby: engine work, tooling, automation, build systems, dev ops, and general C++/game-tech-adjacent work.

But the goal has always been the same: keep learning and keep moving closer to real-time graphics.

Learning this stuff feels like the slow slog toward becoming a master wizard. There is always another layer: Vulkan, shaders, lighting, PBR, shadows, deferred rendering, ray tracing, GI, post-processing, GPU performance. There are always smarter and more educated people. That’s intimidating, but also part of the appeal.

I’m building a small C++ rendering portfolio project focused on Vulkan, renderer architecture, shaders, lighting, shadows, and eventually path tracing. I use ChatGPT as part of that process, but deliberately only through the browser. I don’t give AI direct access to my repo, editor, terminal, build system, or files. I manually copy small snippets, errors, questions, and design notes back and forth because I want to stay the Sapien in the middle.

https://preview.redd.it/dpprhhh9nqah1.jpg?width=1375&format=pjpg&auto=webp&s=dcca6997c9e4202c52903d631a3d387ef22270d3

For me, the point is not to outsource the work. It’s to accelerate learning while still owning the result. Often AI-suggested code gets reworked through discussion until it fits my project, matches my style, and most importantly: I understand it well enough to explain, debug, modify, and rewrite.

Reactions online seem very polarized. People either love AI or hate it. I think there’s a useful middle ground: have an AI usage policy, be transparent about it, and back it up with design notes, small commits, screenshots, RenderDoc notes, and explanations of what you actually validated yourself.

I’d love to see more people think about their own AI usage policy when sharing online work.

Does a transparent AI policy make you trust a graphics/programming portfolio more, or less?

p.s. AI was consulted on the creation of this post.

reddit.com
u/JJJams — 5 days ago
▲ 120 r/vulkan+2 crossposts

Part 2! - "No Graphics API" Vulkan Implementation

About 6 months ago I posted here about a prototype implementation I had made of the famous blog post by Sebastian Aaltonen. Back then the project was more of a proof of concept than anything else, and did not even support textures. The custom shading language compiler could only build very basic shaders.

Now the project is much more developed and mature, supporting nice features such as compute shaders, raytracing and indirect rendering. There are even quite a few examples that show that you can make substantial things with relatively few lines of code (without giving up control).

Have a look if you're interested:
https://github.com/leotmp/no_gfx_api

u/No_Grapefruit1933 — 8 days ago
▲ 90 r/vulkan+2 crossposts

Multithreaded Game Engine - Midnight

Hi guys, I'm working on a very early-stage game engine built on top of a fairly optimized renderer. Here's a quick demo!

The furthest-along system I have at my disposal is a multithreaded task graph with work stealing (Chase-Lev, with slight modifications to minimize stealing) which currently supports the terrain streamer.

You can see the ultra low CPU profile at the end of the flight sim. While streaming terrain into existence I'm barely poking 5% utilization! The memory model is also constrained to wrap the necessary demand quite tight, and implements a demand-paging (reserve/commit) approach and both the Windows and Linux system calls are included to do so. Cache coherence is preserved aggressively. Performance first!

Other improvements I've made this year, in regards to better perf:

- "Bindless" descriptor indexing. No more binding descriptors per model draw

- Frame packet construction. Zero pipeline thrashing

- Compute skinning pipeline. Duh

The new MT and memory models are hands down the pride and joy of my achievements so far this year.

I'd like to implement MDI, but that may wait until further down the road, as I seem to have plenty of headroom for the task at hand. Thanks for peepin'

u/YoshiDzn — 8 days ago
▲ 54 r/vulkan+2 crossposts

Making progress with my hand-rolled C/Vulkan app!

  • Testing the first shaders (in love with the warp). Added support for interactive parameters adjustment. Exploring different ideas with the overall flow of the app looking to land on a fun and ergonomic experience
  • Now supporting MSDF font rendering and text input! Initially went the fixed-size font atlas baking route, but shortly realised I’d need much more flexibility, so here we go!
  • Histogram compute, pixel peeping and levels shader (as a node modifier) are now in place. Writing to atomic buckets across a full-res image and reading the result safely turned out to be a non-trivial synchronization problem
  • Added support for multi-input nodes to unlock blending, warping and all kinds of things to come
  • Runtime final output resolution switching is now possible, respecting the current 2D viewport zoom state (by a happy accident!)
  • Undo/redo history and copy-paste functionality are finally here making the testing process much more pleasant
u/niksonder — 7 days ago
▲ 19 r/vulkan

vulkan boolian

3d 객체의 boolian 기능 구현 - 모델링 프로그램의 기능을 순차적으로 개발 중

Implementation of boolian function of 3d object - The function of the modeling program is being developed sequentially.

vulkan + manifold + gltf + obj + imgui

https://youtu.be/gL9ipWG_3Z8?si=KtIdwh8E7vlkoBZD

u/innolot — 6 days ago
▲ 19 r/vulkan

Streamlining Resource Binding with End-to-End Support for Vulkan Descriptor Heaps

This blog from NVIDIA describes the new descriptor heap feature in Vulkan that refactors resource binding from the ground up, addressing long-standing user feedback to streamline and bring greater parity to how it works in Direct3D 12 (D3D12). This post highlights what descriptor heaps add, how they compare to descriptor sets, and how to get started.

https://developer.nvidia.com/blog/streamlining-resource-binding-with-end-to-end-support-for-vulkan-descriptor-heaps/

u/thekhronosgroup — 8 days ago
▲ 60 r/vulkan

After months of work, I finally built my own C++ game engine in Vulkan with a custom UI system (inspired by Minecraft)

Hey everyone,

After many months of development, I finally reached a point where I'm comfortable sharing my own game engine, Kingscraft.

The engine is written entirely in C++ and uses Vulkan for rendering. One of my goals was to build as much as possible myself rather than relying heavily on external frameworks, so it also includes a completely custom UI system.

Some of the features currently implemented:

  • Vulkan renderer
  • Fully asynchronous architecture
  • Custom UI framework
  • Runtime debug/editor mode
  • Visual UI editing and alignment tools
  • Interactive resizing and positioning of UI elements
  • Hot-reload friendly workflow
  • Minecraft-inspired design and aesthetics

My favorite feature so far is the Debug Editing Mode. By pressing F7, I can visually move and resize UI elements directly in-game, inspect their properties, and then copy those values back into the source code. It has made UI iteration dramatically faster and saved me countless hours of manually adjusting coordinates. Human beings somehow still manage to enjoy tweaking pixels for hours at a time.

The project is heavily inspired by Minecraft, but I'm also using it as a learning experience to better understand engine architecture, rendering, UI systems, and Vulkan itself.

I'm still actively developing it, so I'd love to hear any feedback, suggestions, or ideas from other developers.

Source Code: Github

u/FunInitial1304 — 9 days ago
▲ 31 r/vulkan+1 crossposts

Building a mobile path tracer for Android AR from scratch - no hardware RT, Mali G615 — looking for feedback

Hi,
I have been working on the mobile AR for android with vulkan compute without any hardware RT cores to support wide range of devices.

Managed to render the Stanford Dragon (1M triangles) in real AR with full resolution, no UI stalls, on a low-end Mali GPU( under 30ms of compute time on average).

Have done implemented GGX microfacet BRDF, daul camera reflection system with manual cube map building without any HDR support from ARcore.

The sdk foot print is 700KB.

Would really apperiate the feedback on the rendering quality and insight on how to improve the quality for the same.

u/Temporary_Accident53 — 9 days ago
▲ 0 r/vulkan

Help debugging shadps4 GOW3 remastered corrupted textures

These are some dumped textures in GOW3 remastered running on shadps4. I know this is a long shot but I can't for the life of me find what the hell is happening. Would appreciate any guidence on how to debug this. Thanks!

u/ElTutz — 7 days ago
▲ 6 r/vulkan

pipelinebarriers what all commands they affect

I had a question, what all commands do pipeline bariers affect.
so if we have a command buffer

cmd1 cmd2 bar1 cmd3 cmd4 bar2 cmd5 cmd6

so can bar1 apply its synchronization scopes to cmd5 and cmd6??
and can bar2 apply its synchronizationscopes to cmd1 and cmd2??

I know that if the barrier is in a subpass of a renderpass then its scope of synchronization will not extend beyond the bounds of that subpass.

also why do we even need renderpasses when we have pipeline barriers?
are renderpasses more optimized in cache control

reddit.com
u/Hot_Refuse_4751 — 9 days ago