Skip to content

--gpu-index is ineffective when using the Compatibility rendering method #87763

@Calinou

Description

@Calinou

Tested versions

  • Reproducible in: 4.2.1.stable, 4.3.dev cae7599

System information

Godot v4.3.dev (cae7599) - Fedora Linux 39 (KDE Plasma) - X11 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4090 (nvidia; 545.29.06) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Engine.get_gpu_index() isn't used in the gl_manager_* files, which means the --gpu-index command line argument is ignored when using the Compatibility rendering method.

This is because OpenGL doesn't offer as much control over GPU selection compared to Vulkan and Direct3D12.

@hpvb suggested we could implement support for --gpu-index when using EGL, but it probably can't be done when using GLX. In the meantime, we could print a warning when using --gpu-index with the Compatibility rendering method, but I don't know of a way to do this without having to modify every gl_manager_* file out there (since they don't inherit from a common class).

Steps to reproduce

Start the project manager with --gpu-index 0, then --gpu-index 1 and notice how the same GPU is always used, even on multi-GPU systems (or on systems with llvmpipe available).

Minimal reproduction project (MRP)

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions