AnKi’s GPU memory management system was introduced alongside Vulkan nine years ago, but the transition to GPU-driven rendering and the introduction of a render-graph fundamentally changed the way GPU memory is handled. In this blog post we will look at how the system evolved over the years and as a bonus compare memory statistics across Continue reading "GPU memory management in AnKi"
AnKi has had ray-tracing support for quite some time. Beyond managing acceleration structures, the engine uses VK_KHR_ray_tracing_pipeline/DXR 1.0 for shadows (soon deprecated), indirect diffuse, and indirect specular. Upon initialization, the engine reads pre-compiled shader binary blobs and creates ray-tracing pipelines containing a number of ray-generation shaders, one or more miss shaders, and…
One of the challenges of low level APIs such as Vulkan and D3D12 is synchronization of GPU work. The most used primitive in GPU synchronization is pipeline barriers and if someone takes a look at vkCmdPipelineBarrier or ID3D12GraphicsCommandList::ResourceBarrier/Barrier it s easy to understand why many people struggle. In this article we will decompose the barriers and Continue reading "Simplified…
This time I decided to would try something different and do a video presentation instead of a blog post. There were a lot of things to cover and a video presentation seemed better. Anyway, here is the video: And here the link the the presentation: https://docs.google.com/presentation/d/1tsGjwZmP2mZBNyURNN4-XYsgJxfsG6omaC3w5ZQXzr4/edit#slide=id.g2155b36a3d3_0_0
TL;DR: If using per-primitive in/out in mesh shaders in Vulkan and in HLSL/DXC you need to manually decorate variables and struct members using SPIR-V intrinsics. See how at the bottom. This is going to be a quick post to raise awareness to a difficult to track bug with mesh shaders in Vulkan when using HLSL. Continue reading "Workarounds for issues with mesh shaders + Vulkan + HLSL"
SPIR-V is a binary language that describes the GPU shader code for the Vulkan and OpenCL APIs. For most graphics programmers SPIR-V is a completely opaque binary blob that they don t have to touch or know much about. Someone can use their preferred compiler to translate GLSL or HLSL to SPIR-V, can use SPIRV-Tools to Continue reading "Parsing and rewriting SPIR-V"
For the last few months AnKi underwent a heavy re-write in order to enable GPU driven rendering. This post will quickly go through the changes and the design without diving too deep into details. There will be another post (or maybe video) with all the implementation details. What is GPU driven rendering (GDR from now Continue reading "GPU driven rendering in AnKi: A high level overview"
AnKi always had its shaders written in GLSL because it started as an OpenGL engine. Recently I decided to start rewriting them from GLSL to HLSL with one of the main motivations being that GLSL, as a language, has stopped evolving and it s missing modern features. Sure, there are new extensions added to GLSL all Continue reading "Random thoughts after moving from GLSL to HLSL"
I think it was 8 or 9 years ago when AnKi was first ported to Android for a demo competition and I remember the process being quite painful. Building native projects for Android was a hack, the micro differences between OpenGL ES and desktop OpenGL required compromises, GLSL related issues were a constant pain (compilation Continue reading "Porting AnKi to Android again after ~8 years"
Some days ago I was trying to use the debugPrintf functionality that was introduced to Vulkan and adjacent projects more than a year ago. Since I haven t found (or maybe I missed it) a good online document that describes all the steps to enable such functionality programmatically, I thought it might be a good idea Continue reading "How to use debugPrintf in Vulkan"