diff --git a/src/d3d11/d3d11_shader.cpp b/src/d3d11/d3d11_shader.cpp index 05a1ee11..ba2ef8f1 100644 --- a/src/d3d11/d3d11_shader.cpp +++ b/src/d3d11/d3d11_shader.cpp @@ -31,7 +31,14 @@ namespace dxvk { std::ios_base::binary | std::ios_base::trunc)); } - m_shader = module.compile(*pDxbcModuleInfo, name); + // Decide whether we need to create a pass-through + // geometry shader for vertex shader stream output + bool passthroughShader = pDxbcModuleInfo->xfb != nullptr + && module.programInfo().type() != DxbcProgramType::GeometryShader; + + m_shader = passthroughShader + ? module.compilePassthroughShader(*pDxbcModuleInfo, name) + : module.compile (*pDxbcModuleInfo, name); m_shader->setShaderKey(*pShaderKey); if (dumpPath.size() != 0) {