Skip to content

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Dec 22, 2022

Description

We had an incorrect assumption that the DXGI format of the mode in DXGI_OUTDUPL_DESC was the format of the frames that we will receive from AcquireNextFrame().

This is incorrect as MSDN states:

The format of the desktop image is always DXGI_FORMAT_B8G8R8A8_UNORM no matter what the current display mode is.

This is why we thought we were getting formats like DXGI_FORMAT_R16G16B16A16_FLOAT (in HDR) and DXGI_FORMAT_R8G8B8A8_UNORM (in Vulkan apps). This change "fixes" streaming with HDR enabled (though output is clipped to SDR, causing it to look blown out). However, HDR can be successfully toggled off while streaming, which then streams a correct SDR image.

cc: @psyke83

Screenshot

Blown out HDR streaming (but better than nothing, which is what you get today)
image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@psyke83
Copy link
Contributor

psyke83 commented Dec 22, 2022

I missed some discussion in discord before leaving my last comment on #522 referring to this PR. After looking at the code and testing a build, I can see that this works independently to #522, and also is a simpler & much superior fix not only towards getting HDR to display something, but also getting DXGI_FORMAT_R8G8B8A8_UNORM (SDR Vulkan/true exclusive fullscreen) working as well.

@ReenigneArcher: if @cgutman is happy with this PR, I recommend merging it (and ignoring #522 entirely). Even though HDR needs more work, this is still a legitimate fix for #553.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants