Vulkan: Limit VkEvent for images that has fragment access only One of the problem with VkEvent is that the overhead comes with VkCmdSetEvent causes some app traces regress performance. The goal in this CL is to further limit VkCmdSetEvent to images that that we think are potentially subject to the pipeline bubble. The bubble usually occurs when accesses are alternated between different stages, specifically a mix between vertex/transfer/compute/fragment. If all accesses are from fragment shader or color attachment, then use VkEvent will not be beneficial, but only adds extra overhead. This CL adds the heuristic tracking for image access. Every time an image is used, a bit is used to indicate the usage involves fragment only or not. A bitfield is used to track the window of the history of the usage. When image is used (usually at the time queueSerial is set), we shift the history bits left and the new bit is added to the right most bit. If all accesses are from the fragment shader or color attachment, then no need to use VkEvent. For example, if a texture is always sample from fragment shader only, then VkEvent will not used. Another common usage is you render to it and then texture from it, it will also excluded from VkEvent with this CL. Bug: b/336844257 Change-Id: I175194f30b8f1d9b8fbf38ad594778474548016f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5664170 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Charlie Lao <cclao@google.com>