Repository navigation
Promise versions of create*Pipeline - #184
Conversation
* Promise<GPUComputePipeline> createReadyComputePipeline(...); * Promise<GPURenderPipeline> createReadyRenderPipeline(...);
|
PR for discussion. Some thoughts: I'm thinking about the timelines. In principle Normally it would be "As-If" pipeline creation occurs on the device timeline. However, As-If sort of breaks down now since you can know the status of the pipeline: As-If might imply the pipeline will come back before the readback. (Depends on how strict we are with the callback ordering.) But the readback can (and should be able to) come back before the pipeline. |
|
Presumably the "ready" ones are guaranteed to be not-internally-null? |
|
I haven't decided on this yet, and it is kind of related to the
The first one seems more obvious. The argument for the second one is that it might make sense to do this with Another interesting case is device loss. If the device is lost while I'm leaning toward 1. above: |
|
I ended up describing the behavior here: c2113f5#diff-36cdb2543bb47498b85893f020401aadR120 |
|
I'm still missing the description of why this is needed, could you point me to it? Pipeline creation should be fairly deterministic from the user point of view:
|
|
It's just so that the app can avoid using the pipeline until it's finished compiling, so it doesn't end up with a frame that blocks on compilation. It could be a status query, but the status queries we had (that are removed in the current version of #197) were also asynchronous, so really the same. |
|
Re: validation error and weird backend error, I would be fine with turning those into "resolves to invalid object" instead of "rejects". (Would do the same change to tryCreate* in #197) |
* Promise<GPUComputePipeline> createReadyComputePipeline(...); * Promise<GPURenderPipeline> createReadyRenderPipeline(...);
* Promise<GPUComputePipeline> createReadyComputePipeline(...); * Promise<GPURenderPipeline> createReadyRenderPipeline(...);
Promise<GPUComputePipeline> createReadyComputePipeline(...);Promise<GPURenderPipeline> createReadyRenderPipeline(...);Fixes #128.