VideoCommon: Don't create pipelines with no render targets
Some backends don't like it when you do that
This commit is contained in:
parent
d380d43209
commit
1119a9ba32
|
@ -709,6 +709,9 @@ bool PostProcessing::CompilePixelShader()
|
||||||
|
|
||||||
bool PostProcessing::CompilePipeline()
|
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 = {};
|
AbstractPipelineConfig config = {};
|
||||||
config.vertex_shader = m_vertex_shader.get();
|
config.vertex_shader = m_vertex_shader.get();
|
||||||
config.geometry_shader =
|
config.geometry_shader =
|
||||||
|
|
|
@ -1068,6 +1068,13 @@ bool Renderer::InitializeImGui()
|
||||||
|
|
||||||
bool Renderer::RecompileImGuiPipeline()
|
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 =
|
std::unique_ptr<AbstractShader> vertex_shader =
|
||||||
CreateShaderFromSource(ShaderStage::Vertex, FramebufferShaderGen::GenerateImGuiVertexShader(),
|
CreateShaderFromSource(ShaderStage::Vertex, FramebufferShaderGen::GenerateImGuiVertexShader(),
|
||||||
"ImGui vertex shader");
|
"ImGui vertex shader");
|
||||||
|
|
Loading…
Reference in New Issue