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
This commit is contained in:
TellowKrinkle 2023-01-29 14:36:28 -06:00
parent 1119a9ba32
commit e4e425b930
1 changed files with 6 additions and 0 deletions

View File

@ -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)];