summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTellowKrinkle <tellowkrinkle@gmail.com>2023-01-29 14:36:28 -0600
committerTellowKrinkle <tellowkrinkle@gmail.com>2023-01-29 14:36:28 -0600
commite4e425b93038aa485b4432ada5626c2f8e8ccc02 (patch)
treec81e29fdd5d9e3424fe083a7c77530b0b7a722ad
parent1119a9ba327fb86cb03f303539ce5b9697158379 (diff)
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
-rw-r--r--Source/Core/VideoBackends/Metal/MTLObjectCache.mm6
1 files changed, 6 insertions, 0 deletions
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)];