Add missing lock when creating new pipeline during encoding.
This was unsafe when encoding indirect draws with validations on multiple threads. Bug: dawn:1662 Change-Id: I479bb35bc98dd314860955b3c30df788d18ed84e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126780 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
This commit is contained in:
parent
3dce55a6fe
commit
dc626d357d
|
@ -212,6 +212,8 @@ ResultOrError<ComputePipelineBase*> GetOrCreateRenderValidationPipeline(DeviceBa
|
||||||
computePipelineDescriptor.compute.module = store->renderValidationShader.Get();
|
computePipelineDescriptor.compute.module = store->renderValidationShader.Get();
|
||||||
computePipelineDescriptor.compute.entryPoint = "main";
|
computePipelineDescriptor.compute.entryPoint = "main";
|
||||||
|
|
||||||
|
// This will create new resource so we have to lock the device.
|
||||||
|
auto deviceLock(device->GetScopedLock());
|
||||||
DAWN_TRY_ASSIGN(store->renderValidationPipeline,
|
DAWN_TRY_ASSIGN(store->renderValidationPipeline,
|
||||||
device->CreateComputePipeline(&computePipelineDescriptor));
|
device->CreateComputePipeline(&computePipelineDescriptor));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue