What would be the impact of using one texture and setting the same texture unit to multiple sampler uniforms? The idea is to support either packed or planar YUV video with the same sampler, but no texture reads in conditionals.
So, in one version, a Y pixel would be read from texture 0, u from texture 1 etc., but in a packed version, texture 0 would have the y, u and v. I would then just calculate the different offsets to sample the pixels.
Would that break the shader or GPU in any way? I don’t really care if the texture is ‘copied’ into caches multiple times - the idea is just for the same shader to decode different pixel formats of video.