szeged / webrender

A GPU-based renderer for the web
https://doc.servo.org/webrender/
Mozilla Public License 2.0
45 stars 7 forks source link

Add tracking for the pipeline stages for each resource #310

Closed zakorgy closed 4 years ago

zakorgy commented 4 years ago

From https://github.com/szeged/webrender/pull/308#discussion_r323830142:

Perhaps, what we are missing here is - add tracking for the pipeline stages each resource is requeted in? I.e. img.transit() would receive an extra parameter of PipelineStage (a bit mask), and it would return a pair of (barrier, old_stage_mask) for us to use. If mixing barriers of multiple transit() results, we'd be ORRing the stages, e.g. old_stage_mask1 | old_stage_mask2.

Benefits: We can merge barriers with ORRing the stages. As an extra we could extend the resources to track the previous stage and state it had and could transit back if needed.

zakorgy commented 4 years ago

Fixed in #322