Applying patch from Ethan to fix up style and simplify a little bit.
Merge branch 'brushfiregames/sampler-state-flush' into titan