mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 17:45:58 +00:00
This patch implements the asynchronous path of CreateRenderPipelineAsync on D3D12 backend. 1. Call the constructor of dawn_native::d3d12::RenderPipeline in main thread. 2. Execute dawn_native::RenderPipelineBase::Initialize() (a virtual function) asynchronously. 3. Ensure every operation in dawn_native::d3d12::RenderPipeline::Initialize() is thread-safe. 4. Save all the return values (pipeline object or error message, userdata, etc) in a CreateRenderPipelineAsyncWaitableCallbackTask object and insert this callback task into CallbackTaskManager. 5. In Callback.Finish(): - Insert the pipeline object into the pipeline cache if necessary - Call WGPUCreateRenderPipelineAsyncCallback This patch also removes FlatRenderPipelineDescriptor as it is not needed right now. BUG=dawn:529 TEST=dawn_end2end_tests Change-Id: I7fd30339ab7bea599c483dea4bd1100359982409 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64440 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org>