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:
Jeff Muizelaar 2015-11-13 22:27:17 -05:00
Родитель 4a16f7fb9d
Коммит 154ffd6114
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -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;
}