Bug 1316544 - Fix conformance test fail in texture-image-webgl-specific r=jgilbert

This commit is contained in:
Chih-Yi Leu 2016-11-17 21:22:00 +01:00
Родитель 5509eabfe1
Коммит 3988aaaef5
2 изменённых файлов: 4 добавлений и 3 удалений

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

@ -249,7 +249,7 @@ protected:
GLint zOffset, uint32_t width, uint32_t height,
uint32_t depth,
WebGLTexture::ImageInfo** const out_imageInfo);
bool ValidateCopyTexImageForFeedback(const char* funcName, uint32_t level) const;
bool ValidateCopyTexImageForFeedback(const char* funcName, uint32_t level, GLint layer = 0) const;
bool ValidateUnpack(const char* funcName, const webgl::TexUnpackBlob* blob,
bool isFunc3D, const webgl::PackingInfo& srcPI) const;

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

@ -1918,7 +1918,7 @@ ValidateCopyDestUsage(const char* funcName, WebGLContext* webgl,
}
bool
WebGLTexture::ValidateCopyTexImageForFeedback(const char* funcName, uint32_t level) const
WebGLTexture::ValidateCopyTexImageForFeedback(const char* funcName, uint32_t level, GLint layer) const
{
const auto& fb = mContext->mBoundReadFramebuffer;
if (fb) {
@ -1926,6 +1926,7 @@ WebGLTexture::ValidateCopyTexImageForFeedback(const char* funcName, uint32_t lev
MOZ_ASSERT(attach);
if (attach->Texture() == this &&
attach->Layer() == layer &&
uint32_t(attach->MipLevel()) == level)
{
// Note that the TexImageTargets *don't* have to match for this to be
@ -2116,7 +2117,7 @@ WebGLTexture::CopyTexSubImage(const char* funcName, TexImageTarget target, GLint
return;
auto srcFormat = srcUsage->format;
if (!ValidateCopyTexImageForFeedback(funcName, level))
if (!ValidateCopyTexImageForFeedback(funcName, level, zOffset))
return;
////////////////////////////////////