Commit 398fb219 authored by geofflang's avatar geofflang Committed by Commit bot

Decompress ETC texture data when there is no native support.

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

Review-Url: https://codereview.chromium.org/2076213002
Cr-Commit-Position: refs/heads/master@{#405183}
parent ad659671
...@@ -79,13 +79,14 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations): ...@@ -79,13 +79,14 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations):
self.Fail('deqp/functional/gles3/fboinvalidate/whole.html', self.Fail('deqp/functional/gles3/fboinvalidate/whole.html',
['win'], bug=624506) ['win'], bug=624506)
self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html',
['win'], bug=614573)
# Windows 8 only. # Windows 8 only.
self.Flaky('deqp/functional/gles3/buffercopy.html', ['win8'], bug=587601) self.Flaky('deqp/functional/gles3/buffercopy.html', ['win8'], bug=587601)
# Win / NVidia # Win / NVidia
self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html',
['win', 'nvidia'], bug=614573)
self.Fail('deqp/functional/gles3/framebufferblit/rect_02.html', self.Fail('deqp/functional/gles3/framebufferblit/rect_02.html',
['win', 'nvidia'], bug=483282) ['win', 'nvidia'], bug=483282)
self.Fail('deqp/functional/gles3/framebufferblit/rect_05.html', self.Fail('deqp/functional/gles3/framebufferblit/rect_05.html',
...@@ -100,8 +101,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations): ...@@ -100,8 +101,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations):
self.Fail('deqp/functional/gles3/texturespecification/' + self.Fail('deqp/functional/gles3/texturespecification/' +
'texstorage3d_format_depth_stencil.html', 'texstorage3d_format_depth_stencil.html',
['win', ('amd', 0x6779)], bug=614178) ['win', ('amd', 0x6779)], bug=614178)
self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html',
['win', ('amd', 0x6779)], bug=614573)
self.Fail('deqp/functional/gles3/shadertexturefunction/texture.html', self.Fail('deqp/functional/gles3/shadertexturefunction/texture.html',
['win', ('amd', 0x6779)], bug=483282) ['win', ('amd', 0x6779)], bug=483282)
self.Fail('deqp/functional/gles3/shadertexturefunction/' + self.Fail('deqp/functional/gles3/shadertexturefunction/' +
...@@ -159,8 +158,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations): ...@@ -159,8 +158,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations):
['win', 'intel'], bug=614418) ['win', 'intel'], bug=614418)
self.Fail('deqp/functional/gles3/textureformat/sized_depth_stencil.html', self.Fail('deqp/functional/gles3/textureformat/sized_depth_stencil.html',
['win', 'intel'], bug=614418) ['win', 'intel'], bug=614418)
self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html',
['win', 'intel'], bug=614418)
self.Flaky('deqp/functional/gles3/textureformat/unsized_3d.html', self.Flaky('deqp/functional/gles3/textureformat/unsized_3d.html',
['win', 'intel'], bug=614418) ['win', 'intel'], bug=614418)
self.Fail('deqp/functional/gles3/shadertexturefunction/texture.html', self.Fail('deqp/functional/gles3/shadertexturefunction/texture.html',
...@@ -191,12 +188,8 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations): ...@@ -191,12 +188,8 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations):
self.Fail('deqp/functional/gles3/uniformbuffers/random.html', self.Fail('deqp/functional/gles3/uniformbuffers/random.html',
['mac'], bug=618464) ['mac'], bug=618464)
self.Fail('deqp/functional/gles3/textureformat/compressed_2d.html',
['mac'], bug=612205)
self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html', self.Fail('deqp/functional/gles3/textureformat/compressed_cube.html',
['mac'], bug=612205) ['mac'], bug=612205)
self.Fail('deqp/functional/gles3/texturewrap/e*',
['mac'], bug=612205)
self.Fail('deqp/data/gles3/shaders/qualification_order.html', self.Fail('deqp/data/gles3/shaders/qualification_order.html',
['mac'], bug=483282) ['mac'], bug=483282)
...@@ -205,10 +198,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations): ...@@ -205,10 +198,6 @@ class WebGL2ConformanceExpectations(WebGLConformanceExpectations):
self.Fail('deqp/functional/gles3/pixelbufferobject.html', self.Fail('deqp/functional/gles3/pixelbufferobject.html',
['mac'], bug=483282) ['mac'], bug=483282)
self.Fail('conformance2/textures/misc/compressed-tex-image.html',
['mac'], bug=565438)
self.Fail('conformance2/textures/misc/tex-storage-compressed-formats.html',
['mac'], bug=295792)
self.Fail('conformance2/renderbuffers/framebuffer-test.html', self.Fail('conformance2/renderbuffers/framebuffer-test.html',
['mac'], bug=483282) ['mac'], bug=483282)
self.Fail('conformance2/rendering/framebuffer-completeness-unaffected.html', self.Fail('conformance2/rendering/framebuffer-completeness-unaffected.html',
......
...@@ -157,6 +157,7 @@ source_set("service_sources") { ...@@ -157,6 +157,7 @@ source_set("service_sources") {
"//gpu/command_buffer/client:client_sources", "//gpu/command_buffer/client:client_sources",
"//gpu/command_buffer/common:gles2_utils", "//gpu/command_buffer/common:gles2_utils",
"//gpu/config:config_sources", "//gpu/config:config_sources",
"//third_party/angle:angle_image_util",
"//third_party/angle:commit_id", "//third_party/angle:commit_id",
"//third_party/angle:translator", "//third_party/angle:translator",
"//third_party/protobuf:protobuf_lite", "//third_party/protobuf:protobuf_lite",
......
...@@ -265,6 +265,26 @@ void ContextState::RestoreTextureUnitBindings( ...@@ -265,6 +265,26 @@ void ContextState::RestoreTextureUnitBindings(
} }
} }
void ContextState::PushTextureDecompressionUnpackState() const {
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if (bound_pixel_unpack_buffer.get()) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
}
}
void ContextState::RestoreUnpackState() const {
glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
if (bound_pixel_unpack_buffer.get()) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER,
GetBufferId(bound_pixel_unpack_buffer.get()));
glPixelStorei(GL_UNPACK_ROW_LENGTH, unpack_row_length);
glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack_image_height);
}
}
void ContextState::RestoreBufferBindings() const { void ContextState::RestoreBufferBindings() const {
if (vertex_attrib_manager.get()) { if (vertex_attrib_manager.get()) {
Buffer* element_array_buffer = Buffer* element_array_buffer =
......
...@@ -195,6 +195,9 @@ struct GPU_EXPORT ContextState { ...@@ -195,6 +195,9 @@ struct GPU_EXPORT ContextState {
void RestoreTextureUnitBindings( void RestoreTextureUnitBindings(
GLuint unit, const ContextState* prev_state) const; GLuint unit, const ContextState* prev_state) const;
void PushTextureDecompressionUnpackState() const;
void RestoreUnpackState() const;
// Helper for getting cached state. // Helper for getting cached state.
bool GetStateAsGLint( bool GetStateAsGLint(
GLenum pname, GLint* params, GLsizei* num_written) const; GLenum pname, GLint* params, GLsizei* num_written) const;
......
...@@ -137,7 +137,8 @@ FeatureInfo::FeatureFlags::FeatureFlags() ...@@ -137,7 +137,8 @@ FeatureInfo::FeatureFlags::FeatureFlags()
ext_multisample_compatibility(false), ext_multisample_compatibility(false),
ext_blend_func_extended(false), ext_blend_func_extended(false),
ext_read_format_bgra(false), ext_read_format_bgra(false),
desktop_srgb_support(false) {} desktop_srgb_support(false),
arb_es3_compatibility(false) {}
FeatureInfo::FeatureInfo() { FeatureInfo::FeatureInfo() {
InitializeBasicState(base::CommandLine::InitializedForCurrentProcess() InitializeBasicState(base::CommandLine::InitializedForCurrentProcess()
...@@ -644,6 +645,12 @@ void FeatureInfo::InitializeFeatures() { ...@@ -644,6 +645,12 @@ void FeatureInfo::InitializeFeatures() {
validators_.read_pixel_format.AddValue(GL_BGRA_EXT); validators_.read_pixel_format.AddValue(GL_BGRA_EXT);
} }
// GL_ARB_ES3_compatibility adds support for some ES3 texture formats that are
// not supported in desktop GL
feature_flags_.arb_es3_compatibility =
extensions.Contains("GL_ARB_ES3_compatibility") &&
!gl_version_info_->is_es;
// glGetInteger64v for timestamps is implemented on the client side in a way // glGetInteger64v for timestamps is implemented on the client side in a way
// that it does not depend on a driver-level implementation of // that it does not depend on a driver-level implementation of
// glGetInteger64v. The GPUTimer class which implements timer queries can also // glGetInteger64v. The GPUTimer class which implements timer queries can also
......
...@@ -91,6 +91,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { ...@@ -91,6 +91,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
bool ext_blend_func_extended; bool ext_blend_func_extended;
bool ext_read_format_bgra; bool ext_read_format_bgra;
bool desktop_srgb_support; bool desktop_srgb_support;
bool arb_es3_compatibility;
}; };
FeatureInfo(); FeatureInfo();
......
...@@ -699,6 +699,7 @@ ...@@ -699,6 +699,7 @@
'../build/android/disable_gcc_lto.gypi', '../build/android/disable_gcc_lto.gypi',
], ],
'dependencies': [ 'dependencies': [
'../third_party/angle/src/angle.gyp:angle_image_util',
'command_buffer_common', 'command_buffer_common',
'disk_cache_proto', 'disk_cache_proto',
'gpu_config', 'gpu_config',
...@@ -793,6 +794,7 @@ ...@@ -793,6 +794,7 @@
], ],
'dependencies': [ 'dependencies': [
'../base/base.gyp:base', '../base/base.gyp:base',
'../third_party/angle/src/angle.gyp:angle_image_util',
'command_buffer/command_buffer.gyp:gles2_utils', 'command_buffer/command_buffer.gyp:gles2_utils',
'disk_cache_proto', 'disk_cache_proto',
], ],
......
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