diff options
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 6 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_node_graph.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_interface.cc | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 08d2779043e..b051d4fe59a 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -111,11 +111,11 @@ static GPUPass *gpu_pass_cache_resolve_collision(GPUPass *pass, BLI_spin_lock(&pass_cache_spin); /* Collision, need to strcmp the whole shader. */ for (; pass && (pass->hash == hash); pass = pass->next) { - if ((defs != NULL) && (strcmp(pass->defines, defs) != 0)) { /* Pass */ + if ((defs != NULL) && (!STREQ(pass->defines, defs))) { /* Pass */ } - else if ((geom != NULL) && (strcmp(pass->geometrycode, geom) != 0)) { /* Pass */ + else if ((geom != NULL) && (!STREQ(pass->geometrycode, geom))) { /* Pass */ } - else if ((strcmp(pass->fragmentcode, frag) == 0) && (strcmp(pass->vertexcode, vert) == 0)) { + else if ((!STREQ(pass->fragmentcode, frag) == 0) && (STREQ(pass->vertexcode, vert))) { BLI_spin_unlock(&pass_cache_spin); return pass; } diff --git a/source/blender/gpu/intern/gpu_node_graph.c b/source/blender/gpu/intern/gpu_node_graph.c index 17d97dc05e2..81cf2d69f4d 100644 --- a/source/blender/gpu/intern/gpu_node_graph.c +++ b/source/blender/gpu/intern/gpu_node_graph.c @@ -457,10 +457,10 @@ GPUNodeLink *GPU_volume_grid(GPUMaterial *mat, const char *name) /* Two special cases, where we adjust the output values of smoke grids to * bring the into standard range without having to modify the grid values. */ - if (strcmp(name, "color") == 0) { + if (STREQ(name, "color")) { GPU_link(mat, "node_attribute_volume_color", link, transform_link, &link); } - else if (strcmp(name, "temperature") == 0) { + else if (STREQ(name, "temperature")) { GPU_link(mat, "node_attribute_volume_temperature", link, transform_link, &link); } else { diff --git a/source/blender/gpu/intern/gpu_shader_interface.cc b/source/blender/gpu/intern/gpu_shader_interface.cc index 50cc68c6be8..4511d4a199d 100644 --- a/source/blender/gpu/intern/gpu_shader_interface.cc +++ b/source/blender/gpu/intern/gpu_shader_interface.cc @@ -111,7 +111,7 @@ static const char *BuiltinUniformBlock_name(GPUUniformBlockBuiltin u) GPU_INLINE bool match(const char *a, const char *b) { - return strcmp(a, b) == 0; + return STREQ(a, b); } GPU_INLINE uint hash_string(const char *str) |