Skip to content
  • kbr's avatar
    Fix blits from multisampled renderbuffers to alpha:false WebGL back buffer. · e90ed61e
    kbr authored
    (Re-land after fix to avoid deleting nonexistent textures.)
    
    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
    TBR=zmo@chromium.org,ccameron@chromium.org
    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/2838743002
    Cr-Commit-Position: refs/heads/master@{#466878}
    e90ed61e