Fix last reantrant object creation.

Fixed: dawn:723
Change-Id: I9697686a3a8a8d31539c04cd3e6073744152ff68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85120
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez 2022-03-29 16:13:53 +00:00 committed by Dawn LUCI CQ
parent f32ae5b680
commit dad225a896
2 changed files with 1 additions and 5 deletions

View File

@ -351,10 +351,7 @@ namespace dawn::native {
static_cast<const uint8_t*>(pass.batchData.get()), static_cast<const uint8_t*>(pass.batchData.get()),
pass.batchDataSize); pass.batchDataSize);
// TODO(dawn:723): change to not use AcquireRef for reentrant object creation. Ref<ComputePassEncoder> passEncoder = commandEncoder->BeginComputePass();
ComputePassDescriptor descriptor = {};
Ref<ComputePassEncoder> passEncoder =
AcquireRef(commandEncoder->APIBeginComputePass(&descriptor));
passEncoder->APISetPipeline(pipeline); passEncoder->APISetPipeline(pipeline);
clientIndirectBinding.buffer = pass.clientIndirectBuffer; clientIndirectBinding.buffer = pass.clientIndirectBuffer;

View File

@ -423,7 +423,6 @@ namespace dawn::native::null {
ResultOrError<Ref<TextureViewBase>> SwapChain::GetCurrentTextureViewImpl() { ResultOrError<Ref<TextureViewBase>> SwapChain::GetCurrentTextureViewImpl() {
TextureDescriptor textureDesc = GetSwapChainBaseTextureDescriptor(this); TextureDescriptor textureDesc = GetSwapChainBaseTextureDescriptor(this);
// TODO(dawn:723): change to not use AcquireRef for reentrant object creation.
mTexture = AcquireRef( mTexture = AcquireRef(
new Texture(GetDevice(), &textureDesc, TextureBase::TextureState::OwnedInternal)); new Texture(GetDevice(), &textureDesc, TextureBase::TextureState::OwnedInternal));
return mTexture->CreateView(); return mTexture->CreateView();