diff --git a/intern/gawain/src/shader_interface.c b/intern/gawain/src/shader_interface.c index f0da342f088..4c9f7fae67f 100644 --- a/intern/gawain/src/shader_interface.c +++ b/intern/gawain/src/shader_interface.c @@ -288,6 +288,7 @@ const ShaderInput* ShaderInterface_attrib(const ShaderInterface* shaderface, con { // attribs are stored after uniforms const uint32_t input_ct = shaderface->uniform_ct + shaderface->attrib_ct; + const unsigned name_hash = hash_string(name); for (uint32_t i = shaderface->uniform_ct; i < input_ct; ++i) { const ShaderInput* attrib = shaderface->inputs + i; @@ -296,6 +297,8 @@ const ShaderInput* ShaderInterface_attrib(const ShaderInterface* shaderface, con if (attrib->name == NULL) continue; #endif + if (attrib->name_hash != name_hash) continue; + if (match(attrib->name, name)) return attrib; }