GPU: Make command buffer autoflush more conservative.
This is change #1 of 3 reducing context switching during WebGL rendering. On tiled rendering GPUs context switches are slow and can even cause multisampling artifacts. Every time the command buffer is flushed, a context switch is possible. Before, the command buffer helper would always autoflush eventually if no explicit flush was received. Commands would accumulate across multiple frames until the autoflush threshold was reached. Implicit flushes caused by ordering barriers were not taken into account. Now the autoflush decision is based on the last ordering barrier instead of the last explicit flush. Since there's an ordering barrier at least once a frame, autoflush will only happen if the threshold is reached within a single frame. Bug: 828363,835353 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: I168be6892620b1813c598a912e59147f9c45896f Reviewed-on: https://chromium-review.googlesource.com/1077435Reviewed-by:Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by:
Antoine Labour <piman@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org> Cr-Commit-Position: refs/heads/master@{#563149}
Showing
Please register or sign in to comment