Direct3D: enable texture copies
Copying textures has been implemented but the caps flag wasn't set. Also adds some comments about format requirements. Change-Id: I8b9b3b9c88c72fad44a3a7191fc17054d5def938 Bug: skia:10446 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403599 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
7589aa0bbc
commit
6a1c8adf2a
@ -66,6 +66,8 @@ bool GrD3DCaps::canCopyTexture(DXGI_FORMAT dstFormat, int dstSampleCnt,
|
||||
return false;
|
||||
}
|
||||
|
||||
// D3D allows us to copy within the same format family but doesn't do conversions
|
||||
// so we require strict identity.
|
||||
return srcFormat == dstFormat;
|
||||
}
|
||||
|
||||
@ -82,6 +84,8 @@ bool GrD3DCaps::canCopyAsResolve(DXGI_FORMAT dstFormat, int dstSampleCnt,
|
||||
}
|
||||
|
||||
// Surfaces must have the same format.
|
||||
// D3D12 can resolve between typeless and non-typeless formats, but we are not using
|
||||
// typeless formats. It's not possible to resolve within the same format family otherwise.
|
||||
if (srcFormat != dstFormat) {
|
||||
return false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
bool isFormatTexturable(const GrBackendFormat&) const override;
|
||||
bool isFormatTexturable(DXGI_FORMAT) const;
|
||||
|
||||
bool isFormatCopyable(const GrBackendFormat&) const override { return false; }
|
||||
bool isFormatCopyable(const GrBackendFormat&) const override { return true; }
|
||||
|
||||
bool isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat& format,
|
||||
int sampleCount = 1) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user