Key the format tables on internal format and type.
Keying the format tables on internal format alone is not enough to fully
validate the unsized formats which require additional type information.
This CL has no functional changes, it just splits the tables and updates
the calls to GetInternalFormat info to provide type information when the
format is not sized.
BUG=angleproject:1523
BUG=angleproject:1958
BUG=angleproject:1228
Change-Id: I37e5201e7f54fa8eca01b8a6e64b11a6b94484e7
Reviewed-on: https://chromium-review.googlesource.com/468449
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index f599b07..d44ea66 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2637,10 +2637,10 @@
for (auto capsIt : mImplementation->getNativeTextureCaps())
{
- GLenum format = capsIt.first;
+ GLenum sizedInternalFormat = capsIt.first;
TextureCaps formatCaps = capsIt.second;
- const InternalFormat &formatInfo = GetInternalFormatInfo(format);
+ const InternalFormat &formatInfo = GetSizedInternalFormatInfo(sizedInternalFormat);
// Update the format caps based on the client version and extensions.
// Caps are AND'd with the renderer caps because some core formats are still unsupported in
@@ -2663,10 +2663,10 @@
if (formatCaps.texturable && formatInfo.compressed)
{
- mCaps.compressedTextureFormats.push_back(format);
+ mCaps.compressedTextureFormats.push_back(sizedInternalFormat);
}
- mTextureCaps.insert(format, formatCaps);
+ mTextureCaps.insert(sizedInternalFormat, formatCaps);
}
}