зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1215296. Map uniforms from blocks. r=jgilbert
Uniforms from uniform blocks don't show up in the result of ShGetUniforms. We need to use ShGetInterfaceBlocks instead.
This commit is contained in:
Родитель
4a16f7fb9d
Коммит
154ffd6114
|
@ -392,6 +392,18 @@ ShaderValidator::FindUniformByMappedName(const std::string& mappedName,
|
|||
return true;
|
||||
}
|
||||
|
||||
const std::vector<sh::InterfaceBlock>& interfaces = *ShGetInterfaceBlocks(mHandle);
|
||||
for (const auto& interface : interfaces) {
|
||||
for (const auto& field : interface.fields) {
|
||||
const sh::ShaderVariable* found;
|
||||
|
||||
if (!field.findInfoByMappedName(mappedName, &found, out_userName))
|
||||
continue;
|
||||
|
||||
*out_isArray = found->isArray();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче