GPU: Patch GPencil shader for metal support. #105114

Closed
Jeroen Bakker wants to merge 2 commits from Jeroen-Bakker:gpencil-stroke-nogeom into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 3 additions and 1 deletions
Showing only changes of commit dbd57153be - Show all commits

View File

@ -7,6 +7,7 @@
#include "BLI_utildefines.h"
#include "GPU_capabilities.h"
#include "GPU_shader.h"
/* Cache of built-in shaders (each is created on first use). */
@ -84,7 +85,8 @@ static const char *builtin_shader_create_info_name(eGPUBuiltinShader shader)
case GPU_SHADER_2D_NODELINK_INST:
return "gpu_shader_2D_nodelink_inst";
case GPU_SHADER_GPENCIL_STROKE:
return "gpu_shader_gpencil_stroke";
return GPU_geometry_shader_support() ? "gpu_shader_gpencil_stroke_geom" :
"gpu_shader_gpencil_stroke_nogeom";
default:
BLI_assert_unreachable();
return "";