Skip to content

Commit

Permalink
VideoBackends:Metal: Assert on pipelines with no render targets
Browse files Browse the repository at this point in the history
This only actually fails on specific Metal drivers, this way doing it will actually fail the CI and we'll notice
  • Loading branch information
TellowKrinkle committed Jan 29, 2023
1 parent 1119a9b commit e4e425b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/VideoBackends/Metal/MTLObjectCache.mm
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ StoredPipeline CreatePipeline(const AbstractPipelineConfig& config)
// 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)];
Expand Down

0 comments on commit e4e425b

Please sign in to comment.