Skip to content
Permalink
Browse files

PostProcessing: Don't use GS expansion shader for quad buffering w/ O…

…penGL

OpenGL doesn't render to a 2-layer backbuffer like D3D/Vulkan for quad-buffered
stereo, instead drawing twice with the eye selected by glDrawBuffer()
(see OGL::Renderer::RenderXFBToScreen).
  • Loading branch information...
stenzek committed Oct 2, 2019
1 parent e6ae204 commit e88c269d022ae04c0b5fdaf71f03b44cc145820d
Showing with 7 additions and 3 deletions.
  1. +7 −3 Source/Core/VideoCommon/PostProcessing.cpp
@@ -714,11 +714,15 @@ bool PostProcessing::CompilePixelShader()

bool PostProcessing::CompilePipeline()
{
// OpenGL doesn't render to a 2-layer backbuffer like D3D/Vulkan for quad-buffered stereo, instead
// drawing twice and the eye selected by glDrawBuffer() (see OGL::Renderer::RenderXFBToScreen).
const bool use_quad_buffer_gs = g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer &&
g_ActiveConfig.backend_info.api_type != APIType::OpenGL;

AbstractPipelineConfig config = {};
config.vertex_shader = m_vertex_shader.get();
config.geometry_shader = g_ActiveConfig.stereo_mode == StereoMode::QuadBuffer ?
g_shader_cache->GetTexcoordGeometryShader() :
nullptr;
config.geometry_shader =
use_quad_buffer_gs ? g_shader_cache->GetTexcoordGeometryShader() : nullptr;
config.pixel_shader = m_pixel_shader.get();
config.rasterization_state = RenderState::GetNoCullRasterizationState(PrimitiveType::Triangles);
config.depth_state = RenderState::GetNoDepthTestingDepthState();

0 comments on commit e88c269

Please sign in to comment.
You can’t perform that action at this time.