Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-08-08 13:18:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-08-08 22:26:49 +0300
commit26d46d00cfa73efe8e434796634dd23e76abbf19 (patch)
treee9e24ee995ed04f8eb90d2a6aaa050b5ea82b434 /source
parent82352565b79d1abb3b6f513bf186c1b3d80e8f0c (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c5
1 files changed, 2 insertions, 3 deletions
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(