Combine and sort the GPU command tables by purpose, make it flags for future flexibility.

Fix a couple of bugs while at it (logic ops were not flushing, if viewport was partially changed, it might not take).