Commit 3e4c260b authored by kainino's avatar kainino Committed by Commit bot

Disable ETC1 textures on WebGL 1 on ANGLE

BUG=658929
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2576813002
Cr-Commit-Position: refs/heads/master@{#438638}
parent 699f628e
...@@ -51,7 +51,7 @@ class WebGLConformanceExpectations(GpuTestExpectations): ...@@ -51,7 +51,7 @@ class WebGLConformanceExpectations(GpuTestExpectations):
self.Skip('WebglExtension_WEBGL_compressed_texture_atc', self.Skip('WebglExtension_WEBGL_compressed_texture_atc',
['win', 'mac', 'linux']) ['win', 'mac', 'linux'])
self.Skip('WebglExtension_WEBGL_compressed_texture_etc1', self.Skip('WebglExtension_WEBGL_compressed_texture_etc1',
['mac', 'linux']) ['win', 'mac', 'linux'])
self.Skip('WebglExtension_WEBGL_compressed_texture_pvrtc', self.Skip('WebglExtension_WEBGL_compressed_texture_pvrtc',
['win', 'mac', 'linux']) ['win', 'mac', 'linux'])
self.Skip('WebglExtension_WEBGL_compressed_texture_s3tc_srgb', self.Skip('WebglExtension_WEBGL_compressed_texture_s3tc_srgb',
...@@ -62,8 +62,6 @@ class WebGLConformanceExpectations(GpuTestExpectations): ...@@ -62,8 +62,6 @@ class WebGLConformanceExpectations(GpuTestExpectations):
['win', 'd3d9']) ['win', 'd3d9'])
self.Fail('WebglExtension_EXT_sRGB', self.Fail('WebglExtension_EXT_sRGB',
['win', 'd3d9']) ['win', 'd3d9'])
self.Fail('WebglExtension_WEBGL_compressed_texture_etc1',
['win', 'd3d9'])
self.Fail('WebglExtension_WEBGL_depth_texture', self.Fail('WebglExtension_WEBGL_depth_texture',
['win', 'amd', 'd3d9']) ['win', 'amd', 'd3d9'])
......
...@@ -1037,7 +1037,11 @@ void FeatureInfo::InitializeFeatures() { ...@@ -1037,7 +1037,11 @@ void FeatureInfo::InitializeFeatures() {
validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES); validators_.g_l_state.AddValue(GL_TEXTURE_BINDING_EXTERNAL_OES);
} }
if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture")) { // TODO(kainino): If we add a way to query whether ANGLE is exposing
// native support for ETC1 textures, require that here. Otherwise, we could
// co-opt the native-ETC2-support query discussed below.
if (extensions.Contains("GL_OES_compressed_ETC1_RGB8_texture") &&
!gl_version_info_->is_angle) {
AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture"); AddExtensionString("GL_OES_compressed_ETC1_RGB8_texture");
feature_flags_.oes_compressed_etc1_rgb8_texture = true; feature_flags_.oes_compressed_etc1_rgb8_texture = true;
validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES); validators_.compressed_texture_format.AddValue(GL_ETC1_RGB8_OES);
......
...@@ -25,12 +25,8 @@ WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create( ...@@ -25,12 +25,8 @@ WebGLCompressedTextureETC1* WebGLCompressedTextureETC1::create(
bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) { bool WebGLCompressedTextureETC1::supported(WebGLRenderingContextBase* context) {
Extensions3DUtil* extensionsUtil = context->extensionsUtil(); Extensions3DUtil* extensionsUtil = context->extensionsUtil();
bool webgl1 = !context->isWebGL2OrHigher(); return extensionsUtil->supportsExtension(
bool etc1 = "GL_OES_compressed_ETC1_RGB8_texture");
extensionsUtil->supportsExtension("GL_OES_compressed_ETC1_RGB8_texture");
bool etc =
extensionsUtil->supportsExtension("GL_CHROMIUM_compressed_texture_etc");
return (webgl1 || etc) && etc1;
} }
const char* WebGLCompressedTextureETC1::extensionName() { const char* WebGLCompressedTextureETC1::extensionName() {
......
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