Enable texture multisample extension on ES3 D3D
Update maxIntegerSamples, maxDepthTextureSamples and maxColorTextureSamples
if the extension is enabled on ES 3.0.
TEST=TextureMultisampleTest.*
TEST=NegativeTextureMultisampleTest.Negtive*
BUG=angleproject:2275
Change-Id: I8c215f990ff5d93611b1bc89de9a43f3d392e8d4
Reviewed-on: https://chromium-review.googlesource.com/c/1319251
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jiajia Qin <jiajia.qin@intel.com>
Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 686271f..8cc8774 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3401,7 +3401,7 @@
// OpenGL ES does not support multisampling with non-rendererable formats
// OpenGL ES 3.0 or prior does not support multisampling with integer formats
if (!formatCaps.renderbuffer ||
- (getClientVersion() < ES_3_1 &&
+ (getClientVersion() < ES_3_1 && !mSupportedExtensions.textureMultisample &&
(formatInfo.componentType == GL_INT || formatInfo.componentType == GL_UNSIGNED_INT)))
{
formatCaps.sampleCounts.clear();
@@ -3423,7 +3423,7 @@
}
// Handle GLES 3.1 MAX_*_SAMPLES values similarly to MAX_SAMPLES.
- if (getClientVersion() >= ES_3_1)
+ if (getClientVersion() >= ES_3_1 || mSupportedExtensions.textureMultisample)
{
// GLES 3.1 section 9.2.5: "Implementations must support creation of renderbuffers
// in these required formats with up to the value of MAX_SAMPLES multisamples, with