Trivial to do this on Linux. I run my desktop on the on-chip Ryzen 9950X iGPU and I offload games to my nVidia dGPU.

I had a crazier setup in the past with the Intel i7-8809G APU: it had an AMD iGPU for desktop connected to the display, nVidia eGPU for games and the Intel iGPU for video encoding.

Of course there is additional latency due to frame copying, but I can’t notice it in practice.