From e4e425b93038aa485b4432ada5626c2f8e8ccc02 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 29 Jan 2023 14:36:28 -0600 Subject: [PATCH] VideoBackends:Metal: Assert on pipelines with no render targets This only actually fails on specific Metal drivers, this way doing it will actually fail the CI and we'll notice --- Source/Core/VideoBackends/Metal/MTLObjectCache.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/VideoBackends/Metal/MTLObjectCache.mm b/Source/Core/VideoBackends/Metal/MTLObjectCache.mm index 48a8ad7dae..979c1b7627 100644 --- a/Source/Core/VideoBackends/Metal/MTLObjectCache.mm +++ b/Source/Core/VideoBackends/Metal/MTLObjectCache.mm @@ -418,6 +418,12 @@ public: // clang-format on } FramebufferState fs = config.framebuffer_state; + if (fs.color_texture_format == AbstractTextureFormat::Undefined && + fs.depth_texture_format == AbstractTextureFormat::Undefined) + { + // Intel HD 4000's Metal driver asserts if you try to make one of these + PanicAlertFmt("Attempted to create pipeline with no render targets!"); + } [desc setRasterSampleCount:fs.samples]; [color0 setPixelFormat:Util::FromAbstract(fs.color_texture_format)]; [desc setDepthAttachmentPixelFormat:Util::FromAbstract(fs.depth_texture_format)];