[GSoC 2026] DCompute Vulkan Backend

FinalEvilution FinalEvilution at gmail.com
Sun Aug 23 08:02:43 UTC 2026


On Friday, 21 August 2026 at 16:37:45 UTC, Quang Ha wrote:
>
> ### My GSoC Progress: Fixing LLVM and Running Vulkan Compute! 🚀
>
> First of all, I want to sincerely apologize to FinalEvilution 
> and everyone for the long silence. I have been deep in the 
> debugging trenches for a while, but I am finally back with the 
> ultimate update!

Don't worry about it. I figured you were busy and i didn't take 
any offense,
and I'm sure everyone else feels the same.

> To answer FinalEvilution's question: *"Interesting. What's the 
> bug? If you don't mind me asking."* — The short answer is that 
> the LLVM SPIR-V Backend was creating an invalid instruction 
> when compiling shaders for Vulkan. You can find the full 
> technical details of how I fixed this in the LLVM section below!

Even the experts over at LLVM get it wrong sometimes. I have my 
own (unrelated) LLVM bug
i need to create an issue for.

I tried building your LLVM pr but it failed with.
```
llvm-project/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp:945:40: error: ‘SrcTy’ was not declared in this scope; did you mean ‘STy’?
   945 |   if (auto *STy = dyn_cast<StructType>(SrcTy)) {
       |                                        ^~~~~
       |                                        STy
```
Is there perhaps a commit that hasn't been pushed to the repo yet?
Ps. You left a little vietnamese in 
llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp:233


I also took a look at the ldc pr and i was able to build it and 
one of the test kernels as well.
I don't have a vulkan test environment setup yet, but i have a 
cuda project i would like to port
to D and i think that it could be a good exercise.

The only issue i was able to find were that a build without 
vulkan support (LLVM 22) prints
```
Error: LDC was not built with Vulkan DCompute support.
Error: Unrecognised or invalid DCompute targets: the format is 
ocl-xy0 for OpenCl x.y and cuda-xy0 for CUDA CC x.y, and 
vulkan-xy0 for Vulkan. Valid version strings for OpenCl are 
ocl-{100, 110, 120, 200, 210, 220}. Valid version strings for 
Vulkan are vulkan-{VULKAN_VALID_VER_INIT}.
```

> Now, onto the best news: the project is successfully done! I am 
> just waiting for the final reviews and merges to officially 
> wrap up GSoC. After this, my next big stop is DConf 2026!

Congratulations on your success!
Figuring out both LLVM and SPIR-V is no small feat!

> #### 🎯 Plans for Next Week (and Beyond)
> * Follow the LLVM pull request and reply to reviewers.
> * Fix the CI issue in the LDC repository.
> * Get ready for my upcoming online talk: "Vulkan Compute 
> Support in DCompute and LDC" at DConf 2026 this September!
> * Write more compute test cases in D for Vulkan.

Looking forward to the talk!




More information about the Digitalmars-d mailing list