baldurk/renderdoc

(OpenGL) HDR corrupts textures and freezes the software after a capture

Closed this issue · 8 comments

Description

This all happens on Windows when HDR is enabled on your main display with a RTX GPU. Everything works fine if your main display is not HDR enabled.

image

When taking a capture, the application freezes and stops responding (here is a screenshot of the application):

image

The capture's thumbnail looks normal:

image

But when you go to the texture viewer, textures are all corrupted:

image

image

image

Only textures seem to be affected:

image

The capture file can be sent if needed.

Steps to reproduce

  • Enable HDR on the main display
  • Launch an OpenGL game with RenderDoc
  • Press PrintScreen

Environment

  • RenderDoc version: 1.31 (built from 04BFEDCD)
  • OS: Windows 11 23H2 22635.3420
  • CPU: AMD Ryzen 9 5900X 12-Core Processor
  • GPU: AMD Radeon RX 7900 XTX (Same thing happens on a 6900 XT)
  • Graphics API: OpenGL

This sounds like it may be a driver bug as I don't think GL even has any awareness of HDR or not and it's not something that RenderDoc supports if it does exist. Are you able to test and see if this reproduces on a non-AMD GPU?

I don't have an HDR display so I'm unable to test or reproduce this unfortunately, if it only happens with HDR enabled.

It may even be a problem with GLFW as far as I know. I use OpenTK Beta 5.0.0-pre.10 for reference, which uses GLFW version 3.3.8.

It has been happening on 3 different driver versions so the chance that this is the problem is low.

I will try and have it tested by someone with a non-AMD GPU. If you don't mind, the game can be downloaded from https://buffergame.com/download, but Windows flags it heavily as a trojan virus so I would understand if you don't want to touch it.

Driver versions aren't as good a test as trying a different vendor, since it could exist in many versions before it gets fixed - for example if it hasn't been reported or found until now.

I tried it on an NV GPU, but as I mention I don't have an HDR display so even if the bug weren't driver specific I wouldn't be able to reproduce it.

I have a friend with an HDR screen and a RTX 2070 SUPER, we're going to test it later today. I'll come back to you with the results. In the meantime I've downloaded the source and will do some tests on my end.

In gl_common.cpp
image
image

When I check for red size directly in my game, I get 8:
image

No other errors

Returned color encoding is 9729

Yes I've seen the AMD driver return bad data here as well. You can ignore that error.

Tested on a RTX 2070 SUPER and everything works perfectly, so it is an AMD issue.

Thanks for testing that. I've passed the information on to AMD but I don't think there's anything else I can do from RenderDoc's side on this.