There is a patch at https://patchwork.freedesktop.org/patch/77510/ which fixes your test case (and should fix format casting with render-to-texture more generally). Let us know if this fixes your SRGB-related rendering problems.