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.
This commit is contained in:
Clément Foucault 2018-08-08 12:18:02 +02:00
parent 82352565b7
commit 26d46d00cf
1 changed files with 2 additions and 3 deletions

View File

@ -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(