Skip to content

Commit

Permalink
[dxgi] Treat R16G16B16A16_FLOAT as 32bpp for display
Browse files Browse the repository at this point in the history
HDR in Control (a patch released by a developer post-launch, not
actually in the game sadly) tries to set a video mode with
DXGI_FORMAT_R16G16B16A16_FLOAT.

This seemingly works on Windows, and based on FindClosestMode etc
documentaton, this seems required to work for any format that scanout
it supported for.

It's really not like the bpp is meaningful on Windows with the
distinction of 8bit and 10bit not working in GDI modes at all.
Nor does it end up actually setting anything on Linux/Deck where
modesets are emulated.

So, treat DXGI_FORMAT_R16G16B16A16_FLOAT as 32bpp so the
FindClosestMatchingMode and EnterFullscreenMode calls succeed.
  • Loading branch information
misyltoad committed Oct 29, 2023
1 parent f45911a commit b7f8c5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dxgi/dxgi_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ namespace dxvk {
return 32;

case DXGI_FORMAT_R16G16B16A16_FLOAT:
return 64;
// Floating point output doesn't really make sense.
// This seemingly works on Windows, and based on FindClosestMode etc documentaton,
// this seems required to work for any format that scanout it supported for.
// Treat as 10-bit -> 32.
return 32;

default:
Logger::warn(str::format(
Expand Down

0 comments on commit b7f8c5c

Please sign in to comment.