The goal of this task is to compile each static shader.
It uses shaderc that is part of the VulkanSDK.
Current state is that all shaders fail as the create info source generation isn't completed. But at least we get a nice error message.
```~ ~/blender-git/blender
************************************************************
*** Build Tue 29 Nov 2022 15:55:39 CET
************************************************************
[10/14] Generating shader_baked.hh
FAILED: source/blender/gpu/shader_baked.hh /Users/jeroen/blender-git/build_darwin/source/blender/gpu/shader_baked.hh
cd /Users/jeroen/blender-git/build_darwin/source/blender/gpu && /Users/jeroen/blender-git/build_darwin/bin/shader_builder /Users/jeroen/blender-git/build_darwin/source/blender/gpu/shader_baked.hh
objc[59394]: Class MVKBlockObserver is implemented in both /Users/jeroen/blender-git/lib/darwin_arm64/vulkan/MoltenVK/dylib/macOS/libMoltenVK.dylib (0x1027f2ea8) and /usr/local/lib/libMoltenVK.dylib (0x110b2aea8). One of the two will be used. Which one is undefined.
WARN (gpu.shader): eevee_hiz_debug vertex:
|
154 | #pragma once
|
| eevee_defines.hh:12:0: '#pragma once' : not implemented
WARN (gpu.shader): eevee_hiz_debug fragment:
|
154 | #pragma once
|
| eevee_defines.hh:12:0: '#pragma once' : not implemented
ERROR (gpu.shader): gpencil_antialiasing_stage_0 vertex:
|
741 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_antialiasing_stage_0 fragment:
|
743 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_antialiasing_stage_1 vertex:
|
742 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_antialiasing_stage_1 fragment:
|
744 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_antialiasing_stage_2 vertex:
|
750 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_antialiasing_stage_2 fragment:
|
753 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_manifold_no_caps vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): overlay_edit_gpencil_guide_point_clipped vertex:
|
1205 | gl_Position = point_world_to_ndc(pPosition);
|
| overlay_edit_gpencil_guide_vert.glsl:9:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_no_manifold_caps vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): overlay_outline_prepass_gpencil_clipped vertex:
|
1891 | vec4 ndc_x = point_world_to_ndc(wpos1 + ModelMatrix[0].xyz);
|
| common_gpencil_lib.glsl:256:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpencil_geometry vertex:
|
1600 | vec4 ndc_x = point_world_to_ndc(wpos1 + ModelMatrix[0].xyz);
|
| common_gpencil_lib.glsl:256:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_no_manifold_no_caps vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_no_manifold_no_caps_debug vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): gpu_shader_3D_line_dashed_uniform_color_clipped vertex:
|
304 | world_clip_planes_calc_clip_distance((ModelMatrix * pos_4d).xyz);
|
| gpu_shader_3D_line_dashed_uniform_color_vert.glsl:16:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): overlay_outline_prepass_gpencil vertex:
|
1888 | vec4 ndc_x = point_world_to_ndc(wpos1 + ModelMatrix[0].xyz);
|
| common_gpencil_lib.glsl:256:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_pass_manifold_no_caps_debug vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): overlay_edit_gpencil_guide_point vertex:
|
1202 | gl_Position = point_world_to_ndc(pPosition);
|
| overlay_edit_gpencil_guide_vert.glsl:9:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_pass_no_manifold_no_caps vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_pass_no_manifold_no_caps_debug vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_0 vertex:
|
738 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_0 fragment:
|
740 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_1 vertex:
|
740 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_1 fragment:
|
742 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_no_manifold_caps_debug vertex:
|
892 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_2 vertex:
|
743 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_smaa_stage_2 fragment:
|
745 | offset[0] = mad(SMAA_RT_METRICS.xyxy, float4(-1.0, 0.0, 0.0, -1.0), texcoord.xyxy);
|
| common_smaa_lib.glsl:673:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_manifold_caps_debug vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_manifold_no_caps_debug vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_pass_manifold_no_caps vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
ERROR (gpu.shader): workbench_shadow_fail_manifold_caps vertex:
|
891 | vData.backPosition = point_object_to_ndc(pos + lightDirection * lightDistance);
|
| workbench_shadow_vert.glsl:8:0: Error: '' : syntax error, unexpected LEFT_PAREN, expecting IDENTIFIER
[mvk-error] VK_ERROR_INVALID_SHADER_NV: vkCreateShaderModule(): Shader module contains no shader code.
Compilation gpencil_antialiasing_stage_0 Failed
Compilation gpencil_antialiasing_stage_1 Failed
Compilation gpencil_antialiasing_stage_2 Failed
Compilation workbench_shadow_fail_manifold_no_caps Failed
Compilation overlay_edit_gpencil_guide_point_clipped Failed
Compilation workbench_shadow_fail_no_manifold_caps Failed
Compilation overlay_outline_prepass_gpencil_clipped Failed
Compilation gpencil_geometry Failed
Compilation workbench_shadow_fail_no_manifold_no_caps Failed
Compilation workbench_shadow_fail_no_manifold_no_caps_debug Failed
Compilation gpu_shader_3D_line_dashed_uniform_color_clipped Failed
Compilation overlay_outline_prepass_gpencil Failed
Compilation workbench_shadow_pass_manifold_no_caps_debug Failed
Compilation overlay_edit_gpencil_guide_point Failed
Compilation workbench_shadow_pass_no_manifold_no_caps Failed
Compilation workbench_shadow_pass_no_manifold_no_caps_debug Failed
Compilation workbench_smaa_stage_0 Failed
Compilation workbench_smaa_stage_1 Failed
Compilation workbench_shadow_fail_no_manifold_caps_debug Failed
Compilation workbench_smaa_stage_2 Failed
Compilation workbench_shadow_fail_manifold_caps_debug Failed
Compilation workbench_shadow_fail_manifold_no_caps_debug Failed
Compilation workbench_shadow_pass_manifold_no_caps Failed
Compilation workbench_shadow_fail_manifold_caps Failed
Shader Test compilation result: 341 / 365 passed (skipped 116 for compatibility reasons)
Shader compilation failed for Vulkan backend
```
It is still work in progress next topics should still be
taken care of:
[ ] Generate additional sources from ShaderCreateInfo.
[ ] Link shaders modules to a final shader.
[ ] Remove the temp hack to ignore the GPU_batch_init.
[x] Improve log parsing to include the correct filename.