Commit bfc764c553fa0613f858315bc6c0cc1ecee469a1

Le Hoang Quyen 2023-11-03T03:16:40

Metal: Optimize vertex conversion using compute shader. When converting vertex data with compute shader, getComputeCommandEncoderWithoutEndingRenderEncoder() should be used instead of getComputeCommandEncoder(). Because vertex data doesn't depend on previous render commands, hence ending the current render command encoder is unnecessary. The only render command that could write vertex data is the one with transform feedback (XFB). However, the XFB written data should already be synchronized by glEndTransformFeedback() priorly if any. Using getComputeCommandEncoderWithoutEndingRenderEncoder() ensures that the conversion will happen in a compute pass before any draw calls in the render pass. Bug: chromium:1496807 Change-Id: I4613902b2ae83814e7cda712de89c7d8f285e5d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5004821 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>