mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869703 - Fix failure to retrieve uniform. r=jgilbert
This commit is contained in:
parent
dd8e29cc29
commit
9a36d271ff
@ -65,6 +65,18 @@ WebGLProgram::UpdateInfo()
|
||||
}
|
||||
}
|
||||
|
||||
if (!mUniformInfoMap) {
|
||||
mUniformInfoMap = new CStringToUniformInfoMap;
|
||||
mUniformInfoMap->Init();
|
||||
for (size_t i = 0; i < mAttachedShaders.Length(); i++) {
|
||||
for (size_t j = 0; j < mAttachedShaders[i]->mUniforms.Length(); j++) {
|
||||
const WebGLMappedIdentifier& uniform = mAttachedShaders[i]->mUniforms[j];
|
||||
const WebGLUniformInfo& info = mAttachedShaders[i]->mUniformInfos[j];
|
||||
mUniformInfoMap->Put(uniform.mapped, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -224,19 +224,6 @@ WebGLProgram::ReverseMapIdentifier(const nsACString& name, nsCString *reverseMap
|
||||
|
||||
WebGLUniformInfo
|
||||
WebGLProgram::GetUniformInfoForMappedIdentifier(const nsACString& name) {
|
||||
if (!mUniformInfoMap) {
|
||||
// if the identifier-to-array-size map doesn't exist yet, build it now
|
||||
mUniformInfoMap = new CStringToUniformInfoMap;
|
||||
mUniformInfoMap->Init();
|
||||
for (size_t i = 0; i < mAttachedShaders.Length(); i++) {
|
||||
for (size_t j = 0; j < mAttachedShaders[i]->mUniforms.Length(); j++) {
|
||||
const WebGLMappedIdentifier& uniform = mAttachedShaders[i]->mUniforms[j];
|
||||
const WebGLUniformInfo& info = mAttachedShaders[i]->mUniformInfos[j];
|
||||
mUniformInfoMap->Put(uniform.mapped, info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsCString mutableName(name);
|
||||
nsCString bracketPart;
|
||||
bool hadBracketPart = SplitLastSquareBracket(mutableName, bracketPart);
|
||||
|
Loading…
Reference in New Issue
Block a user