GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
[blender.git] / source / blender / gpu / intern / gpu_shader_interface.c
index d46fc979363249a00dcccde8f3b6cf30dd064fab..7522c92eb93cfba1ff15ab600c6ff09e4da51f30 100644 (file)
@@ -310,9 +310,14 @@ void GPU_shaderinterface_discard(GPUShaderInterface *shaderface)
 }
 
 const GPUShaderInput *GPU_shaderinterface_uniform(const GPUShaderInterface *shaderface, const char *name)
+{
+       return buckets_lookup(shaderface->uniform_buckets, shaderface->name_buffer, name);
+}
+
+const GPUShaderInput *GPU_shaderinterface_uniform_ensure(const GPUShaderInterface *shaderface, const char *name)
 {
        /* TODO: Warn if we find a matching builtin, since these can be looked up much quicker. */
-       const GPUShaderInput *input = buckets_lookup(shaderface->uniform_buckets, shaderface->name_buffer, name);
+       const GPUShaderInput *input = GPU_shaderinterface_uniform(shaderface, name);
        /* If input is not found add it so it's found next time. */
        if (input == NULL) {
                input = add_uniform((GPUShaderInterface *)shaderface, name);