On 1/22/20 19:39, Henri Verbeet wrote:
On Wed, 22 Jan 2020 at 16:33, Paul Gofman gofmanp@gmail.com wrote:
I guess a change to needs_separate_srgb_gl_texture() in wined3d_private.h involving the format check will act as a main trigger for fallback logic. Then I need to surf through each EXT_TEXTURE_SRGB_DECODE and d3d_info->srgb_read_control check to see what needs to be adjusted on case by case basis. I don't think its a lot, as mostly these checks affect setting GL_TEXTURE_SRGB_DECODE_EXT GL sampler parameter which has no effect on non SRGB format anyway.
I suspect it's not worth it in terms of making the code more complex; it isn't all that straightforward to start with, as you've found. I'm tempted to just take the hit of using GL_SRGB8 for these formats, unfortunate as that may be.
Frankly making (almost) all 16 bit d3d formats always use 24 or 32 bit GL formats is not what I would suggest at start if realized that at once. But if to go that way the first version of my patches are still valid suggestion. Maybe patches 3, 4 can be dropped as that was added for completeness, I am not aware of the real applications depending on that.