[Bf-blender-cvs] [26d46d00cfa] blender2.8: GPUMaterial: Fix Material appear broken when using sliders to tweak props
Clément Foucault
noreply at git.blender.org
Wed Aug 8 21:37:57 CEST 2018
Commit: 26d46d00cfa73efe8e434796634dd23e76abbf19
Author: Clément Foucault
Date: Wed Aug 8 12:18:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB26d46d00cfa73efe8e434796634dd23e76abbf19
GPUMaterial: Fix Material appear broken when using sliders to tweak props
This was likely caused by some sort of race condition where the drawing
thread would request the state of the shader before the shader has been
compiled.
===================================================================
M source/blender/gpu/intern/gpu_codegen.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index c6cf0c55594..cc4b7cc8ebc 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1894,9 +1894,8 @@ void GPU_nodes_prune(ListBase *nodes, GPUNodeLink *outlink)
static bool gpu_pass_is_valid(GPUPass *pass)
{
- /* Shader is not null if compilation is successful,
- * refcount is positive if compilation as not yet been done. */
- return (pass->shader != NULL || pass->refcount > 0);
+ /* Shader is not null if compilation is successful. */
+ return (pass->compiled == false || pass->shader != NULL);
}
GPUPass *GPU_generate_pass_new(
More information about the Bf-blender-cvs
mailing list