Improve TransferBuffer sizing logic |
|||||||||
Issue descriptionThe resizing logic in TransferBuffer could use some improvement. Right now the transfer buffer only grows when a single transfer is larger than the current total transfer buffer size: https://cs.chromium.org/chromium/src/gpu/command_buffer/client/transfer_buffer.cc?q=TransferBuffer::ReallocateRingBuffer&sq=package:chromium&g=0&l=151 In other words, we prefer waiting for completion of the service side over allocating more memory. One of the reasons was that reallocating transfer buffers use to require a command buffer finish, i.e. generally waiting was cheaper than reallocating anyway, but that was fixed in https://chromium-review.googlesource.com/634215. Some of the cost of waiting is reduced with early-flushing as the command buffer gets filled up, but that's a bit of a crutch that causes other issues (e.g. crbug.com/828363). So we could be more aggressive with reallocating a TransferBuffer instead of waiting, modulo a few things: 1- it still requires a Flush to reallocate, something to keep in mind. We could in theory remove this Flush though it would require some work. 2- we don't want the TransferBuffer to grow unbounded, so we should still respect the limits 3- when we free a TransferBuffer, the memory only really goes away asynchronously, after the commands corresponding to the Flush have been issued. So after a resize the current in-flight size might be larger than the visible TransferBuffer size. Although some slack should be fine to account for this spike, we don't want that in-flight size to also grow unbounded either. 4- we never shrink TransferBuffers, only free them entirely (e.g. when going offscreen, on *some* contexts, not all). If we grow more aggressively, we probably also want to be able to shrink them to avoid increasing the steady state allocated memory, if usage is spiky (e.g. lots of texture uploads at load time, but much less so in steady state). The ideal size is the amount of transfers that are in-flight until we throttle command production, i.e. typically a couple of frames. Individual contexts don't generally have a clear notion of frame boundary, so we should think of schemes to measure in-flight usage, e.g. regularly measure ring_buffer_->GetLargestFreeSizeNoWaitingInternal() and keep track of the high watermark, and resize to that after some time/event (e.g. when wrapping around the transfer buffer, or the client could explicitly trigger that at some known good place).
,
Jun 10 2018
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e commit 7a59e08137d5c51fa6695fe8ce0557ee257f4a8e Author: James Darpinian <jdarpinian@chromium.org> Date: Fri Jun 15 00:19:53 2018 GPU: Don't flush when destroying transfer buffers. Destroying a transfer buffer now requires only an ordering barrier, not a full flush. This removes a source of unnecessary flushes and makes resizing the transfer buffer more efficient. Bug: 850271 , 835353, 828363 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I9bfe43c46c00f8e9fc29e6450da788f86e74bc52 Reviewed-on: https://chromium-review.googlesource.com/1093580 Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#567494} [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/command_buffer/client/cmd_buffer_helper.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/command_buffer/client/cmd_buffer_helper_test.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/command_buffer/client/mapped_memory.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/command_buffer/client/transfer_buffer_unittest.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/client/command_buffer_proxy_impl.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/client/gpu_channel_host.cc [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/client/gpu_channel_host.h [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/common/flush_params.h [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/common/gpu_param_traits_macros.h [modify] https://crrev.com/7a59e08137d5c51fa6695fe8ce0557ee257f4a8e/gpu/ipc/service/gpu_channel.cc
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5a49da30d841e14aaabe40748de574908c3f6c58 commit 5a49da30d841e14aaabe40748de574908c3f6c58 Author: Francois Doray <fdoray@chromium.org> Date: Fri Jun 15 14:04:36 2018 Revert "GPU: Don't flush when destroying transfer buffers." This reverts commit 7a59e08137d5c51fa6695fe8ce0557ee257f4a8e. Reason for revert: https://crbug.com/853194 Original change's description: > GPU: Don't flush when destroying transfer buffers. > > Destroying a transfer buffer now requires only an ordering barrier, not > a full flush. This removes a source of unnecessary flushes and makes > resizing the transfer buffer more efficient. > > Bug: 850271 , 835353, 828363 > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel > Change-Id: I9bfe43c46c00f8e9fc29e6450da788f86e74bc52 > Reviewed-on: https://chromium-review.googlesource.com/1093580 > Reviewed-by: Robert Sesek <rsesek@chromium.org> > Reviewed-by: Antoine Labour <piman@chromium.org> > Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> > Commit-Queue: James Darpinian <jdarpinian@chromium.org> > Cr-Commit-Position: refs/heads/master@{#567494} TBR=sunnyps@chromium.org,rsesek@chromium.org,piman@chromium.org,jdarpinian@chromium.org No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 850271 , 835353, 828363 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I7cd21d6cee9beca02ae28da8614a58e2f53dc848 Reviewed-on: https://chromium-review.googlesource.com/1102346 Commit-Queue: François Doray <fdoray@chromium.org> Reviewed-by: François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#567631} [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/command_buffer/client/cmd_buffer_helper.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/command_buffer/client/cmd_buffer_helper_test.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/command_buffer/client/mapped_memory.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/command_buffer/client/transfer_buffer_unittest.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/client/command_buffer_proxy_impl.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/client/gpu_channel_host.cc [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/client/gpu_channel_host.h [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/common/flush_params.h [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/common/gpu_param_traits_macros.h [modify] https://crrev.com/5a49da30d841e14aaabe40748de574908c3f6c58/gpu/ipc/service/gpu_channel.cc
,
Jun 19 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d1b4ae2892b05cf622b3f649cb38b995ed2d1733 commit d1b4ae2892b05cf622b3f649cb38b995ed2d1733 Author: James Darpinian <jdarpinian@chromium.org> Date: Tue Jun 19 19:49:08 2018 GPU: Don't flush when destroying transfer buffers. This reverts commit 5a49da30d841e14aaabe40748de574908c3f6c58. 2nd try due to http://crbug.com/853194 1st try was here: https://chromium-review.googlesource.com/c/chromium/src/+/1093580 Destroying a transfer buffer now requires only an ordering barrier, not a full flush. This removes a source of unnecessary flushes and makes resizing the transfer buffer more efficient. Bug: 850271 , 835353, 828363, 853194 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ibc5e72fcf4538a3f10022a613e9d0f15e4e7a95a Reviewed-on: https://chromium-review.googlesource.com/1105466 Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#568575} [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/command_buffer/client/cmd_buffer_helper.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/command_buffer/client/cmd_buffer_helper_test.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/command_buffer/client/mapped_memory.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/command_buffer/client/transfer_buffer_unittest.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/client/command_buffer_proxy_impl.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/client/gpu_channel_host.cc [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/client/gpu_channel_host.h [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/common/flush_params.h [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/common/gpu_param_traits_macros.h [modify] https://crrev.com/d1b4ae2892b05cf622b3f649cb38b995ed2d1733/gpu/ipc/service/gpu_channel.cc
,
Jul 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c9afd79a9b8dddba6169dd805f60d8f4b14b82c7 commit c9afd79a9b8dddba6169dd805f60d8f4b14b82c7 Author: James Darpinian <jdarpinian@chromium.org> Date: Tue Jul 03 01:31:40 2018 GPU: Fix transfer buffers not being freed promptly A previous change removed the command buffer flush when destroying a transfer buffer: https://chromium-review.googlesource.com/c/chromium/src/+/1105466 If we want to free a transfer buffer promptly, we now need to flush separately, and we do. Unfortunately if no commands were issued between the call to DestroyTransferBuffer and the flush, the flush might not execute because the CommandBufferProxy would pass an outdated flush ID to GpuChannelHost::EnsureFlush. The fix is to inform the CommandBufferProxy about the new flush ID when it calls DestroyTransferBuffer. This should fix the memory regressions on the perf waterfall noted in bug 855402. Bug: 855402, 850271 , 835353, 828363 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Id125c5124b26763e692c1fe8067df28761fa6dab Reviewed-on: https://chromium-review.googlesource.com/1121590 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#572074} [modify] https://crrev.com/c9afd79a9b8dddba6169dd805f60d8f4b14b82c7/gpu/ipc/client/command_buffer_proxy_impl.cc [modify] https://crrev.com/c9afd79a9b8dddba6169dd805f60d8f4b14b82c7/gpu/ipc/client/gpu_channel_host.cc [modify] https://crrev.com/c9afd79a9b8dddba6169dd805f60d8f4b14b82c7/gpu/ipc/client/gpu_channel_host.h
,
Jul 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783 commit 65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783 Author: James Darpinian <jdarpinian@chromium.org> Date: Tue Jul 03 07:23:17 2018 GPU: Grow and shrink transfer buffer Automatically grow the transfer buffer when it is full and shrink it when the full capacity is not being used. Allow choosing larger and smaller sizes than before. Before we would only grow it when a single transfer request was larger than the whole buffer; requests smaller than the whole buffer would just block if the buffer was full. Also we would not ever shrink the buffer until someone called Free() manually. Bug: 850271 , 835353, 828363, 856347 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: If2f2235a1d5297c63663398b37e1e30791347a3e Reviewed-on: https://chromium-review.googlesource.com/1105505 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#572135} [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/client_test_helper.cc [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/client_test_helper.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/gles2_implementation.cc [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/implementation_base.cc [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/implementation_base.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/mock_transfer_buffer.cc [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/mock_transfer_buffer.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/ring_buffer.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/shared_memory_limits.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/transfer_buffer.h [modify] https://crrev.com/65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783/gpu/command_buffer/client/transfer_buffer_unittest.cc
,
Jul 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6df2efa5313f48302a51d510fa9b5983811c2328 commit 6df2efa5313f48302a51d510fa9b5983811c2328 Author: Brian Sheedy <bsheedy@chromium.org> Date: Tue Jul 03 17:42:32 2018 Revert "GPU: Grow and shrink transfer buffer" This reverts commit 65c38f54b0ae666e8b27bfa5aef6d3ab92d4a783. Reason for revert: Causing DCHECK failures in VR instrumentation tests Original change's description: > GPU: Grow and shrink transfer buffer > > Automatically grow the transfer buffer when it is full and shrink it > when the full capacity is not being used. Allow choosing larger and > smaller sizes than before. > > Before we would only grow it when a single transfer request was larger > than the whole buffer; requests smaller than the whole buffer would just > block if the buffer was full. Also we would not ever shrink the buffer > until someone called Free() manually. > > Bug: 850271 , 835353, 828363, 856347 > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel > Change-Id: If2f2235a1d5297c63663398b37e1e30791347a3e > Reviewed-on: https://chromium-review.googlesource.com/1105505 > Commit-Queue: James Darpinian <jdarpinian@chromium.org> > Reviewed-by: Antoine Labour <piman@chromium.org> > Cr-Commit-Position: refs/heads/master@{#572135} TBR=jdarpinian@chromium.org,sunnyps@chromium.org,piman@chromium.org Change-Id: I031b30234cdcfbd8a4e48c7ebb6fd23312ec10ed No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 850271 , 835353, 828363, 856347 , 859952 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Reviewed-on: https://chromium-review.googlesource.com/1124822 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Commit-Queue: Brian Sheedy <bsheedy@chromium.org> Cr-Commit-Position: refs/heads/master@{#572277} [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/client_test_helper.cc [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/client_test_helper.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/gles2_implementation.cc [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/implementation_base.cc [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/implementation_base.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/mock_transfer_buffer.cc [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/mock_transfer_buffer.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/ring_buffer.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/shared_memory_limits.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/transfer_buffer.h [modify] https://crrev.com/6df2efa5313f48302a51d510fa9b5983811c2328/gpu/command_buffer/client/transfer_buffer_unittest.cc
,
Jul 5
bsheedy@: could you please provide a link to at least one failing build? Please do this in your CL reverts from now on. Thanks.
,
Jul 5
,
Jul 6
Per comment on https://chromium-review.googlesource.com/1124822 , the failures were filed as Issue 859952 , and one example failed build was: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Nougat%20Phone%20Tester/6770
,
Jul 7
Taking over from James while he's OOO.
,
Jul 7
Note to self that the original patch included a reordering of setting of the command buffer's buckets and fetching of the Result pointer: https://chromium-review.googlesource.com/c/chromium/src/+/1105505/8/gpu/command_buffer/client/gles2_implementation.cc#1537 because in the new scheme, setting a bucket's contents can cause the transfer buffer's ring buffer to be reallocated, and any previously fetched Result (which is at the bottom of the ring buffer) to be invalidated.
,
Jul 9
James isn't OOO yet.
,
Jul 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9dc77681b2e5b95dbca78fa8fad5c3084a9b67aa commit 9dc77681b2e5b95dbca78fa8fad5c3084a9b67aa Author: James Darpinian <jdarpinian@chromium.org> Date: Fri Jul 13 01:45:42 2018 GPU: Workaround AMD Linux driver crash AMD's Linux driver crashes when calling glCopyTexImage2D with GL_PIXEL_UNPACK_BUFFER set to a buffer that hasn't been initialized yet. Bug: 859998 , 850271 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I013892e39c02cfb3abc7079363ea4146915a2ac4 Reviewed-on: https://chromium-review.googlesource.com/1135848 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#574810} [modify] https://crrev.com/9dc77681b2e5b95dbca78fa8fad5c3084a9b67aa/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/9dc77681b2e5b95dbca78fa8fad5c3084a9b67aa/gpu/config/gpu_driver_bug_list.json [modify] https://crrev.com/9dc77681b2e5b95dbca78fa8fad5c3084a9b67aa/gpu/config/gpu_workaround_list.txt
,
Jul 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1c3333c5acf70c841a66feba15273b1dc7d76da0 commit 1c3333c5acf70c841a66feba15273b1dc7d76da0 Author: James Darpinian <jdarpinian@chromium.org> Date: Fri Jul 13 01:56:36 2018 GPU: Grow and shrink transfer buffer Second try after revert 6df2efa5313f48302a51d510fa9b5983811c2328. Original at https://crrev.com/c/1105505 Automatically grow the transfer buffer when it is full and shrink it when the full capacity is not being used. Start at a smaller size. Before we would only grow it when a single transfer request was larger than the whole buffer; requests smaller than the whole buffer would just block if the buffer was full. Also we would not ever shrink the buffer until someone called Free() manually. Bug: 850271 , 835353, 828363, 856347 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Id1223267d0ab444afe18f62f45ae5f365131e18c Reviewed-on: https://chromium-review.googlesource.com/1125503 Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#574816} [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/client_test_helper.cc [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/client_test_helper.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/gles2_implementation.cc [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/implementation_base.cc [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/implementation_base.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/mock_transfer_buffer.cc [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/mock_transfer_buffer.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/ring_buffer.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/shared_memory_limits.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/transfer_buffer.cc [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/transfer_buffer.h [modify] https://crrev.com/1c3333c5acf70c841a66feba15273b1dc7d76da0/gpu/command_buffer/client/transfer_buffer_unittest.cc
,
Jul 13
,
Aug 20
|
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by jdarpinian@chromium.org
, Jun 6 2018Owner: jdarpinian@chromium.org
Status: Assigned (was: Untriaged)