Bug 1248580 - handle gl.UniformMatrixXfv() function uploading element size. r=jgilbert

This commit is contained in:
JerryShih 2016-05-25 13:50:57 +02:00
Родитель e440e9dd9a
Коммит 84beb03ee4
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -530,9 +530,11 @@ WebGLContext::ValidateUniformMatrixArraySetter(WebGLUniformLocation* loc,
if (!ValidateUniformMatrixTranspose(setterTranspose, funcName)) if (!ValidateUniformMatrixTranspose(setterTranspose, funcName))
return false; return false;
MOZ_ASSERT(loc->mActiveInfo->mElemCount > loc->mArrayIndex);
size_t uniformElemCount = loc->mActiveInfo->mElemCount - loc->mArrayIndex;
*out_rawLoc = loc->mLoc; *out_rawLoc = loc->mLoc;
*out_numElementsToUpload = std::min((size_t)loc->mActiveInfo->mElemCount, *out_numElementsToUpload = std::min(uniformElemCount, setterArraySize / setterElemSize);
setterArraySize / setterElemSize);
return true; return true;
} }