Fix #195: don't exceed the GPU's texture size.