mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-20 05:23:34 +00:00
Clear reference to MTLTexture on TextureView::DestroyImpl
Bug: dawn:1355 Change-Id: I834b02a05d50c39b1a8d272e2d437d7ce1f96fb5 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/115061 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com>
This commit is contained in:
parent
13e48132c0
commit
5cc118bde7
@ -104,8 +104,8 @@ class TextureView final : public TextureViewBase {
|
|||||||
private:
|
private:
|
||||||
using TextureViewBase::TextureViewBase;
|
using TextureViewBase::TextureViewBase;
|
||||||
MaybeError Initialize(const TextureViewDescriptor* descriptor);
|
MaybeError Initialize(const TextureViewDescriptor* descriptor);
|
||||||
|
void DestroyImpl() override;
|
||||||
|
|
||||||
// TODO(crbug.com/dawn/1355): Clear this reference on texture destroy.
|
|
||||||
NSPRef<id<MTLTexture>> mMtlTextureView;
|
NSPRef<id<MTLTexture>> mMtlTextureView;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1124,6 +1124,10 @@ MaybeError TextureView::Initialize(const TextureViewDescriptor* descriptor) {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextureView::DestroyImpl() {
|
||||||
|
mMtlTextureView = nil;
|
||||||
|
}
|
||||||
|
|
||||||
id<MTLTexture> TextureView::GetMTLTexture() const {
|
id<MTLTexture> TextureView::GetMTLTexture() const {
|
||||||
ASSERT(mMtlTextureView != nullptr);
|
ASSERT(mMtlTextureView != nullptr);
|
||||||
return mMtlTextureView.Get();
|
return mMtlTextureView.Get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user