Commit 2fa2147f by Yizhou Jiang Committed by Commit Bot

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/1319251Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJiajia Qin <jiajia.qin@intel.com> Commit-Queue: Yizhou Jiang <yizhou.jiang@intel.com>
parent d856ca48
......@@ -3401,7 +3401,7 @@ void Context::updateCaps()
// 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 @@ void Context::updateCaps()
}
// 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
......
......@@ -1629,6 +1629,7 @@ void GenerateCaps(ID3D11Device *device,
(extensions->multiview && extensions->textureStorageMultisample2DArray);
extensions->copyTexture3d = true;
extensions->textureBorderClamp = true;
extensions->textureMultisample = true;
// D3D11 Feature Level 10_0+ uses SV_IsFrontFace in HLSL to emulate gl_FrontFacing.
// D3D11 Feature Level 9_3 doesn't support SV_IsFrontFace, and has no equivalent, so can't
......
......@@ -414,7 +414,6 @@ TEST_P(TextureMultisampleTest, CheckSamplePositions)
// Test textureSize and texelFetch when using ANGLE_texture_multisample extension
TEST_P(TextureMultisampleTest, SimpleTexelFetch)
{
ANGLE_SKIP_TEST_IF(IsD3D11());
ANGLE_SKIP_TEST_IF(!ensureExtensionEnabled("GL_ANGLE_texture_multisample"));
ANGLE_GL_PROGRAM(texelFetchProgram, essl3_shaders::vs::Passthrough(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment