-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
The current design of Impeller's HAL assumes that barriers can either always be inferred/tracked (Vulkan image layout) or can be handled either by Metal hazard tracking and/or command buffer submission order.
However Vulkan command buffers promise much less than we think, and as a result Canvas.drawPoints compute implementation behaves erratically. I suspect this is also true of metal command buffers, and hazard tracking is saving us.
Basic setup:
Cmd Buffer 1: <---- Compute DrawPoints Geometry into Buffer A
Cmd Buffer 1. Submit
Cmd buffer 2: <---- Draw Points With Buffer A
Cmd buffer 2. Submit.
The order of submission here works on Metal but is broken on Vulkan. Actually, if we Cmd Buffer 1 and 2 share the same buffer (so there is not a distinct MTLBuffer for the compute command) then it actually has sync issues too.
This blocks the usage of compute for Vulkan.