Cycles: Make MESA compiler more happy

While this compiler is not officially supported yet, getting it to work is
a nice thing because more and more AMD cards will fall under MESA driver.

It's also nice to use explicit comparison with NULL, which makes it more
clear whether variable is a boolean or pointer. Even Rust enforces this!

Patch by Ian Bruce with own modifications.
This commit is contained in:
Sergey Sharybin
2017-03-13 09:55:18 +01:00
parent e8021f5e3b
commit 8794a43b68
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ ccl_device_inline ShaderClosure *bsdf_alloc(ShaderData *sd, int size, float3 wei
{
ShaderClosure *sc = closure_alloc(sd, size, CLOSURE_NONE_ID, weight);
if(!sc)
if(sc == NULL)
return NULL;
float sample_weight = fabsf(average(weight));