diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 8be4c178a75..63105fa96e2 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1978,14 +1978,14 @@ void GPU_pass_compile(GPUPass *pass, const char *shname) } pass->shader = NULL; } - pass->compiled = true; - - if (!BLI_thread_is_main()) { + else if (!BLI_thread_is_main()) { /* For some drivers, you must use the program at least once in the * rendering context that it is created. */ glUseProgram(GPU_shader_get_program(pass->shader)); glUseProgram(0); } + + pass->compiled = true; } } |