mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 15:32:15 -05:00
Fix: GPU: Compiling python gpu shaders
Compiling of graphics shaders via gpu crashed. The vulkan backend found a compute source and continued the evaluation as if it was a compute shader. The compute source was added by the preprocessor that wraps the shader source. Even empty sources were wrapped. Detection based on empty shader sources failed. This is not a Vulkan only issue as other platforms would have similar issues when creating a compute shader. Pull Request: https://projects.blender.org/blender/blender/pulls/133036
This commit is contained in:
parent
8a199dc77f
commit
9091085277
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ GPUShader *GPU_shader_create_from_info(const GPUShaderCreateInfo *_info)
|
|||
|
||||
static std::string preprocess_source(StringRefNull original)
|
||||
{
|
||||
if (original.is_empty()) {
|
||||
return original;
|
||||
}
|
||||
gpu::shader::Preprocessor processor;
|
||||
return processor.process(original);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue