How to fix GPU dependencies?

Hi,

I added 2 new .glsl files namely gpu_shader_material_voronoi.glsl and gpu_shader_material_fractal_voronoi.glsl to the directory \blender\source\blender\gpu\shaders\material.
Both are needed in gpu_shader_material_tex_voronoi.glsl so I used #pragma BLENDER_REQUIRE(gpu_shader_material_voronoi.glsl) and #pragma BLENDER_REQUIRE(gpu_shader_material_fractal_voronoi.glsl) in there.
However when trying to run Blender I get a GPU dependency error.

These are the full build logs:
Build.txt (23.8 KB)
This is the full message that I get from the debug console:
Debug_Console.txt (19.6 KB)

I already tried using Build "INSTALL" in Visual Studio and rebuild.cmd in the build folder, but to no avail.
One thing I noticed after having added the 2 new files to the Blender.sln solution is that every time I run rebuild.cmd it for some reason kicks the new files out of the solution.

How do I fix this?

Make sure you add those new files to the actual CMake file:
blender\source\blender\gpu\CMakeLists.txt

Find the section there that adds the current 87 glsl files and insert your 2 at the proper location (the list is alphabetized)

Always add things to CMake instead of the VS solution. The VS solution is generated from CMake.

1 Like