0

gpu: Check GL_RED FBO support only on Linux and ChromeOS

The check was added to workaround a Mesa bug so it shouldn't be needed
on other platforms.  On Mac in particular, the call to glTexImage2D is
a top hang on stable channel.

Bug: 1158744
Change-Id: Ie7b5257f6e0cdd9c8d39a61896a25e951f62fc20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2939048
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#889501}
This commit is contained in:
Sunny Sachanandani
2021-06-04 23:00:38 +00:00
committed by Chromium LUCI CQ
parent 0fd36b5ba7
commit eb4c2a92e1
2 changed files with 7 additions and 0 deletions
gpu/command_buffer/service

@ -278,6 +278,7 @@ void FeatureInfo::InitializeForTesting(ContextType context_type) {
}
bool IsGL_REDSupportedOnFBOs() {
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
DCHECK(glGetError() == GL_NO_ERROR);
// Skia uses GL_RED with frame buffers, unfortunately, Mesa claims to support
// GL_EXT_texture_rg, but it doesn't support it on frame buffers. To fix
@ -309,6 +310,9 @@ bool IsGL_REDSupportedOnFBOs() {
DCHECK(glGetError() == GL_NO_ERROR);
return result;
#else
return true;
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
}
void FeatureInfo::EnableCHROMIUMTextureStorageImage() {

@ -12,6 +12,7 @@
#include "base/cxx17_backports.h"
#include "base/strings/string_number_conversions.h"
#include "build/build_config.h"
#include "gpu/command_buffer/service/buffer_manager.h"
#include "gpu/command_buffer/service/error_state_mock.h"
#include "gpu/command_buffer/service/feature_info.h"
@ -676,6 +677,7 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
.RetiresOnSaturation();
}
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
if (gl_info.is_es3 || gl_info.is_desktop_core_profile ||
gfx::HasExtension(extension_set, "GL_EXT_texture_rg") ||
(gfx::HasExtension(extension_set, "GL_ARB_texture_rg"))) {
@ -734,6 +736,7 @@ void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
.RetiresOnSaturation();
#endif
}
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
}
void TestHelper::SetupExpectationsForClearingUniforms(::gl::MockGLInterface* gl,