Change the name of CreateReady*Pipeline to Create*PipelineAsync - #1336
Conversation
This patch changes the name of CreateReady*Pipeline() (CreateReadyRenderPipeline() and CreateReadyComputePipeline()) to Create*PipelineAsync() to make them more understandable that they are just the async version of Create*Pipeline() and align with buffer.mapAsync().
|
The reason that this was not done originally is that it strongly implies that the non-async version of create*Pipeline are synchronous. They are not: both versions are asynchronous, it's just that only one tells you when it's ready. |
|
Well, the regular |
|
No resolution yet in the meeting. Still some feelings on both sides. |
|
Editors discussion: I've made my peace with I think we should also consider (hopefully with input from engine developers) whether it would be more convenient to be able to get the |
I have concerns that this approach, like adding a |
|
I forgot to mention, I was intending that it would behave the same way as any other pipeline creation, in that it would block until the pipeline is ready (not fail validation). But Dzmitry wasn't sure about taking that approach. |
I think this would be great. I prefer closer to a single codepath than multiple. |
Blocking if the pipeline isn't ready raises a lot of issues: when is the waiting done? If it's during command encoding then it reduces the usefulness of the asynchrony since it will be easy to make the GPU process silently block (or if we it makes command encoder creation asynchronous, it's even more complicated). If command encoding doesn't block on the pipeline creation then there are behavioral differences between the pipeline result being a success and an error, and whether it happened to be finished before encoding or not. That's way I think the semantic that's currently in the spec is the correct one. |
|
Editors resolution: Accept |
* fixup some comments * Fix accidental type-object-ification of test param values
This patch changes the name of CreateReadyPipeline()
(CreateReadyRenderPipeline() and CreateReadyComputePipeline()) to
CreatePipelineAsync() to make them more understandable that they
are just the async version of Create*Pipeline() and align with
buffer.mapAsync().
Preview | Diff