mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Merge pull request #11511 from TellowKrinkle/MTLHD4000
VideoCommon: Avoid creating pipelines with no render targets
This commit is contained in:
commit
13d14282a0
@ -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)];
|
||||
|
@ -709,6 +709,9 @@ bool PostProcessing::CompilePixelShader()
|
||||
|
||||
bool PostProcessing::CompilePipeline()
|
||||
{
|
||||
if (m_framebuffer_format == AbstractTextureFormat::Undefined)
|
||||
return true; // Not needed (some backends don't like making pipelines with no targets)
|
||||
|
||||
AbstractPipelineConfig config = {};
|
||||
config.vertex_shader = m_vertex_shader.get();
|
||||
config.geometry_shader =
|
||||
|
@ -1068,6 +1068,13 @@ bool Renderer::InitializeImGui()
|
||||
|
||||
bool Renderer::RecompileImGuiPipeline()
|
||||
{
|
||||
if (m_backbuffer_format == AbstractTextureFormat::Undefined)
|
||||
{
|
||||
// No backbuffer (nogui) means no imgui rendering will happen
|
||||
// Some backends don't like making pipelines with no render targets
|
||||
return true;
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractShader> vertex_shader =
|
||||
CreateShaderFromSource(ShaderStage::Vertex, FramebufferShaderGen::GenerateImGuiVertexShader(),
|
||||
"ImGui vertex shader");
|
||||
|
Loading…
Reference in New Issue
Block a user