Detect whether trying to blit a Metal swapchain texture, and fail if so.
Metal swapchain textures (equivalent to GL's FBO 0) can't be used with
MTLBlitCommandEncoder. For copySurface we need to detect this and fail.
Future changes will handle GrSurfaceProxy.
Change-Id: I9235d91cf31e96260c8d1da5938f5441d2e49d27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252045
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/gn/tests.gni b/gn/tests.gni
index 637304f..b893768 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -314,7 +314,10 @@
"$_tests/YUVTest.cpp",
]
-metal_tests_sources = [ "$_tests/MtlBackendAllocationTest.mm" ]
+metal_tests_sources = [
+ "$_tests/MtlBackendAllocationTest.mm",
+ "$_tests/MtlCopySurfaceTest.mm",
+]
pathops_tests_sources = [
"$_tests/PathOpsAngleIdeas.cpp",