TextureMTL: Use managed storage mode for IOSurfaces

BUG=dawn:117

Change-Id: Ief914b1e03397080ab501fa5f9059725f8c261b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5420
Reviewed-by: Hao Li <hao.x.li@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2019-03-13 09:45:18 +00:00 committed by Commit Bot service account
parent 8d79f78c78
commit ea2c7f20f2
1 changed files with 1 additions and 0 deletions

View File

@ -211,6 +211,7 @@ namespace dawn_native { namespace metal {
uint32_t plane)
: TextureBase(device, descriptor) {
MTLTextureDescriptor* mtlDesc = CreateMetalTextureDescriptor(descriptor);
mtlDesc.storageMode = MTLStorageModeManaged;
mMtlTexture = [device->GetMTLDevice() newTextureWithDescriptor:mtlDesc
iosurface:ioSurface
plane:plane];