Skip to content

backends/drm: properly handle neither CTM and gamma being supported

Xaver Hugl requested to merge work/zamundaaa/night-color-factors into master

Instead of hardcoding only NVidia, try to use CTM and GAMMA_LUT before falling back to the shader path. This way it also works on other GPUs that lack color management hardware, and only falls back to the color management path on older NVidia drivers.

This commit also ensures that the color management hardware is set properly after toggling color management on and off again, and simplifies ColorDevice to only deal with rgb factors instead of always calculating luts. This should improve performance of night color animations on hardware where CTMs are supported

CCBUG: 453701

Merge request reports