diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.cc | 16 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_shader.cc | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc index aef1984687d..0d26f17ede5 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.cc +++ b/source/blender/gpu/intern/gpu_shader_create_info.cc @@ -264,9 +264,14 @@ bool gpu_shader_create_info_compile_all() { using namespace blender::gpu; int success = 0; + int skipped = 0; int total = 0; for (ShaderCreateInfo *info : g_create_infos->values()) { if (info->do_static_compilation_) { + if (GPU_compute_shader_support() == false && info->compute_source_ != nullptr) { + skipped++; + continue; + } total++; GPUShader *shader = GPU_shader_create_from_info( reinterpret_cast<const GPUShaderCreateInfo *>(info)); @@ -322,12 +327,11 @@ bool gpu_shader_create_info_compile_all() GPU_shader_free(shader); } } - printf("===============================\n"); - printf("Shader Test compilation result: \n"); - printf("%d Total\n", total); - printf("%d Passed\n", success); - printf("%d Failed\n", total - success); - printf("===============================\n"); + printf("Shader Test compilation result: %d / %d passed", success, total); + if (skipped > 0) { + printf(" (skipped %d for compatibility reasons)", skipped); + } + printf("\n"); return success == total; } diff --git a/source/blender/gpu/opengl/gl_shader.cc b/source/blender/gpu/opengl/gl_shader.cc index 5a55a2e8020..71428633d79 100644 --- a/source/blender/gpu/opengl/gl_shader.cc +++ b/source/blender/gpu/opengl/gl_shader.cc @@ -868,7 +868,7 @@ GLuint GLShader::create_shader_stage(GLenum gl_stage, MutableSpan<const char *> { GLuint shader = glCreateShader(gl_stage); if (shader == 0) { - fprintf(stderr, "GLShader: Error: Could not create shader object."); + fprintf(stderr, "GLShader: Error: Could not create shader object.\n"); return 0; } |