Really? Because I've been on Windows and Nvidia hardware for a long time... Is the performance hit on the CPU or the GPU? Exactly how severe was this performance drop? Like I wrote above, I got much better CPU performance when simply swapping attachments.
The drop was proportional to the amount of rendertarget changes, which in my engine at the time mostly meant switching between rendering a shadow map, and rendering the light contribution to the scene. To get exact figures I would have to dig the offending code from the repository, which I don't think I'll do, but for a few rendertarget changes per frame it could have been roughly doubling the frametime (or halving the FPS). I didn't run a GPU profiler back then but on the CPU it looked similar to a pipeline stall - suddenly a draw call or presenting the scene would take a disproportionally large amount of time.
My very uneducated guess (could be totally wrong)
- The Direct3D rendertarget switching API looks like a single FBO where you swap attachments (SetRenderTarget / SetDepthStencilSurface)
- But on NVIDIA hardware it's unoptimal to switch attachments of different sizes/formats to a single FBO, can cause stalls
- So the Windows driver implements a FBO switching/virtualization behind the scenes, *and* the OpenGL portion does this for you automatically also, as it's nicer to have better performance
- In the Linux driver no such virtualization exists, as it isn't needed by Direct3D, so you must understand to do this manually or suffer poor performance
Edited by AgentC, 05 December 2013 - 08:52 AM.