зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1248580 - handle gl.UniformMatrixXfv() function uploading element size. r=jgilbert
This commit is contained in:
Родитель
e440e9dd9a
Коммит
84beb03ee4
|
@ -530,9 +530,11 @@ WebGLContext::ValidateUniformMatrixArraySetter(WebGLUniformLocation* loc,
|
|||
if (!ValidateUniformMatrixTranspose(setterTranspose, funcName))
|
||||
return false;
|
||||
|
||||
MOZ_ASSERT(loc->mActiveInfo->mElemCount > loc->mArrayIndex);
|
||||
size_t uniformElemCount = loc->mActiveInfo->mElemCount - loc->mArrayIndex;
|
||||
*out_rawLoc = loc->mLoc;
|
||||
*out_numElementsToUpload = std::min((size_t)loc->mActiveInfo->mElemCount,
|
||||
setterArraySize / setterElemSize);
|
||||
*out_numElementsToUpload = std::min(uniformElemCount, setterArraySize / setterElemSize);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче