Metal: Remove usage of MTLTextureUsagePixelFormatView
This usage is only needed when reinterpreting formats, which Dawn doesn't support yet, and has a significant cost in that textures can't be compressed as well. Bug: dawn:510 Change-Id: I6e416a97c84a708f97d83f9b15c60b05bbf15908 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26881 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
9aed03dcb0
commit
caec4ab04a
|
@ -49,10 +49,6 @@ namespace dawn_native { namespace metal {
|
|||
result |= MTLTextureUsageRenderTarget;
|
||||
}
|
||||
|
||||
if (UsageNeedsTextureView(usage)) {
|
||||
result |= MTLTextureUsagePixelFormatView;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -291,6 +287,8 @@ namespace dawn_native { namespace metal {
|
|||
mtlDesc.width = descriptor->size.width;
|
||||
mtlDesc.height = descriptor->size.height;
|
||||
mtlDesc.sampleCount = descriptor->sampleCount;
|
||||
// TODO: add MTLTextureUsagePixelFormatView when needed when we support format
|
||||
// reinterpretation.
|
||||
mtlDesc.usage = MetalTextureUsage(descriptor->usage);
|
||||
mtlDesc.pixelFormat = MetalPixelFormat(descriptor->format);
|
||||
mtlDesc.mipmapLevelCount = descriptor->mipLevelCount;
|
||||
|
|
Loading…
Reference in New Issue