Fix sRGB backbuffers on the SDL_GPU and D3D11 backends#240
Fix sRGB backbuffers on the SDL_GPU and D3D11 backends#240flibitijibibo merged 6 commits intoFNA-XNA:masterfrom
Conversation
flibitijibibo
left a comment
There was a problem hiding this comment.
One tiny thing and one slightly less tiny but still pretty small thing - otherwise lgtm
src/FNA3D_Driver_D3D11.c
Outdated
| } | ||
| else if (sRGB) | ||
| { | ||
| colorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709; |
There was a problem hiding this comment.
Doesn't the else cover this?
There was a problem hiding this comment.
I'm not sure this or the other else are both the correct color space
There was a problem hiding this comment.
I did some more testing and it seems like they're right, but it feels like either the sRGB or non-sRGB arm should be G10 so I'm not sure what's going on.
Co-authored-by: Ethan Lee <flibitijibibo@gmail.com>
|
This isn't ready to merge yet, I just noticed that this color space code leaks a reference to the swapchain EDIT: Fixed EDIT 2: Sort of. I think we need to release swapchain3 instead of swapchain, because it's technically legal for queryinterface to return a separate object... |
flibitijibibo
left a comment
There was a problem hiding this comment.
Compared these changes to SDL_GPU's swapchain composition logic and it's close enough, making a couple changes then merging...
|
SLR hosting is returning 502 for some reason, probably temporary - the other Linux builds are fine so this should be green when steamos.cloud is back. |
sRGB textures and render targets work but when you request a sRGB backbuffer, you don't get one right now.
On SDL_GPU we aren't flowing the sRGB flag through.
On D3D11, we changed to flip model which doesn't allow sRGB backbuffers, you have to set the colorspace on the swapchain instead.
This PR also fixes a swapchain leak triggered by enabling HDR in D3D11