Clearing IOSurfaces after creation quadruples the cost to bind image to texture. |
||||
Issue descriptionChrome Version: 64.0.3256.0 OS: OSX 10.12.6 We have disabled IOSurface clearing on OSX 10.9 and 10.10 for performance reasons. I am noticing that it takes 4 times longer than without clearing on 10.12.6 as well. For surfaces that are used for GL Rendering (Ganesh, WebGL, 2D Canvas) we should avoid clearing the surface, since we have tracking in the GLES2Decoder to ensure the texture is fully initialized before use. The binding cost is accumulated until we call glFlush inside "ImageTransportSurfaceOverlayMac::ApplyBackpressure". For comparison, see durations of "ImageTransportSurfaceOverlayMac::ApplyBackpressure" on the GPU Main thread in traces with clear (*_orig.json.gz) and without clear (*_noclear.json.gz).
,
Nov 5 2017
,
Nov 15 2017
,
Dec 2 2017
I uploaded a CL for this: https://chromium-review.googlesource.com/c/chromium/src/+/804597 I could reproduce the 4x improvement in swap buffers time as in #0, although the durations are different.
,
Dec 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ea6e12b3635b8f77966cd4bacc02c31b914e95c4 commit ea6e12b3635b8f77966cd4bacc02c31b914e95c4 Author: Sunny Sachanandani <sunnyps@chromium.org> Date: Thu Dec 07 03:04:36 2017 gpu: Don't clear anonymous IO surfaces. Anonymous IO surfaces that are only used on the gpu service as render targets don't need to be cleared on initialization. vmiura@ found that this quadruples the cost of binding the io surface and that this cost is deferred to the flush. R=piman BUG= 781586 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: If7d0425a57fec4772f05daaf04dee9aaee0c730f Reviewed-on: https://chromium-review.googlesource.com/804597 Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by: David Reveman <reveman@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#522322} [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/command_buffer/service/image_factory.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/command_buffer/service/image_factory.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/command_buffer/tests/texture_image_factory.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/command_buffer/tests/texture_image_factory.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_android_hardware_buffer.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_io_surface.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/ui/gfx/generic_shared_memory_id.h [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/ui/gfx/mac/io_surface.cc [modify] https://crrev.com/ea6e12b3635b8f77966cd4bacc02c31b914e95c4/ui/gfx/mac/io_surface.h
,
Feb 26 2018
Was this resolved with the fix landed in #5?
,
Feb 27 2018
This was fixed by the change in #5. |
||||
►
Sign in to add a comment |
||||
Comment 1 by vmi...@chromium.org
, Nov 5 2017