Require compositor sync for WebGPU XR texture writes - #34
Conversation
|
@mwyrzykowski is probably the better than me for review for this |
mwyrzykowski
left a comment
There was a problem hiding this comment.
WebGPU guarantees read / write hazards must not occur in general, so do we need to explicitly call it out? What do you think @toji ?
|
@mwyrzykowski I think it is still worth calling out here. WebGPU handles hazards within WebGPU work, but the XR compositor is an external consumer of these textures and this spec is defining that handoff point. It seems that for the "regular" flow to an HTML page the flushing is defined. There is similar precedent in both WebGL and WebXR's WebGL path.
and:
WebXR has even closer language for
and:
WebGPU defines the queue/completion model, but not this XR compositor handoff. For example, Queue timeline:
So I don't think this is trying to restate WebGPU's internal hazard guarantees. It is specifying that after the application submits WebGPU work for an This also matches how WebXR/WebGPU samples are written: they submit frame work with |
SHA: b122f32 Reason: push, by cabanier Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Agreed that there's no harm adding this. The XR compositor is intentionally very loosely defined, so I think it's reasonable to assume that it's not implied to be implemented as a WebGPU process when WebGPU is used, and thus may need some additional synchronization. |
I was trying to optimize the texture handling during complex WebXR sessions to make the WebGPU flow similar to WebGL.
I'm unsure if this clarification is needed in the spec but it seems that the browser needs to be able to wait for the work to be finished before submitting to the compositor and this is not mentioned. This language impacts how we can wait for work to be completed during a frame.
Preview | Diff