Don't allocate the grad or tess textures until flush time
We used to allocate the PLS gradient and tessellation textures preemptively, before we knew how large they needed to be (like other vertex resources). We didn't actually need to to this; we can just wait to allocate these textures until flush time when we know exactly how big they need to be. This reduces intermediate flushes since won't ever run out tessellation vertices or complex color ramps anymore (unless we exceed the absolute maximum supported number).
This also required writing out the simple two-texel gradientients to a side buffer, and then copying that side buffer into the gradient texture at flush time (instead of writing the simple ramps directly to the gradient texture to start with). This is overall better because now we only need one gradient texture instead of a ring of them, and we don't have to preserve the texture contents when we render the complex gradients.
Diffs=
47c57eae9 Don't allocate the grad or tess textures until flush time (#5656)
Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
11 files changed