Pepper2d (pdf) textures not being used for CALayers |
||||||||
Issue descriptionFrom https://bugs.chromium.org/p/chromium/issues/detail?id=785801 https://chromium.googlesource.com/chromium/src/+/cfab550a8e384b0e43fd104121a9be7a0a4db968 broke CA compositing forcing us to fall back into GL mode. It's visible on a mac with high dpi because damage also happens to be broken on high dpi. It should also be possible to see with layer borders or something.
,
Nov 16 2017
In a nutshell, if enabled, use TexStorage2DImageCHROMIUM+TexSubImage2D instead of TexImage2D, and mark the TransferableResource as overlay
,
Nov 16 2017
OH make it immutable is all I need? ok thanks !!
,
Nov 16 2017
To be clear, TexStorage2DImageCHROMIUM (as opposed to plain TexStorage2D) is immutable but also backed-by-GMB. See ResourceProvider::ScopedWriteLockGL::LazyAllocate for usage.
,
Nov 16 2017
Ohh ok this is what the "image" stuff is about, I overlooked that in the name there. Ok thanks will do!
,
Nov 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6809a4d6fe9136335e05f06ddf04e10ab15b6d63 commit 6809a4d6fe9136335e05f06ddf04e10ab15b6d63 Author: danakj <danakj@chromium.org> Date: Tue Nov 21 16:14:23 2017 Use scanout overlays for pepper2d when possible. If GL image textures are supported, and we can find the image texture target for the desired format, then use TexStorage2DImageCHROMIUM to allocate the texture so that it may be used for scanout. R=piman@chromium.org Bug: 786140 Change-Id: I36875f82796614f4d5c7290f27bd0bacfce510fb Reviewed-on: https://chromium-review.googlesource.com/779883 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#518269} [modify] https://crrev.com/6809a4d6fe9136335e05f06ddf04e10ab15b6d63/content/renderer/pepper/pepper_graphics_2d_host.cc [modify] https://crrev.com/6809a4d6fe9136335e05f06ddf04e10ab15b6d63/content/renderer/pepper/pepper_graphics_2d_host.h
,
Nov 21 2017
,
Nov 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/915ae8f5328453f7c0190b784683fb0005568567 commit 915ae8f5328453f7c0190b784683fb0005568567 Author: Carlos Knippschild <carlosk@chromium.org> Date: Tue Nov 21 23:36:42 2017 Revert "Use scanout overlays for pepper2d when possible." This reverts commit 6809a4d6fe9136335e05f06ddf04e10ab15b6d63. Reason for revert: This is breaking many Mac builds (see linked issue). Original change's description: > Use scanout overlays for pepper2d when possible. > > If GL image textures are supported, and we can find the image texture > target for the desired format, then use TexStorage2DImageCHROMIUM to > allocate the texture so that it may be used for scanout. > > R=piman@chromium.org > > Bug: 786140 > Change-Id: I36875f82796614f4d5c7290f27bd0bacfce510fb > Reviewed-on: https://chromium-review.googlesource.com/779883 > Reviewed-by: Antoine Labour <piman@chromium.org> > Commit-Queue: danakj <danakj@chromium.org> > Cr-Commit-Position: refs/heads/master@{#518269} TBR=danakj@chromium.org,piman@chromium.org Change-Id: I747d76984c0641a01a44e62595432d287baf7405 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 786140 , 787548 Reviewed-on: https://chromium-review.googlesource.com/783491 Reviewed-by: Carlos Knippschild <carlosk@chromium.org> Commit-Queue: Carlos Knippschild <carlosk@chromium.org> Cr-Commit-Position: refs/heads/master@{#518449} [modify] https://crrev.com/915ae8f5328453f7c0190b784683fb0005568567/content/renderer/pepper/pepper_graphics_2d_host.cc [modify] https://crrev.com/915ae8f5328453f7c0190b784683fb0005568567/content/renderer/pepper/pepper_graphics_2d_host.h
,
Nov 21 2017
,
Nov 21 2017
Issue 787548 has been merged into this issue.
,
Nov 21 2017
Something wasn't right. plugins/webview-plugin-type-change.html in webkit_layout_tests failing on multiple builders Builders failed on: - Mac10.10 Tests: https://build.chromium.org/p/chromium.mac/builders/Mac10.10%20Tests - Mac10.11 Tests: https://build.chromium.org/p/chromium.mac/builders/Mac10.11%20Tests - Mac10.12 Tests: https://build.chromium.org/p/chromium.mac/builders/Mac10.12%20Tests - WebKit Mac10.10: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.10 - WebKit Mac10.11 (dbg): https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.11%20%28dbg%29 - WebKit Mac10.11: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.11 - WebKit Mac10.12: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.12
,
Nov 21 2017
Example from Mac10.10
,
Nov 21 2017
The result was black on these bots. Why wasn't it in the CQ?
,
Nov 22 2017
stderr: [14679:779:1121/160040.584441:ERROR:gl_image_io_surface.mm(278)] IOSurface requires TEXTURE_RECTANGLE_ARB target [14679:779:1121/160040.584618:ERROR:gles2_cmd_decoder.cc(18044)] [.Offscreen-MainThread-0x7fe77d809000]GL ERROR :GL_INVALID_OPERATION : glTexStorage2DImageCHROMIUM: Failed to create or bind GL Image [14679:779:1121/160040.584740:ERROR:texture_manager.cc(2897)] [.Offscreen-MainThread-0x7fe77d809000]GL ERROR :GL_INVALID_OPERATION : glTexSubImage2D: level 0 does not exist [14679:779:1121/160040.644212:ERROR:gles2_cmd_decoder.cc(9982)] [.Context-For-Testing-0x7fe77b05a200]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
,
Nov 22 2017
Current hypothesis: Need to setup storage before producing the mailbox.
,
Nov 22 2017
,
Nov 22 2017
That wasn't it. :/
,
Nov 22 2017
On chromeos_linux, the texture target map has GL_TEXTURE_2D as the target for everything because IsNativeGpuMemoryBufferConfigurationSupported() is false for everything. But then we go ahead and try to use TexStorage2DImage anyway and it fails cuz it's the wrong target.. Here's the map, every value is GL_TEXTURE_2D(3553) 0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;0,18,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;1,18,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;2,18,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;3,17,3553;3,18,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553;4,18,3553;5,0,3553;5,1,3553;5,2,3553;5,3,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,3553;5,11,3553;5,12,3553;5,13,3553;5,14,3553;5,15,3553;5,16,3553;5,17,3553;5,18,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3553;6,4,3553;6,5,3553;6,6,3553;6,7,3553;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,3553;6,15,3553;6,16,3553;6,17,3553;6,18,3553 Then it fails glTexStorage2DImageCHROMIUM, not dissimilarly to the mac bots. [1:1:1122/161950.600336:ERROR:pepper_graphics_2d_host.cc(234)] rti 0x31dcf67b4800 [1:1:1122/161950.600579:ERROR:pepper_graphics_2d_host.cc(245)] scanout_texture_target_bgra_ 3553 [1:1:1122/161950.600709:ERROR:pepper_graphics_2d_host.cc(247)] scanout_texture_target_rgba_ 3553 [182219:182219:1122/161950.725766:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(146)] Failed to create pixmap 150x150 format 14 [182219:182219:1122/161950.725844:ERROR:gles2_cmd_decoder.cc(18044)] [.Offscreen-MainThread-0x31dcf6939800]GL ERROR :GL_INVALID_OPERATION : glTexStorage2DImageCHROMIUM: Failed to create or bind GL Image
,
Nov 22 2017
,
Nov 22 2017
I think I see it. ResourceProvider would avoid glTexStorage2DImageCHROMIUM if resource_settings.use_gpu_memory_buffer_resources is false. This comes from compositor_deps->IsGpuMemoryBufferCompositorResourcesEnabled() which is RenderThreadImpl. RenderProcessHostImpl enabled this via the command line if IsGpuMemoryBufferCompositorResourcesEnabled(), which is not true for software GL - which is what we use in layout tests. So we shouldn't even try to use the map if this is false.
,
Nov 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8fe9ab487e3a9c313c331ee464f54a19a3164ebf commit 8fe9ab487e3a9c313c331ee464f54a19a3164ebf Author: danakj <danakj@chromium.org> Date: Wed Nov 22 23:56:22 2017 Use scanout overlays for pepper2d when possible. If GL image textures are supported, and we can find the image texture target for the desired format, then use TexStorage2DImageCHROMIUM to allocate the texture so that it may be used for scanout. From the original patch this fixes layout tests which were trying to use overlays but can't. Now this asks the RenderThreadImpl if Gpu memory buffers should be used at all before trying to use the map to determine targets. Also noticed that we are not resetting the composited_output_modified_ bool for damage in the gpu texture upload path, which means we'll submit more frames than we used to without purpose. So resetting that bool to false now on the gpu compositing path. R=ccameron TBR=piman@chromium.org Bug: 786140 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 Change-Id: I1ad318f45143f8587f5f99775afbe23a0a9eafc4 Reviewed-on: https://chromium-review.googlesource.com/783851 Commit-Queue: danakj <danakj@chromium.org> Reviewed-by: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#518809} [modify] https://crrev.com/8fe9ab487e3a9c313c331ee464f54a19a3164ebf/components/viz/common/resources/transferable_resource.h [modify] https://crrev.com/8fe9ab487e3a9c313c331ee464f54a19a3164ebf/content/renderer/pepper/pepper_graphics_2d_host.cc [modify] https://crrev.com/8fe9ab487e3a9c313c331ee464f54a19a3164ebf/content/renderer/pepper/pepper_graphics_2d_host.h
,
Nov 22 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by danakj@chromium.org
, Nov 16 2017