Firefox defaults to using the first GPU on your system. On laptops with more than one GPU (e.g., Dell XPS), the first GPU is usually the integrated one (usually Intel), which usually performs more slowly than the other, discrete GPU (usually NVIDIA or AMD).

If you would prefer Firefox to use the discrete GPU, you usually can make it do so by using Window's display/graphics/custom options for apps feature.

However, that feature doesn't work if you run Firefox in other than the login account (e.g., using runas). (You always run network-facing programs in limited accounts to minimize your exposure to malware, right?) In that case, you need to add the appropriate registry entry. You know the drill here: don't modify the registry if you don't know what you're doing. You can make your computer malfunction, make it vulnerable to hackers, or even make it unbootable, by modifying the registry.

Begin by closing Firefox. The registry entry you will need to work with will be HKEY_USERS\user account's SID\Software\Microsoft\DirectX\UserGPUPreferences. Find the user account's SID by using runas/user:theuser cmd, then using Process Explorer's "security" tab (download from MS at (https://learn.microsoft.com/en-us/sysinternals/ ) to view the "SID" for the command shell you just opened. This will yield a string similar to "S-1-5-21-0123456789-0123456789-0123456789-1007".

Now open regedit and navigate to HKEY_USERS\user account's SID\Software\Microsoft. If you can't find this location, you did something wrong above. When you find this location, look for the DirectX key. Probably it won't be there, in which case, please create it. Then within it create the UserGPUPreferences key.

Now find the path to the Firefox executable. It will be something like c:\Program Files\firefox\121.0\firefox.exe, but you need the exact path from your system.

With the path in hand, create a string value under the UserGPUPreferences key. Its name must be the path to Firefox. Its value should be GpuPreferences=2;.

Now double-check your work. When it looks correct, start Firefox and go to, e.g., https://www.webglsamples.org and try one of the samples. It should now use your second, discrete GPU. Enjoy!