Skip to content

Spoof display handle for PhysX games #4953

Open
@phly95

Description

@phly95

When running Mirror's Edge with DXVK, if you have the AMD display as output but the Nvidia card set to physx, the game will use CPU physx. However, if you run the game with the Nvidia display as output at the start of the game, it will use the Nvidia GPU for physx, even if the rendering is being done on the AMD card.

The current trick is to start the game on the nvidia GPU with a dummy HDMI plug as the primary display, then after the game starts, remove the display, then alt tab out and back into the game, and now physx is entirely on the Nvidia card, and rendering is entirely on the AMD without bottlenecks.

I propose that there should be a way to emulate the display output in DXVK to pretend that the display output is comming from and Nvidia card. I've tried hideAmdGpu = True and customVendorId = 10de, but it seems like it's getting the output display handle and using that to decide whether to enable GPU physx. Basically, to enable hybrid physx, the game needs to see that it's being displayed on a display connected to the Nvidia card, but rendering can happen anywhere, and moving to another display is possible after the game has started works thanks to DXVK (it would crash under native DX9)

Software information

Mirror's Edge, PhysX on, rendering on AMD, PhysX on Nvidia

System information

  • GPU: AMD Radeon RX 9070 XT and NVIDIA GeForce GTX 1060 6GB
  • Driver: AMD: 25.5.1 , Nvidia: 576.28
  • Wine version: Windows 11 24H2 26100.3775
  • DXVK version: v2.6.1-1-gplasync

Log files

MirrorsEdge_d3d9.log
MirrorsEdge_d3d9_amd_connected.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions