Hash :
7b77dc5b
Author :
Date :
2021-04-22T09:58:33
Vulkan: minimize-gpu-work: Skip data copy when possible When --minimize-gpu-work is specified while replaying app traces, the goal is to avoid any GPU work when possible and focus on driver cpu logic overhead. Data copy can be lengthy and each driver optimize it differently for some real world usage scenario. This should be looked along with normal app trace playback performance. When --minimize-gpu-work is specified, we want to leave this out of picture. Previously I have fixed TexImage2D by overwriting pixel pointer with null. But there is a hole here when PBO is used. This CL fix the case that when data is sourced from PBO, we ensure to skip data copy as well. This CL also noops TexSubImage call instead of doing 1x1 copy. Again depends on driver implementation, some may use CPU others use GPU which will have different overhead. We can easily write a test to cover these performance optimizations. By skipping the subImage call here we will have less noise to deal with for CPU overhead investigation. Bug: b/184766477 Change-Id: I84a5d26d2f25f8f0a6c5c9da72737906d6356a53 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2847100 Commit-Queue: Charlie Lao <cclao@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>