Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Issue 2831733003: Fix blits from multisampled renderbuffers to alpha:false WebGL back buffer. (Closed)

Created:
3 years, 8 months ago by Ken Russell (switch to Gerrit)
Modified:
3 years, 8 months ago
Reviewers:
Zhenyao Mo, ccameron
CC:
chromium-reviews, extensions-reviews_chromium.org, krit, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, pdr+graphicswatchlist_chromium.org, fmalita+watch_chromium.org, blink-reviews, Rik, Justin Novosad, piman+watch_chromium.org, haraken, chromium-apps-reviews_chromium.org, kinuko+watch, mac-reviews_chromium.org, ajuma+watch_chromium.org, Stephen Chennney, rwlbuis, erikchen, Kai Ninomiya
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix blits from multisampled renderbuffers to alpha:false WebGL back buffer. Blitting from a multisampled RGB8 renderbuffer to an alpha:false WebGL back buffer is supposed to work, and from an RGBA8 renderbuffer is supposed to not work. The emulation of IOSurface-backed RGB textures using RGBA textures didn't handle this case. Add BindTexImage2DWithInternalformatCHROMIUM to the command buffer to allow internal format to be overridden; currently this is only supported on macOS. Use this to bind a second texture to the IOSurface and use it only for BlitFramebuffer calls from WebGL, fixing up the alpha channel afterward. Covered by new conformance test in https://github.com/KhronosGroup/WebGL/pull/2377 . BUG=699566 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;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/2831733003 Cr-Commit-Position: refs/heads/master@{#466523} Committed: https://chromium.googlesource.com/chromium/src/+/3d4d5d7a9198bea6f0018a36fc6825637f9a12c4

Patch Set 1 #

Total comments: 2

Patch Set 2 : Preemptively rebased. #

Total comments: 2

Patch Set 3 : Removed failure expectation for associated test. #

Patch Set 4 : Add PLATFORM_EXPORT to fix link failure on Windows. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -114 lines) Patch
M content/test/gpu/gpu_tests/webgl2_conformance_expectations.py View 1 2 1 chunk +0 lines, -3 lines 0 comments Download
M gpu/GLES2/extensions/CHROMIUM/CHROMIUM_image.txt View 2 chunks +35 lines, -5 lines 0 comments Download
M gpu/GLES2/gl2chromium_autogen.h View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/GLES2/gl2extchromium.h View 3 chunks +16 lines, -15 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 2 chunks +12 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_impl_autogen.h View 1 chunk +15 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_autogen.h View 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_autogen.h View 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h View 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_autogen.h View 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h View 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 chunk +46 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 chunk +15 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 chunk +54 lines, -53 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 4 chunks +43 lines, -15 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 chunk +18 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h View 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h View 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc View 1 2 1 chunk +8 lines, -15 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 3 5 chunks +31 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 4 chunks +90 lines, -0 lines 0 comments Download
M ui/gl/gl_image.h View 1 chunk +7 lines, -0 lines 0 comments Download
M ui/gl/gl_image.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gl/gl_image_io_surface.mm View 1 3 chunks +14 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
Ken Russell (switch to Gerrit)
zmo: please review. ccameron, erikchen: FYI only, but any comments welcome. While this CL looks ...
3 years, 8 months ago (2017-04-19 22:41:34 UTC) #3
Zhenyao Mo
LGTM https://codereview.chromium.org/2831733003/diff/1/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2831733003/diff/1/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode1353 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:1353: target, back_color_buffer_->texture_id, 0); Please make sure this was ...
3 years, 8 months ago (2017-04-19 23:07:34 UTC) #4
Ken Russell (switch to Gerrit)
Thanks for your review. https://codereview.chromium.org/2831733003/diff/1/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2831733003/diff/1/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode1353 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:1353: target, back_color_buffer_->texture_id, 0); On 2017/04/19 ...
3 years, 8 months ago (2017-04-20 01:49:18 UTC) #5
ccameron
lgtm ... I'd like to know the comparative power implications, but, realistically, let's fix the ...
3 years, 8 months ago (2017-04-20 03:38:19 UTC) #7
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/2831733003/diff/20001/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp (right): https://codereview.chromium.org/2831733003/diff/20001/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp#newcode430 third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp:430: GetDrawingBuffer()); On 2017/04/20 03:38:19, ccameron wrote: > This incurs ...
3 years, 8 months ago (2017-04-20 17:12:33 UTC) #8
ccameron
On 2017/04/20 17:12:33, Ken Russell wrote: > https://codereview.chromium.org/2831733003/diff/20001/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp > File third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp > (right): > > ...
3 years, 8 months ago (2017-04-20 17:14:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2831733003/40001
3 years, 8 months ago (2017-04-21 21:33:06 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/410885)
3 years, 8 months ago (2017-04-21 22:54:58 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2831733003/60001
3 years, 8 months ago (2017-04-21 23:43:09 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/3d4d5d7a9198bea6f0018a36fc6825637f9a12c4
3 years, 8 months ago (2017-04-22 02:09:19 UTC) #20
pkalinnikov
3 years, 8 months ago (2017-04-24 12:00:53 UTC) #21
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/2837833002/ by pkalinnikov@chromium.org.

The reason for reverting is: Reverting because 4
gpu_tests.context_lost_integration_test.ContextLostIntegrationTest.ContextLost_WebGLContextLost*
tests and GpuCrash_GPUProcessCrashesExactlyOncePerVisitToAboutGpuCrash crash on
"Mac Retina Debug (AMD)" bot..

Powered by Google App Engine
This is Rietveld 408576698