Commit f410e81a by Geoff Lang Committed by Angle LUCI CQ

GL: Implement multisampled_render_to_texture

Bug: angleproject:2894, angleproject:5988 Change-Id: I17b55f0655d32d9f41cb55a0467b93a00fba751b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2841084 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent f97b8193
...@@ -549,6 +549,11 @@ struct FeaturesGL : FeatureSetBase ...@@ -549,6 +549,11 @@ struct FeaturesGL : FeatureSetBase
"Switching framebuffers without a flush can lead to " "Switching framebuffers without a flush can lead to "
"crashes on Intel 9th Generation GPU Macs.", "crashes on Intel 9th Generation GPU Macs.",
&members, "http://crbug.com/1181068"}; &members, "http://crbug.com/1181068"};
Feature disableMultisampledRenderToTexture = {
"disable_mutlisampled_render_to_texture", FeatureCategory::OpenGLWorkarounds,
"Many drivers have bugs when using GL_EXT_multisampled_render_to_texture", &members,
"http://anglebug.com/2894"};
}; };
inline FeaturesGL::FeaturesGL() = default; inline FeaturesGL::FeaturesGL() = default;
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"src/libANGLE/renderer/angle_format.py": "src/libANGLE/renderer/angle_format.py":
"74d6c9842128293118ccf128aeae896a", "74d6c9842128293118ccf128aeae896a",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp": "src/libANGLE/renderer/gl/DispatchTableGL_autogen.cpp":
"54a5c8b87d54114ee61a4c535931ea48", "06399dbfa161982f60b0af04e3cf9ffb",
"src/libANGLE/renderer/gl/DispatchTableGL_autogen.h": "src/libANGLE/renderer/gl/DispatchTableGL_autogen.h":
"e41b2685228feb5c20b5c1400837c055", "3115c293d6612d10498a1063b8cebe1a",
"src/libANGLE/renderer/gl/generate_gl_dispatch_table.py": "src/libANGLE/renderer/gl/generate_gl_dispatch_table.py":
"d133c757b44279ad205183c9c9c9b598", "d133c757b44279ad205183c9c9c9b598",
"src/libANGLE/renderer/gl/gl_bindings_data.json": "src/libANGLE/renderer/gl/gl_bindings_data.json":
"6f46f537e07b457850c060ef0c7b76c5", "6aa7c139ca0717d08e46bf86e1bf85a2",
"src/libANGLE/renderer/gl/null_functions.cpp": "src/libANGLE/renderer/gl/null_functions.cpp":
"8504f1659630d3b629029f8afd4acc28", "684b33717a2ac64b1fa415acc33896f9",
"src/libANGLE/renderer/gl/null_functions.h": "src/libANGLE/renderer/gl/null_functions.h":
"76931f9f5d0235a8ce16d15fa2443c65" "19352d6beb033161490c4b37918acf17"
} }
\ No newline at end of file
...@@ -994,6 +994,7 @@ void DispatchTableGL::initProcsDesktopGL(const gl::Version &version, ...@@ -994,6 +994,7 @@ void DispatchTableGL::initProcsDesktopGL(const gl::Version &version,
if (extensions.count("GL_EXT_framebuffer_multisample") != 0) if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
{ {
ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample); ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample);
ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisampleEXT);
} }
if (extensions.count("GL_EXT_framebuffer_object") != 0) if (extensions.count("GL_EXT_framebuffer_object") != 0)
...@@ -2037,7 +2038,9 @@ void DispatchTableGL::initProcsGLES(const gl::Version &version, ...@@ -2037,7 +2038,9 @@ void DispatchTableGL::initProcsGLES(const gl::Version &version,
if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0) if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0)
{ {
ASSIGN("glFramebufferTexture2DMultisampleEXT", framebufferTexture2DMultisampleEXT);
ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample); ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisample);
ASSIGN("glRenderbufferStorageMultisampleEXT", renderbufferStorageMultisampleEXT);
} }
if (extensions.count("GL_EXT_multiview_draw_buffers") != 0) if (extensions.count("GL_EXT_multiview_draw_buffers") != 0)
...@@ -2109,6 +2112,12 @@ void DispatchTableGL::initProcsGLES(const gl::Version &version, ...@@ -2109,6 +2112,12 @@ void DispatchTableGL::initProcsGLES(const gl::Version &version,
ASSIGN("glTextureViewEXT", textureView); ASSIGN("glTextureViewEXT", textureView);
} }
if (extensions.count("GL_IMG_multisampled_render_to_texture") != 0)
{
ASSIGN("glFramebufferTexture2DMultisampleIMG", framebufferTexture2DMultisampleIMG);
ASSIGN("glRenderbufferStorageMultisampleIMG", renderbufferStorageMultisampleIMG);
}
if (extensions.count("GL_KHR_debug") != 0) if (extensions.count("GL_KHR_debug") != 0)
{ {
ASSIGN("glDebugMessageCallbackKHR", debugMessageCallback); ASSIGN("glDebugMessageCallbackKHR", debugMessageCallback);
...@@ -3771,7 +3780,8 @@ void DispatchTableGL::initProcsDesktopGLNULL(const gl::Version &version, ...@@ -3771,7 +3780,8 @@ void DispatchTableGL::initProcsDesktopGLNULL(const gl::Version &version,
if (extensions.count("GL_EXT_framebuffer_multisample") != 0) if (extensions.count("GL_EXT_framebuffer_multisample") != 0)
{ {
renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL; renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL;
renderbufferStorageMultisampleEXT = &glRenderbufferStorageMultisampleEXTNULL;
} }
if (extensions.count("GL_EXT_framebuffer_object") != 0) if (extensions.count("GL_EXT_framebuffer_object") != 0)
...@@ -4814,7 +4824,9 @@ void DispatchTableGL::initProcsGLESNULL(const gl::Version &version, ...@@ -4814,7 +4824,9 @@ void DispatchTableGL::initProcsGLESNULL(const gl::Version &version,
if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0) if (extensions.count("GL_EXT_multisampled_render_to_texture") != 0)
{ {
renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL; framebufferTexture2DMultisampleEXT = &glFramebufferTexture2DMultisampleEXTNULL;
renderbufferStorageMultisample = &glRenderbufferStorageMultisampleNULL;
renderbufferStorageMultisampleEXT = &glRenderbufferStorageMultisampleEXTNULL;
} }
if (extensions.count("GL_EXT_multiview_draw_buffers") != 0) if (extensions.count("GL_EXT_multiview_draw_buffers") != 0)
...@@ -4886,6 +4898,12 @@ void DispatchTableGL::initProcsGLESNULL(const gl::Version &version, ...@@ -4886,6 +4898,12 @@ void DispatchTableGL::initProcsGLESNULL(const gl::Version &version,
textureView = &glTextureViewNULL; textureView = &glTextureViewNULL;
} }
if (extensions.count("GL_IMG_multisampled_render_to_texture") != 0)
{
framebufferTexture2DMultisampleIMG = &glFramebufferTexture2DMultisampleIMGNULL;
renderbufferStorageMultisampleIMG = &glRenderbufferStorageMultisampleIMGNULL;
}
if (extensions.count("GL_KHR_debug") != 0) if (extensions.count("GL_KHR_debug") != 0)
{ {
debugMessageCallback = &glDebugMessageCallbackNULL; debugMessageCallback = &glDebugMessageCallbackNULL;
......
...@@ -770,6 +770,10 @@ class DispatchTableGL : angle::NonCopyable ...@@ -770,6 +770,10 @@ class DispatchTableGL : angle::NonCopyable
PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC importMemoryWin32HandleEXT = nullptr; PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC importMemoryWin32HandleEXT = nullptr;
PFNGLIMPORTMEMORYWIN32NAMEEXTPROC importMemoryWin32NameEXT = nullptr; PFNGLIMPORTMEMORYWIN32NAMEEXTPROC importMemoryWin32NameEXT = nullptr;
// GL_EXT_multisampled_render_to_texture
PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC framebufferTexture2DMultisampleEXT = nullptr;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC renderbufferStorageMultisampleEXT = nullptr;
// GL_EXT_semaphore // GL_EXT_semaphore
PFNGLDELETESEMAPHORESEXTPROC deleteSemaphoresEXT = nullptr; PFNGLDELETESEMAPHORESEXTPROC deleteSemaphoresEXT = nullptr;
PFNGLGENSEMAPHORESEXTPROC genSemaphoresEXT = nullptr; PFNGLGENSEMAPHORESEXTPROC genSemaphoresEXT = nullptr;
...@@ -790,6 +794,10 @@ class DispatchTableGL : angle::NonCopyable ...@@ -790,6 +794,10 @@ class DispatchTableGL : angle::NonCopyable
PFNGLTEXBUFFEREXTPROC texBufferEXT = nullptr; PFNGLTEXBUFFEREXTPROC texBufferEXT = nullptr;
PFNGLTEXBUFFERRANGEEXTPROC texBufferRangeEXT = nullptr; PFNGLTEXBUFFERRANGEEXTPROC texBufferRangeEXT = nullptr;
// GL_IMG_multisampled_render_to_texture
PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC framebufferTexture2DMultisampleIMG = nullptr;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC renderbufferStorageMultisampleIMG = nullptr;
// GL_KHR_parallel_shader_compile // GL_KHR_parallel_shader_compile
PFNGLMAXSHADERCOMPILERTHREADSKHRPROC maxShaderCompilerThreadsKHR = nullptr; PFNGLMAXSHADERCOMPILERTHREADSKHRPROC maxShaderCompilerThreadsKHR = nullptr;
......
...@@ -90,9 +90,30 @@ void BindFramebufferAttachment(const FunctionsGL *functions, ...@@ -90,9 +90,30 @@ void BindFramebufferAttachment(const FunctionsGL *functions,
texture->getType() == TextureType::Rectangle || texture->getType() == TextureType::Rectangle ||
texture->getType() == TextureType::External) texture->getType() == TextureType::External)
{ {
functions->framebufferTexture2D(GL_FRAMEBUFFER, attachmentPoint, if (attachment->isRenderToTexture())
ToGLenum(texture->getType()), {
textureGL->getTextureID(), attachment->mipLevel()); if (functions->framebufferTexture2DMultisampleEXT)
{
functions->framebufferTexture2DMultisampleEXT(
GL_FRAMEBUFFER, attachmentPoint, ToGLenum(texture->getType()),
textureGL->getTextureID(), attachment->mipLevel(),
attachment->getSamples());
}
else
{
ASSERT(functions->framebufferTexture2DMultisampleIMG);
functions->framebufferTexture2DMultisampleIMG(
GL_FRAMEBUFFER, attachmentPoint, ToGLenum(texture->getType()),
textureGL->getTextureID(), attachment->mipLevel(),
attachment->getSamples());
}
}
else
{
functions->framebufferTexture2D(
GL_FRAMEBUFFER, attachmentPoint, ToGLenum(texture->getType()),
textureGL->getTextureID(), attachment->mipLevel());
}
} }
else if (attachment->isLayered()) else if (attachment->isLayered())
{ {
......
...@@ -68,10 +68,6 @@ angle::Result RenderbufferGL::setStorageMultisample(const gl::Context *context, ...@@ -68,10 +68,6 @@ angle::Result RenderbufferGL::setStorageMultisample(const gl::Context *context,
GLsizei height, GLsizei height,
gl::MultisamplingMode mode) gl::MultisamplingMode mode)
{ {
// Note: GL_EXT_multisampled_render_to_texture is not supported in the GL backend.
// http://anglebug.com/2894
ASSERT(mode == gl::MultisamplingMode::Regular);
const FunctionsGL *functions = GetFunctionsGL(context); const FunctionsGL *functions = GetFunctionsGL(context);
StateManagerGL *stateManager = GetStateManagerGL(context); StateManagerGL *stateManager = GetStateManagerGL(context);
const angle::FeaturesGL &features = GetFeaturesGL(context); const angle::FeaturesGL &features = GetFeaturesGL(context);
...@@ -80,9 +76,32 @@ angle::Result RenderbufferGL::setStorageMultisample(const gl::Context *context, ...@@ -80,9 +76,32 @@ angle::Result RenderbufferGL::setStorageMultisample(const gl::Context *context,
nativegl::RenderbufferFormat renderbufferFormat = nativegl::RenderbufferFormat renderbufferFormat =
nativegl::GetRenderbufferFormat(functions, features, internalformat); nativegl::GetRenderbufferFormat(functions, features, internalformat);
ANGLE_GL_TRY_ALWAYS_CHECK( if (mode == gl::MultisamplingMode::Regular)
context, functions->renderbufferStorageMultisample( {
GL_RENDERBUFFER, samples, renderbufferFormat.internalFormat, width, height)); ANGLE_GL_TRY_ALWAYS_CHECK(context, functions->renderbufferStorageMultisample(
GL_RENDERBUFFER, samples,
renderbufferFormat.internalFormat, width, height));
}
else
{
ASSERT(mode == gl::MultisamplingMode::MultisampledRenderToTexture);
if (functions->renderbufferStorageMultisampleEXT)
{
ANGLE_GL_TRY_ALWAYS_CHECK(
context,
functions->renderbufferStorageMultisampleEXT(
GL_RENDERBUFFER, samples, renderbufferFormat.internalFormat, width, height));
}
else
{
ASSERT(functions->renderbufferStorageMultisampleIMG);
ANGLE_GL_TRY_ALWAYS_CHECK(
context,
functions->renderbufferStorageMultisampleIMG(
GL_RENDERBUFFER, samples, renderbufferFormat.internalFormat, width, height));
}
}
mNativeInternalFormat = renderbufferFormat.internalFormat; mNativeInternalFormat = renderbufferFormat.internalFormat;
......
...@@ -1957,6 +1957,34 @@ typedef void(INTERNAL_GL_APIENTRY *PFNGLBLITFRAMEBUFFERNVPROC)(GLint srcX0, ...@@ -1957,6 +1957,34 @@ typedef void(INTERNAL_GL_APIENTRY *PFNGLBLITFRAMEBUFFERNVPROC)(GLint srcX0,
GLbitfield mask, GLbitfield mask,
GLenum filter); GLenum filter);
// GL_EXT_multisampled_render_to_texture
typedef void(INTERNAL_GL_APIENTRY *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
typedef void(INTERNAL_GL_APIENTRY *PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC)(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples);
// GL_IMG_multisampled_render_to_texture
typedef void(INTERNAL_GL_APIENTRY *PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC)(
GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
typedef void(INTERNAL_GL_APIENTRY *PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC)(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples);
} // namespace rx } // namespace rx
#endif // LIBANGLE_RENDERER_GL_FUNCTIONSGLTYPEDEFS_H_ #endif // LIBANGLE_RENDERER_GL_FUNCTIONSGLTYPEDEFS_H_
...@@ -854,5 +854,17 @@ ...@@ -854,5 +854,17 @@
"GL_NV_framebuffer_blit": "GL_NV_framebuffer_blit":
[ [
"BlitFramebufferNV" "BlitFramebufferNV"
],
"GL_IMG_multisampled_render_to_texture":
[
"RenderbufferStorageMultisampleIMG",
"FramebufferTexture2DMultisampleIMG"
],
"GL_EXT_multisampled_render_to_texture":
[
"RenderbufferStorageMultisampleEXT",
"FramebufferTexture2DMultisampleEXT"
] ]
} }
...@@ -838,6 +838,22 @@ void INTERNAL_GL_APIENTRY glFramebufferTexture2DNULL(GLenum target, ...@@ -838,6 +838,22 @@ void INTERNAL_GL_APIENTRY glFramebufferTexture2DNULL(GLenum target,
GLint level) GLint level)
{} {}
void INTERNAL_GL_APIENTRY glFramebufferTexture2DMultisampleEXTNULL(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples)
{}
void INTERNAL_GL_APIENTRY glFramebufferTexture2DMultisampleIMGNULL(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples)
{}
void INTERNAL_GL_APIENTRY glFramebufferTexture3DNULL(GLenum target, void INTERNAL_GL_APIENTRY glFramebufferTexture3DNULL(GLenum target,
GLenum attachment, GLenum attachment,
GLenum textarget, GLenum textarget,
...@@ -2248,6 +2264,20 @@ void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleNULL(GLenum target, ...@@ -2248,6 +2264,20 @@ void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleNULL(GLenum target,
GLsizei height) GLsizei height)
{} {}
void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleEXTNULL(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height)
{}
void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleIMGNULL(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height)
{}
void INTERNAL_GL_APIENTRY glResumeTransformFeedbackNULL() {} void INTERNAL_GL_APIENTRY glResumeTransformFeedbackNULL() {}
void INTERNAL_GL_APIENTRY glSampleCoverageNULL(GLfloat value, GLboolean invert) {} void INTERNAL_GL_APIENTRY glSampleCoverageNULL(GLfloat value, GLboolean invert) {}
......
...@@ -568,6 +568,18 @@ void INTERNAL_GL_APIENTRY glFramebufferTexture2DNULL(GLenum target, ...@@ -568,6 +568,18 @@ void INTERNAL_GL_APIENTRY glFramebufferTexture2DNULL(GLenum target,
GLenum textarget, GLenum textarget,
GLuint texture, GLuint texture,
GLint level); GLint level);
void INTERNAL_GL_APIENTRY glFramebufferTexture2DMultisampleEXTNULL(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples);
void INTERNAL_GL_APIENTRY glFramebufferTexture2DMultisampleIMGNULL(GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLsizei samples);
void INTERNAL_GL_APIENTRY glFramebufferTexture3DNULL(GLenum target, void INTERNAL_GL_APIENTRY glFramebufferTexture3DNULL(GLenum target,
GLenum attachment, GLenum attachment,
GLenum textarget, GLenum textarget,
...@@ -1421,6 +1433,16 @@ void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleNULL(GLenum target, ...@@ -1421,6 +1433,16 @@ void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleNULL(GLenum target,
GLenum internalformat, GLenum internalformat,
GLsizei width, GLsizei width,
GLsizei height); GLsizei height);
void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleEXTNULL(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
void INTERNAL_GL_APIENTRY glRenderbufferStorageMultisampleIMGNULL(GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
void INTERNAL_GL_APIENTRY glResumeTransformFeedbackNULL(); void INTERNAL_GL_APIENTRY glResumeTransformFeedbackNULL();
void INTERNAL_GL_APIENTRY glSampleCoverageNULL(GLfloat value, GLboolean invert); void INTERNAL_GL_APIENTRY glSampleCoverageNULL(GLfloat value, GLboolean invert);
void INTERNAL_GL_APIENTRY glSampleMaskiNULL(GLuint maskNumber, GLbitfield mask); void INTERNAL_GL_APIENTRY glSampleMaskiNULL(GLuint maskNumber, GLbitfield mask);
......
...@@ -118,12 +118,24 @@ bool IsAdreno42xOr3xx(const FunctionsGL *functions) ...@@ -118,12 +118,24 @@ bool IsAdreno42xOr3xx(const FunctionsGL *functions)
return number != 0 && getAdrenoNumber(functions) < 430; return number != 0 && getAdrenoNumber(functions) < 430;
} }
bool IsAdreno4xx(const FunctionsGL *functions)
{
int number = getAdrenoNumber(functions);
return number != 0 && number >= 400 && number < 500;
}
bool IsAdreno5xxOrOlder(const FunctionsGL *functions) bool IsAdreno5xxOrOlder(const FunctionsGL *functions)
{ {
int number = getAdrenoNumber(functions); int number = getAdrenoNumber(functions);
return number != 0 && number < 600; return number != 0 && number < 600;
} }
bool IsAdreno5xx(const FunctionsGL *functions)
{
int number = getAdrenoNumber(functions);
return number != 0 && number >= 500 && number < 600;
}
bool IsMaliT8xxOrOlder(const FunctionsGL *functions) bool IsMaliT8xxOrOlder(const FunctionsGL *functions)
{ {
int number = getMaliTNumber(functions); int number = getMaliTNumber(functions);
...@@ -1383,6 +1395,14 @@ void GenerateCaps(const FunctionsGL *functions, ...@@ -1383,6 +1395,14 @@ void GenerateCaps(const FunctionsGL *functions,
extensions->framebufferBlitANGLE = extensions->framebufferBlitANGLE =
extensions->framebufferBlitNV || functions->hasGLESExtension("GL_ANGLE_framebuffer_blit"); extensions->framebufferBlitNV || functions->hasGLESExtension("GL_ANGLE_framebuffer_blit");
extensions->framebufferMultisample = extensions->framebufferBlitANGLE && caps->maxSamples > 0; extensions->framebufferMultisample = extensions->framebufferBlitANGLE && caps->maxSamples > 0;
extensions->multisampledRenderToTexture =
!features.disableMultisampledRenderToTexture.enabled &&
(functions->hasGLESExtension("GL_EXT_multisampled_render_to_texture") ||
functions->hasGLESExtension("GL_IMG_multisampled_render_to_texture"));
extensions->multisampledRenderToTexture2 =
!features.disableMultisampledRenderToTexture.enabled &&
extensions->multisampledRenderToTexture &&
functions->hasGLESExtension("GL_EXT_multisampled_render_to_texture2");
extensions->standardDerivativesOES = functions->isAtLeastGL(gl::Version(2, 0)) || extensions->standardDerivativesOES = functions->isAtLeastGL(gl::Version(2, 0)) ||
functions->hasGLExtension("GL_ARB_fragment_shader") || functions->hasGLExtension("GL_ARB_fragment_shader") ||
functions->hasGLESExtension("GL_OES_standard_derivatives"); functions->hasGLESExtension("GL_OES_standard_derivatives");
...@@ -2114,6 +2134,31 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature ...@@ -2114,6 +2134,31 @@ void InitializeFeatures(const FunctionsGL *functions, angle::FeaturesGL *feature
// http://crbug.com/1181068 and http://crbug.com/783979 // http://crbug.com/1181068 and http://crbug.com/783979
ANGLE_FEATURE_CONDITION(features, flushOnFramebufferChange, ANGLE_FEATURE_CONDITION(features, flushOnFramebufferChange,
IsApple() && Has9thGenIntelGPU(systemInfo)); IsApple() && Has9thGenIntelGPU(systemInfo));
// Disable GL_EXT_multisampled_render_to_texture on a bunch of different configurations:
// http://crbug.com/490379
// http://crbug.com/767913
bool isAdreno4xxOnAndroidLessThan51 =
IsAndroid() && IsAdreno4xx(functions) && GetAndroidSdkLevel() < 22;
// http://crbug.com/612474
bool isAdreno4xxOnAndroid70 =
IsAndroid() && IsAdreno4xx(functions) && GetAndroidSdkLevel() == 24;
bool isAdreno5xxOnAndroidLessThan70 =
IsAndroid() && IsAdreno5xx(functions) && GetAndroidSdkLevel() < 24;
// http://crbug.com/663811
bool isAdreno5xxOnAndroid71 =
IsAndroid() && IsAdreno5xx(functions) && GetAndroidSdkLevel() == 25;
// http://crbug.com/594016
bool isLinuxVivante = IsLinux() && IsVivante(device);
ANGLE_FEATURE_CONDITION(features, disableMultisampledRenderToTexture,
isAdreno4xxOnAndroidLessThan51 || isAdreno4xxOnAndroid70 ||
isAdreno5xxOnAndroidLessThan70 || isAdreno5xxOnAndroid71 ||
isLinuxVivante);
} }
void InitializeFrontendFeatures(const FunctionsGL *functions, angle::FrontendFeatures *features) void InitializeFrontendFeatures(const FunctionsGL *functions, angle::FrontendFeatures *features)
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
5981 PIXEL4ORXL GLES : MipmapTest.RenderOntoLevelZeroAfterGenerateMipmap/* = SKIP 5981 PIXEL4ORXL GLES : MipmapTest.RenderOntoLevelZeroAfterGenerateMipmap/* = SKIP
5981 PIXEL4ORXL GLES : MipmapTest.TextureCubeGeneralLevelZero/* = SKIP 5981 PIXEL4ORXL GLES : MipmapTest.TextureCubeGeneralLevelZero/* = SKIP
5981 PIXEL4ORXL GLES : MipmapTest.TextureCubeRenderToLevelZero/* = SKIP 5981 PIXEL4ORXL GLES : MipmapTest.TextureCubeRenderToLevelZero/* = SKIP
5995 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.BlitFramebufferTest/* = FAIL 2894 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.BlitFramebufferTest/* = SKIP
5995 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.ClearThenMaskedClearFramebufferTest/* = FAIL 2894 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.ClearThenMaskedClearFramebufferTest/* = SKIP
5995 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.RenderbufferBlitFramebufferTest/* = FAIL 2894 PIXEL4ORXL GLES : MultisampledRenderToTextureES3Test.RenderbufferBlitFramebufferTest/* = SKIP
5981 PIXEL4ORXL GLES : MultithreadingTestES3.MultithreadFenceTexImage/* = SKIP 5981 PIXEL4ORXL GLES : MultithreadingTestES3.MultithreadFenceTexImage/* = SKIP
5981 PIXEL4ORXL GLES : PbufferTest.ClearAndBindTexImageSrgb/* = SKIP 5981 PIXEL4ORXL GLES : PbufferTest.ClearAndBindTexImageSrgb/* = SKIP
5981 PIXEL4ORXL GLES : ReadPixelsPBOTest.ExistingDataPreserved/* = SKIP 5981 PIXEL4ORXL GLES : ReadPixelsPBOTest.ExistingDataPreserved/* = SKIP
......
...@@ -26,7 +26,13 @@ class MultisampledRenderToTextureTest : public ANGLETest ...@@ -26,7 +26,13 @@ class MultisampledRenderToTextureTest : public ANGLETest
setConfigAlphaBits(8); setConfigAlphaBits(8);
} }
void testSetUp() override {} void testSetUp() override
{
if (getClientMajorVersion() >= 3 && getClientMinorVersion() >= 1)
{
glGetIntegerv(GL_MAX_INTEGER_SAMPLES, &mMaxIntegerSamples);
}
}
void testTearDown() override {} void testTearDown() override {}
...@@ -134,6 +140,7 @@ class MultisampledRenderToTextureTest : public ANGLETest ...@@ -134,6 +140,7 @@ class MultisampledRenderToTextureTest : public ANGLETest
GLsizei size, GLsizei size,
GLenum renderbufferTarget, GLenum renderbufferTarget,
const GLType *glType, const GLType *glType,
GLint samples,
GLTexture *textureOut, GLTexture *textureOut,
GLRenderbuffer *renderbufferOut); GLRenderbuffer *renderbufferOut);
void createAndAttachDepthStencilAttachment(bool useRenderbuffer, void createAndAttachDepthStencilAttachment(bool useRenderbuffer,
...@@ -150,6 +157,9 @@ class MultisampledRenderToTextureTest : public ANGLETest ...@@ -150,6 +157,9 @@ class MultisampledRenderToTextureTest : public ANGLETest
GLProgram mCopyTextureProgram; GLProgram mCopyTextureProgram;
GLint mCopyTextureUniformLocation = -1; GLint mCopyTextureUniformLocation = -1;
const GLint mTestSampleCount = 4;
GLint mMaxIntegerSamples = 0;
}; };
class MultisampledRenderToTextureES3Test : public MultisampledRenderToTextureTest class MultisampledRenderToTextureES3Test : public MultisampledRenderToTextureTest
...@@ -178,6 +188,9 @@ TEST_P(MultisampledRenderToTextureTest, RenderbufferParameterCheck) ...@@ -178,6 +188,9 @@ TEST_P(MultisampledRenderToTextureTest, RenderbufferParameterCheck)
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
// Linux Intel Vulkan returns 0 for GL_MAX_INTEGER_SAMPLES http://anglebug.com/5988
ANGLE_SKIP_TEST_IF(IsLinux() && IsIntel() && IsVulkan());
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
...@@ -203,9 +216,11 @@ TEST_P(MultisampledRenderToTextureTest, RenderbufferParameterCheck) ...@@ -203,9 +216,11 @@ TEST_P(MultisampledRenderToTextureTest, RenderbufferParameterCheck)
if (getClientMinorVersion() >= 1) if (getClientMinorVersion() >= 1)
{ {
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 4, GL_RGBA32I, 64, 64); glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, mMaxIntegerSamples, GL_RGBA32I, 64,
64);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 4, GL_RGBA32UI, 64, 64); glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, mMaxIntegerSamples, GL_RGBA32UI,
64, 64);
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
} }
} }
...@@ -265,10 +280,13 @@ TEST_P(MultisampledRenderToTextureTest, Texture2DParameterCheck) ...@@ -265,10 +280,13 @@ TEST_P(MultisampledRenderToTextureTest, Texture2DParameterCheck)
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Attachment not COLOR_ATTACHMENT0. Allowed only in EXT_multisampled_render_to_texture2 if (EnsureGLExtensionEnabled("GL_EXT_draw_buffers") || isES3)
glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, {
texture, 0, 4); // Attachment not COLOR_ATTACHMENT0. Allowed only in EXT_multisampled_render_to_texture2
assertErrorIfNotMSRTT2(GL_INVALID_ENUM); glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D,
texture, 0, 4);
assertErrorIfNotMSRTT2(GL_INVALID_ENUM);
}
// Depth/stencil attachment. Allowed only in EXT_multisampled_render_to_texture2 // Depth/stencil attachment. Allowed only in EXT_multisampled_render_to_texture2
if (isES3) if (isES3)
...@@ -321,6 +339,7 @@ TEST_P(MultisampledRenderToTextureTest, Texture2DParameterCheck) ...@@ -321,6 +339,7 @@ TEST_P(MultisampledRenderToTextureTest, Texture2DParameterCheck)
TEST_P(MultisampledRenderToTextureTest, TextureCubeMapParameterCheck) TEST_P(MultisampledRenderToTextureTest, TextureCubeMapParameterCheck)
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
bool isES3 = getClientMajorVersion() >= 3;
GLTexture texture; GLTexture texture;
glBindTexture(GL_TEXTURE_CUBE_MAP, texture); glBindTexture(GL_TEXTURE_CUBE_MAP, texture);
...@@ -346,10 +365,15 @@ TEST_P(MultisampledRenderToTextureTest, TextureCubeMapParameterCheck) ...@@ -346,10 +365,15 @@ TEST_P(MultisampledRenderToTextureTest, TextureCubeMapParameterCheck)
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Attachment not COLOR_ATTACHMENT0. Allowed only in EXT_multisampled_render_to_texture2 if (EnsureGLExtensionEnabled("GL_EXT_draw_buffers") || isES3)
glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, {
GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, texture, 0, 4); // Attachment not COLOR_ATTACHMENT0. Allowed only in
assertErrorIfNotMSRTT2(GL_INVALID_ENUM); // EXT_multisampled_render_to_texture2
glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1,
GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, texture, 0,
4);
assertErrorIfNotMSRTT2(GL_INVALID_ENUM);
}
// Target not framebuffer // Target not framebuffer
glFramebufferTexture2DMultisampleEXT(GL_RENDERBUFFER, GL_COLOR_ATTACHMENT0, glFramebufferTexture2DMultisampleEXT(GL_RENDERBUFFER, GL_COLOR_ATTACHMENT0,
...@@ -462,6 +486,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment( ...@@ -462,6 +486,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment(
GLsizei size, GLsizei size,
GLenum renderbufferTarget, GLenum renderbufferTarget,
const GLType *glType, const GLType *glType,
GLint samples,
GLTexture *textureOut, GLTexture *textureOut,
GLRenderbuffer *renderbufferOut) GLRenderbuffer *renderbufferOut)
{ {
...@@ -476,7 +501,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment( ...@@ -476,7 +501,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment(
internalFormat = GL_RGBA8; internalFormat = GL_RGBA8;
} }
glBindRenderbuffer(GL_RENDERBUFFER, *renderbufferOut); glBindRenderbuffer(GL_RENDERBUFFER, *renderbufferOut);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 4, internalFormat, size, size); glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, samples, internalFormat, size, size);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, renderbufferTarget, GL_RENDERBUFFER, glFramebufferRenderbuffer(GL_FRAMEBUFFER, renderbufferTarget, GL_RENDERBUFFER,
*renderbufferOut); *renderbufferOut);
} }
...@@ -485,7 +510,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment( ...@@ -485,7 +510,7 @@ void MultisampledRenderToTextureTest::createAndAttachColorAttachment(
glBindTexture(GL_TEXTURE_2D, *textureOut); glBindTexture(GL_TEXTURE_2D, *textureOut);
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, size, size, 0, format, type, nullptr); glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, size, size, 0, format, type, nullptr);
glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, renderbufferTarget, GL_TEXTURE_2D, glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, renderbufferTarget, GL_TEXTURE_2D,
*textureOut, 0, 4); *textureOut, 0, samples);
} }
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
} }
...@@ -499,7 +524,8 @@ void MultisampledRenderToTextureTest::createAndAttachDepthStencilAttachment( ...@@ -499,7 +524,8 @@ void MultisampledRenderToTextureTest::createAndAttachDepthStencilAttachment(
if (useRenderbuffer) if (useRenderbuffer)
{ {
glBindRenderbuffer(GL_RENDERBUFFER, *renderbufferOut); glBindRenderbuffer(GL_RENDERBUFFER, *renderbufferOut);
glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, 4, GL_DEPTH24_STENCIL8, size, size); glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, mTestSampleCount, GL_DEPTH24_STENCIL8,
size, size);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER,
*renderbufferOut); *renderbufferOut);
} }
...@@ -509,7 +535,7 @@ void MultisampledRenderToTextureTest::createAndAttachDepthStencilAttachment( ...@@ -509,7 +535,7 @@ void MultisampledRenderToTextureTest::createAndAttachDepthStencilAttachment(
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, size, size, 0, GL_DEPTH_STENCIL, glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, size, size, 0, GL_DEPTH_STENCIL,
GL_UNSIGNED_INT_24_8_OES, nullptr); GL_UNSIGNED_INT_24_8_OES, nullptr);
glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT,
GL_TEXTURE_2D, *textureOut, 0, 4); GL_TEXTURE_2D, *textureOut, 0, mTestSampleCount);
} }
ASSERT_GL_NO_ERROR(); ASSERT_GL_NO_ERROR();
} }
...@@ -525,8 +551,8 @@ void MultisampledRenderToTextureTest::colorAttachmentMultisampleDrawTestCommon(b ...@@ -525,8 +551,8 @@ void MultisampledRenderToTextureTest::colorAttachmentMultisampleDrawTestCommon(b
constexpr GLsizei kSize = 6; constexpr GLsizei kSize = 6;
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&renderbuffer); mTestSampleCount, &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set viewport and clear to black // Set viewport and clear to black
...@@ -595,8 +621,8 @@ TEST_P(MultisampledRenderToTextureTest, ScissoredDrawTest) ...@@ -595,8 +621,8 @@ TEST_P(MultisampledRenderToTextureTest, ScissoredDrawTest)
constexpr GLsizei kSize = 1024; constexpr GLsizei kSize = 1024;
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, mTestSampleCount,
&renderbuffer); &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set viewport and clear to black // Set viewport and clear to black
...@@ -669,8 +695,8 @@ TEST_P(MultisampledRenderToTextureES3Test, TransformFeedbackTest) ...@@ -669,8 +695,8 @@ TEST_P(MultisampledRenderToTextureES3Test, TransformFeedbackTest)
constexpr GLsizei kSize = 1024; constexpr GLsizei kSize = 1024;
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, mTestSampleCount,
&renderbuffer); &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set up transform feedback. // Set up transform feedback.
...@@ -809,8 +835,8 @@ void MultisampledRenderToTextureES3Test::readPixelsTestCommon(bool useRenderbuff ...@@ -809,8 +835,8 @@ void MultisampledRenderToTextureES3Test::readPixelsTestCommon(bool useRenderbuff
constexpr GLsizei kSize = 6; constexpr GLsizei kSize = 6;
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&renderbuffer); mTestSampleCount, &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set viewport and clear to red // Set viewport and clear to red
...@@ -865,8 +891,8 @@ void MultisampledRenderToTextureTest::copyTexImageTestCommon(bool useRenderbuffe ...@@ -865,8 +891,8 @@ void MultisampledRenderToTextureTest::copyTexImageTestCommon(bool useRenderbuffe
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&renderbuffer); mTestSampleCount, &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set color for framebuffer // Set color for framebuffer
...@@ -915,8 +941,8 @@ void MultisampledRenderToTextureTest::copyTexSubImageTestCommon(bool useRenderbu ...@@ -915,8 +941,8 @@ void MultisampledRenderToTextureTest::copyTexSubImageTestCommon(bool useRenderbu
// Create color attachment for copyFBO0 // Create color attachment for copyFBO0
GLTexture texture; GLTexture texture;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&renderbuffer); mTestSampleCount, &texture, &renderbuffer);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
GLFramebuffer copyFBO1; GLFramebuffer copyFBO1;
...@@ -925,8 +951,8 @@ void MultisampledRenderToTextureTest::copyTexSubImageTestCommon(bool useRenderbu ...@@ -925,8 +951,8 @@ void MultisampledRenderToTextureTest::copyTexSubImageTestCommon(bool useRenderbu
// Create color attachment for copyFBO1 // Create color attachment for copyFBO1
GLTexture texture1; GLTexture texture1;
GLRenderbuffer renderbuffer1; GLRenderbuffer renderbuffer1;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, &texture1, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&renderbuffer1); mTestSampleCount, &texture1, &renderbuffer1);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Set color for copyFBO0 // Set color for copyFBO0
...@@ -990,6 +1016,10 @@ void MultisampledRenderToTextureES3Test::blitFramebufferTestCommon(bool useRende ...@@ -990,6 +1016,10 @@ void MultisampledRenderToTextureES3Test::blitFramebufferTestCommon(bool useRende
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
// Some draws are not executed before the blitframebuffer on Pixel2.
// http://anglebug.com/2894
ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGL() && IsPixel2());
constexpr GLsizei kSize = 16; constexpr GLsizei kSize = 16;
GLFramebuffer fboMS; GLFramebuffer fboMS;
...@@ -1005,7 +1035,7 @@ void MultisampledRenderToTextureES3Test::blitFramebufferTestCommon(bool useRende ...@@ -1005,7 +1035,7 @@ void MultisampledRenderToTextureES3Test::blitFramebufferTestCommon(bool useRende
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Clear depth to 0.5 and color to green. // Clear depth to 0.5 and color to green.
...@@ -1124,7 +1154,7 @@ void MultisampledRenderToTextureTest::drawCopyThenBlendCommon(bool useRenderbuff ...@@ -1124,7 +1154,7 @@ void MultisampledRenderToTextureTest::drawCopyThenBlendCommon(bool useRenderbuff
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Draw red into the multisampled color buffer. // Draw red into the multisampled color buffer.
...@@ -1198,7 +1228,7 @@ void MultisampledRenderToTextureTest::clearDrawCopyThenBlendSameProgramCommon(bo ...@@ -1198,7 +1228,7 @@ void MultisampledRenderToTextureTest::clearDrawCopyThenBlendSameProgramCommon(bo
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Draw red into the multisampled color buffer. // Draw red into the multisampled color buffer.
...@@ -1416,7 +1446,7 @@ void MultisampledRenderToTextureTest::drawCopyDrawThenMaskedClearCommon(bool use ...@@ -1416,7 +1446,7 @@ void MultisampledRenderToTextureTest::drawCopyDrawThenMaskedClearCommon(bool use
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Draw red into the multisampled color buffer. // Draw red into the multisampled color buffer.
...@@ -1494,7 +1524,7 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachInvalidatedThenDrawCo ...@@ -1494,7 +1524,7 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachInvalidatedThenDrawCo
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Draw red into the multisampled color buffer. // Draw red into the multisampled color buffer.
...@@ -1530,7 +1560,8 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachInvalidatedThenDrawCo ...@@ -1530,7 +1560,8 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachInvalidatedThenDrawCo
GLTexture invalidateTextureMS; GLTexture invalidateTextureMS;
GLRenderbuffer invalidateRenderbufferMS; GLRenderbuffer invalidateRenderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&invalidateTextureMS, &invalidateRenderbufferMS); mTestSampleCount, &invalidateTextureMS,
&invalidateRenderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Invalidate the attachment. // Invalidate the attachment.
...@@ -1602,7 +1633,7 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachDepthStencilClearThen ...@@ -1602,7 +1633,7 @@ void MultisampledRenderToTextureES3Test::drawCopyDrawAttachDepthStencilClearThen
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Draw red into the multisampled color buffer. // Draw red into the multisampled color buffer.
...@@ -1868,7 +1899,7 @@ void MultisampledRenderToTextureTest::clearThenBlendCommon(bool useRenderbuffer) ...@@ -1868,7 +1899,7 @@ void MultisampledRenderToTextureTest::clearThenBlendCommon(bool useRenderbuffer)
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Clear the framebuffer. // Clear the framebuffer.
...@@ -1930,7 +1961,7 @@ void MultisampledRenderToTextureES3Test::depthStencilClearThenDrawCommon(bool us ...@@ -1930,7 +1961,7 @@ void MultisampledRenderToTextureES3Test::depthStencilClearThenDrawCommon(bool us
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
GLTexture dsTextureMS; GLTexture dsTextureMS;
GLRenderbuffer dsRenderbufferMS; GLRenderbuffer dsRenderbufferMS;
...@@ -2605,8 +2636,8 @@ TEST_P(MultisampledRenderToTextureTest, DepthReadWriteToggleWithStartedRenderPas ...@@ -2605,8 +2636,8 @@ TEST_P(MultisampledRenderToTextureTest, DepthReadWriteToggleWithStartedRenderPas
// Create framebuffer to draw into, with both color and depth attachments. // Create framebuffer to draw into, with both color and depth attachments.
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(true, kSize, GL_COLOR_ATTACHMENT0, nullptr, &textureMS, createAndAttachColorAttachment(true, kSize, GL_COLOR_ATTACHMENT0, nullptr, mTestSampleCount,
&renderbufferMS); &textureMS, &renderbufferMS);
GLTexture dsTextureMS; GLTexture dsTextureMS;
GLRenderbuffer dsRenderbufferMS; GLRenderbuffer dsRenderbufferMS;
...@@ -2640,8 +2671,8 @@ TEST_P(MultisampledRenderToTextureTest, DepthReadWriteToggleWithStartedRenderPas ...@@ -2640,8 +2671,8 @@ TEST_P(MultisampledRenderToTextureTest, DepthReadWriteToggleWithStartedRenderPas
glBindFramebuffer(GL_FRAMEBUFFER, fboMS2); glBindFramebuffer(GL_FRAMEBUFFER, fboMS2);
GLTexture textureMS2; GLTexture textureMS2;
GLRenderbuffer renderbufferMS2; GLRenderbuffer renderbufferMS2;
createAndAttachColorAttachment(true, 2048, GL_COLOR_ATTACHMENT0, nullptr, &textureMS2, createAndAttachColorAttachment(true, 2048, GL_COLOR_ATTACHMENT0, nullptr, mTestSampleCount,
&renderbufferMS2); &textureMS2, &renderbufferMS2);
GLTexture dsTextureMS2; GLTexture dsTextureMS2;
GLRenderbuffer dsRenderbufferMS2; GLRenderbuffer dsRenderbufferMS2;
glBindRenderbuffer(GL_RENDERBUFFER, dsRenderbufferMS2); glBindRenderbuffer(GL_RENDERBUFFER, dsRenderbufferMS2);
...@@ -2697,6 +2728,7 @@ void MultisampledRenderToTextureES3Test::colorAttachment1Common(bool useRenderbu ...@@ -2697,6 +2728,7 @@ void MultisampledRenderToTextureES3Test::colorAttachment1Common(bool useRenderbu
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_draw_buffers"));
// Qualcomm driver crashes in the presence of VK_ATTACHMENT_UNUSED. // Qualcomm driver crashes in the presence of VK_ATTACHMENT_UNUSED.
// http://anglebug.com/3423 // http://anglebug.com/3423
...@@ -2716,7 +2748,7 @@ void MultisampledRenderToTextureES3Test::colorAttachment1Common(bool useRenderbu ...@@ -2716,7 +2748,7 @@ void MultisampledRenderToTextureES3Test::colorAttachment1Common(bool useRenderbu
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT1, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT1, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Setup program to render into attachment 1. // Setup program to render into attachment 1.
...@@ -2790,6 +2822,7 @@ void MultisampledRenderToTextureES3Test::colorAttachments0And3Common(bool useRen ...@@ -2790,6 +2822,7 @@ void MultisampledRenderToTextureES3Test::colorAttachments0And3Common(bool useRen
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
ANGLE_SKIP_TEST_IF(!useRenderbuffer && ANGLE_SKIP_TEST_IF(!useRenderbuffer &&
!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2")); !EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_draw_buffers"));
// Qualcomm driver crashes in the presence of VK_ATTACHMENT_UNUSED. // Qualcomm driver crashes in the presence of VK_ATTACHMENT_UNUSED.
// http://anglebug.com/3423 // http://anglebug.com/3423
...@@ -2806,12 +2839,12 @@ void MultisampledRenderToTextureES3Test::colorAttachments0And3Common(bool useRen ...@@ -2806,12 +2839,12 @@ void MultisampledRenderToTextureES3Test::colorAttachments0And3Common(bool useRen
GLTexture textureMS0; GLTexture textureMS0;
GLRenderbuffer renderbufferMS0; GLRenderbuffer renderbufferMS0;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS0, &renderbufferMS0); mTestSampleCount, &textureMS0, &renderbufferMS0);
GLTexture textureMS3; GLTexture textureMS3;
GLRenderbuffer renderbufferMS3; GLRenderbuffer renderbufferMS3;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT3, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT3, nullptr,
&textureMS3, &renderbufferMS3); mTestSampleCount, &textureMS3, &renderbufferMS3);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
...@@ -2969,6 +3002,7 @@ TEST_P(MultisampledRenderToTextureES31Test, MixedMultisampledAndMultisampledRend ...@@ -2969,6 +3002,7 @@ TEST_P(MultisampledRenderToTextureES31Test, MixedMultisampledAndMultisampledRend
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_draw_buffers"));
constexpr GLsizei kSize = 64; constexpr GLsizei kSize = 64;
...@@ -3046,6 +3080,7 @@ void MultisampledRenderToTextureES31Test::blitFramebufferAttachment1Common(bool ...@@ -3046,6 +3080,7 @@ void MultisampledRenderToTextureES31Test::blitFramebufferAttachment1Common(bool
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
ANGLE_SKIP_TEST_IF(!useRenderbuffer && ANGLE_SKIP_TEST_IF(!useRenderbuffer &&
!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2")); !EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_draw_buffers"));
constexpr GLsizei kSize = 16; constexpr GLsizei kSize = 16;
...@@ -3062,7 +3097,7 @@ void MultisampledRenderToTextureES31Test::blitFramebufferAttachment1Common(bool ...@@ -3062,7 +3097,7 @@ void MultisampledRenderToTextureES31Test::blitFramebufferAttachment1Common(bool
GLTexture textureMS1; GLTexture textureMS1;
GLRenderbuffer renderbufferMS1; GLRenderbuffer renderbufferMS1;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT1, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT1, nullptr,
&textureMS1, &renderbufferMS1); mTestSampleCount, &textureMS1, &renderbufferMS1);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Setup program to render into attachments 0 and 1. // Setup program to render into attachments 0 and 1.
...@@ -3148,7 +3183,7 @@ void MultisampledRenderToTextureES3Test::blitFramebufferMixedColorAndDepthCommon ...@@ -3148,7 +3183,7 @@ void MultisampledRenderToTextureES3Test::blitFramebufferMixedColorAndDepthCommon
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0, nullptr,
&textureMS, &renderbufferMS); mTestSampleCount, &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Clear depth to 0.5 and color to red. // Clear depth to 0.5 and color to red.
...@@ -3393,6 +3428,10 @@ void MultisampledRenderToTextureES31Test::drawCopyThenBlendAllAttachmentsMixed(b ...@@ -3393,6 +3428,10 @@ void MultisampledRenderToTextureES31Test::drawCopyThenBlendAllAttachmentsMixed(b
constexpr GLint kImplMaxDrawBuffers = 8; constexpr GLint kImplMaxDrawBuffers = 8;
maxDrawBuffers = std::min(maxDrawBuffers, kImplMaxDrawBuffers); maxDrawBuffers = std::min(maxDrawBuffers, kImplMaxDrawBuffers);
// Integer formats are mixed in which have different sample count limits. A framebuffer must
// have the same sample count for all attachments.
const GLint sampleCount = std::min(mTestSampleCount, mMaxIntegerSamples);
constexpr const char *kDecl[kImplMaxDrawBuffers] = { constexpr const char *kDecl[kImplMaxDrawBuffers] = {
"layout(location = 0) out vec4 out0;", "layout(location = 1) out ivec4 out1;", "layout(location = 0) out vec4 out0;", "layout(location = 1) out ivec4 out1;",
"layout(location = 2) out uvec4 out2;", "layout(location = 3) out vec4 out3;", "layout(location = 2) out uvec4 out2;", "layout(location = 3) out vec4 out3;",
...@@ -3468,7 +3507,7 @@ precision highp float; ...@@ -3468,7 +3507,7 @@ precision highp float;
for (GLint drawBuffer = 0; drawBuffer < maxDrawBuffers; ++drawBuffer) for (GLint drawBuffer = 0; drawBuffer < maxDrawBuffers; ++drawBuffer)
{ {
createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0 + drawBuffer, createAndAttachColorAttachment(useRenderbuffer, kSize, GL_COLOR_ATTACHMENT0 + drawBuffer,
&kGLType[drawBuffer], &textureMS[drawBuffer], &kGLType[drawBuffer], sampleCount, &textureMS[drawBuffer],
&renderbufferMS[drawBuffer]); &renderbufferMS[drawBuffer]);
} }
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
...@@ -3545,6 +3584,9 @@ TEST_P(MultisampledRenderToTextureES31Test, DrawCopyThenBlendAllAttachmentsMixed ...@@ -3545,6 +3584,9 @@ TEST_P(MultisampledRenderToTextureES31Test, DrawCopyThenBlendAllAttachmentsMixed
// Same as DrawCopyThenBlendAllAttachmentsMixed but with renderbuffers. // Same as DrawCopyThenBlendAllAttachmentsMixed but with renderbuffers.
TEST_P(MultisampledRenderToTextureES31Test, RenderbufferDrawCopyThenBlendAllAttachmentsMixed) TEST_P(MultisampledRenderToTextureES31Test, RenderbufferDrawCopyThenBlendAllAttachmentsMixed)
{ {
// Linux Intel Vulkan returns 0 for GL_MAX_INTEGER_SAMPLES http://anglebug.com/5988
ANGLE_SKIP_TEST_IF(IsLinux() && IsIntel() && IsVulkan());
drawCopyThenBlendAllAttachmentsMixed(true); drawCopyThenBlendAllAttachmentsMixed(true);
} }
...@@ -3554,6 +3596,7 @@ void MultisampledRenderToTextureES3Test::renderbufferUnresolveColorAndDepthStenc ...@@ -3554,6 +3596,7 @@ void MultisampledRenderToTextureES3Test::renderbufferUnresolveColorAndDepthStenc
{ {
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2")); ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_multisampled_render_to_texture2"));
ANGLE_SKIP_TEST_IF(!EnsureGLExtensionEnabled("GL_EXT_draw_buffers"));
// http://anglebug.com/5083 // http://anglebug.com/5083
ANGLE_SKIP_TEST_IF(IsWindows() && IsAMD() && IsVulkan()); ANGLE_SKIP_TEST_IF(IsWindows() && IsAMD() && IsVulkan());
...@@ -3756,6 +3799,9 @@ TEST_P(MultisampledRenderToTextureES3Test, ClearThenMaskedClearFramebufferTest) ...@@ -3756,6 +3799,9 @@ TEST_P(MultisampledRenderToTextureES3Test, ClearThenMaskedClearFramebufferTest)
// TODO(anglebug:5655): This test is failing on Linux AMD Vulkan since it was added. // TODO(anglebug:5655): This test is failing on Linux AMD Vulkan since it was added.
ANGLE_SKIP_TEST_IF(IsLinux() && IsAMD() && IsVulkan()); ANGLE_SKIP_TEST_IF(IsLinux() && IsAMD() && IsVulkan());
// TODO(geofflang) http://anglebug.com/2894
ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGL() && IsPixel2());
constexpr GLsizei kSize = 16; constexpr GLsizei kSize = 16;
GLFramebuffer fboMS; GLFramebuffer fboMS;
...@@ -3770,8 +3816,8 @@ TEST_P(MultisampledRenderToTextureES3Test, ClearThenMaskedClearFramebufferTest) ...@@ -3770,8 +3816,8 @@ TEST_P(MultisampledRenderToTextureES3Test, ClearThenMaskedClearFramebufferTest)
GLTexture textureMS; GLTexture textureMS;
GLRenderbuffer renderbufferMS; GLRenderbuffer renderbufferMS;
createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, &textureMS, createAndAttachColorAttachment(false, kSize, GL_COLOR_ATTACHMENT0, nullptr, mTestSampleCount,
&renderbufferMS); &textureMS, &renderbufferMS);
EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER); EXPECT_GL_FRAMEBUFFER_COMPLETE(GL_FRAMEBUFFER);
// Clear depth to 0.5 and color to green. // Clear depth to 0.5 and color to green.
......
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