Gawain: stricter lookup of builtin uniforms
UNIFORM_NONE should never match a valid uniform (builtin or custom). The logic for UNIFORM_CUSTOM was just wrong, since it returned the first custom uniform. This function should only accept builtin (non-custom) uniforms.
This commit is contained in:
parent
bb3e669d06
commit
179bb97740
|
@ -273,6 +273,11 @@ const ShaderInput* ShaderInterface_uniform(const ShaderInterface* shaderface, co
|
|||
|
||||
const ShaderInput* ShaderInterface_builtin_uniform(const ShaderInterface* shaderface, BuiltinUniform builtin)
|
||||
{
|
||||
#if TRUST_NO_ONE
|
||||
assert(builtin != UNIFORM_NONE);
|
||||
assert(builtin != UNIFORM_CUSTOM);
|
||||
#endif
|
||||
|
||||
// look up by enum, not name
|
||||
for (uint32_t i = 0; i < shaderface->uniform_ct; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue