SaschaWillems / Vulkan

C++ examples for the Vulkan graphics API
MIT License
10.34k stars 2.03k forks source link

Add CMake shader compilation #1132

Closed joshohagan closed 3 months ago

joshohagan commented 5 months ago

The problems with the current shader compilation are:

This MR addresses these issues by cherry-picking the cmake shader compilation commit from the "cmake_shaders" branch.

P.S. Please accept this ASAP Sascha, it is a really annoying issue for people like me who want to compile shaders in your repository for my job.

Also don't forget to delete the "cmake_shaders" branch once this MR is accepted.

SaschaWillems commented 5 months ago

P.S. Please accept this ASAP Sascha, it is a really annoying issue for people like me who want to compile shaders in your repository for my job.

Please remember that I'm doing all this in my spare time, and I don't like to be pressured. Reviewing might take some time and currently I can't promise that I'm going to merge this. I use different means of compiling shaders. And out of curiosity: What job does you require to compile my samples? Are you working for an IHV?

joshohagan commented 5 months ago

Hi Sascha,

Sorry, I didn't mean to pressure you. I didn't realize that you are doing this in your spare time, so that's fair enough that you don't want to have to work on the repository very often. On second thoughts, this isn't very urgent anyway as if people need to compile shaders they can download my forked repo.

For needing the shaders for my job, I was referring to my game dev company wanting to compile the shaders to play around with the code, but on second thoughts that information isn't very relevant.

joshohagan commented 3 weeks ago

Hi Sascha,

Sorry for the VERY late reply, I missed the notification for this and will check my notifications from now on.

I read your comment about not wanting CMake shader compilation in case people do not have dxc/glslang, and I agree. I think the best solution is for people to use the compile shaders script, which you fixed in a recent issue. If programmers want the compilation to be faster, they can always modify the script to only compile shaders when the file has been changed.