Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 1925093002: Handle compressed textures allocated via TexStorage2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move IsCompressedTextureFormat into GLES2Decoder. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 78c2559925e0c2cfe58f10f03c33338a4d299438..0b1561c24157fc57e00cb9b0d8ae3a089bcf7168 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -780,7 +780,8 @@ bool WebGL2RenderingContextBase::validateTexStorage(const char* functionName, GL
return false;
}
- if (m_supportedInternalFormatsStorage.find(internalformat) == m_supportedInternalFormatsStorage.end()) {
+ if (m_supportedInternalFormatsStorage.find(internalformat) == m_supportedInternalFormatsStorage.end()
+ && (functionType == TexStorageType2D && !m_compressedTextureFormats.contains(internalformat))) {
synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid internalformat");
return false;
}

Powered by Google App Engine
This is Rietveld 408576698