Find which video card is active (for a script)

I have an nVidia dGPU and a AMD iGPU. Selectable from the bios.

How can I find which one is active? Internet foo is weak tonight.

Run this command and it will show which card is doing the rendering.

inxi -Ga