dxvk/src/dxgi
Joshua Ashton 5206d97710 [dxgi] Workaround UE4 DX11 + HDR crashes
Unreal Engine 4 titles use AGS/NVAPI to try and enable
HDR globally.
They can key this off IDXGIOutput::GetDesc1's ColorSpace
being HDR10.
Many of these UE4 games statically link against AGS.

This is a problem as when UE4 tries to enable HDR via AGS,
it does not check if AGSContext, and the display info etc
are nullptr unlike the rest of the code using AGS.
So we need to special-case UE4 titles to disable reporting a HDR
when they are in DX11 mode.

The simplest way to do this is to key off the fact that all
UE4 titles have an executable ending with "-Win64-Shipping".

We check if d3d12.dll is present, to determine what path in
UE4 we are on, as there are some games that ship both and support HDR.
(eg. The Dark Pictures: House of Ashes, 1281590)
Luckily for us, they only load d3d12.dll on the D3D12 render path
so we can key off that to force disable HDR only in D3D11.
2023-01-09 12:54:28 +00:00
..
dxgi.def [dxgi] Add DXGIGetDebugInterface1 stub 2020-07-24 12:25:48 +02:00
dxgi.sym [build] Add version scripts for native builds 2022-10-15 19:10:57 +02:00
dxgi_adapter.cpp [dxgi] Include win32 compat headers where applicable 2022-08-21 21:40:55 +02:00
dxgi_adapter.h [dxgi] Remove MonitorEnumProc and MonitorEnumInfo 2022-08-21 21:35:09 +02:00
dxgi_enums.cpp [dxgi] Added initial support for format conversion 2017-12-04 11:33:04 +01:00
dxgi_enums.h [dxgi] Added initial support for format conversion 2017-12-04 11:33:04 +01:00
dxgi_factory.cpp [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
dxgi_factory.h [dxgi] Initialize DxgiOptions before DxgiMonitorInfo 2023-01-06 17:27:38 +01:00
dxgi_format.cpp [dxgi] Use new format support queries to initialize format table 2022-08-17 15:39:03 +02:00
dxgi_format.h [dxgi] Use new format support queries to initialize format table 2022-08-17 15:39:03 +02:00
dxgi_include.h [dxgi] Revert 538b132490 2022-08-21 20:28:40 +00:00
dxgi_interfaces.h [dxgi] Implement DXGIOutput::GetDesc1's ColorSpace 2023-01-06 17:27:38 +01:00
dxgi_main.cpp [dxgi] Add DXGIGetDebugInterface1 stub 2020-07-24 12:25:48 +02:00
dxgi_monitor.cpp [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
dxgi_monitor.h [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
dxgi_object.h [util] Don't allow multiple inheritance for COM objects 2019-10-14 01:42:24 +02:00
dxgi_options.cpp [dxgi] Workaround UE4 DX11 + HDR crashes 2023-01-09 12:54:28 +00:00
dxgi_options.h [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
dxgi_output.cpp [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
dxgi_output.h [dxgi] Cache display metadata + colorimetry in DXGI_VK_MONITOR_DATA 2022-11-21 17:26:53 +01:00
dxgi_surface.cpp [dxgi] Implement DxgiSurfaceFactory 2022-11-07 14:14:05 +01:00
dxgi_surface.h [dxgi] Implement DxgiSurfaceFactory 2022-11-07 14:14:05 +01:00
dxgi_swapchain.cpp [dxgi] Implement DXGIOutput::GetDesc1's ColorSpace 2023-01-06 17:27:38 +01:00
dxgi_swapchain.h [dxgi] Get rid of NotifyModeChange method 2022-10-07 13:25:56 +02:00
dxgi_swapchain_dispatcher.h [dxgi] Store device pointer in DxgiSwapChainDispatcher 2022-10-20 19:05:19 +02:00
meson.build [dxgi] Implement DxgiSurfaceFactory 2022-11-07 14:14:05 +01:00
version.rc [build] Add version info to compiled DLLs 2019-04-05 21:09:57 +02:00