diff --git a/src/dawn_native/SwapChain.cpp b/src/dawn_native/SwapChain.cpp index 69ad3646b7..c812958333 100644 --- a/src/dawn_native/SwapChain.cpp +++ b/src/dawn_native/SwapChain.cpp @@ -189,7 +189,7 @@ namespace dawn_native { // of dawn_native mCurrentTexture = AcquireRef(GetNextTextureImpl(&descriptor)); - mCurrentTextureView = mCurrentTexture->CreateView(nullptr); + mCurrentTextureView = mCurrentTexture->CreateView(); return mCurrentTextureView.Get(); } diff --git a/src/dawn_native/Texture.h b/src/dawn_native/Texture.h index 17e2dc1e9e..29a34c17ac 100644 --- a/src/dawn_native/Texture.h +++ b/src/dawn_native/Texture.h @@ -139,7 +139,7 @@ namespace dawn_native { const Extent3D& extent) const; // Dawn API - TextureViewBase* CreateView(const TextureViewDescriptor* descriptor); + TextureViewBase* CreateView(const TextureViewDescriptor* descriptor = nullptr); void Destroy(); protected: diff --git a/src/dawn_native/metal/SwapChainMTL.mm b/src/dawn_native/metal/SwapChainMTL.mm index 7abb8decd3..55eec73aee 100644 --- a/src/dawn_native/metal/SwapChainMTL.mm +++ b/src/dawn_native/metal/SwapChainMTL.mm @@ -129,7 +129,7 @@ namespace dawn_native { namespace metal { mTexture = AcquireRef( new Texture(ToBackend(GetDevice()), &textureDesc, [*mCurrentDrawable texture])); - return mTexture->CreateView(nullptr); + return mTexture->CreateView(); } void SwapChain::DetachFromSurfaceImpl() { diff --git a/src/dawn_native/null/DeviceNull.cpp b/src/dawn_native/null/DeviceNull.cpp index 05320a2f2a..fe981d2057 100644 --- a/src/dawn_native/null/DeviceNull.cpp +++ b/src/dawn_native/null/DeviceNull.cpp @@ -383,7 +383,7 @@ namespace dawn_native { namespace null { TextureDescriptor textureDesc = GetSwapChainBaseTextureDescriptor(this); mTexture = AcquireRef( new Texture(GetDevice(), &textureDesc, TextureBase::TextureState::OwnedInternal)); - return mTexture->CreateView(nullptr); + return mTexture->CreateView(); } void SwapChain::DetachFromSurfaceImpl() { diff --git a/src/dawn_native/vulkan/SwapChainVk.cpp b/src/dawn_native/vulkan/SwapChainVk.cpp index 614901111e..c2f0bd2d13 100644 --- a/src/dawn_native/vulkan/SwapChainVk.cpp +++ b/src/dawn_native/vulkan/SwapChainVk.cpp @@ -590,7 +590,7 @@ namespace dawn_native { namespace vulkan { // In the happy path we can use the swapchain image directly. if (!mConfig.needsBlit) { - return mTexture->CreateView(nullptr); + return mTexture->CreateView(); } // The blit texture always perfectly matches what the user requested for the swapchain. @@ -598,7 +598,7 @@ namespace dawn_native { namespace vulkan { TextureDescriptor desc = GetSwapChainBaseTextureDescriptor(this); DAWN_TRY_ASSIGN(mBlitTexture, Texture::Create(device, &desc, VK_IMAGE_USAGE_TRANSFER_SRC_BIT)); - return mBlitTexture->CreateView(nullptr); + return mBlitTexture->CreateView(); } void SwapChain::DetachFromSurfaceImpl() {