Skip to content

[Impeller] HAL needs barriers for both Metal/Vulkan for compute usage. #140798

@jonahwilliams

Description

@jonahwilliams

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions