Merge pull request #1382 from billhollings/coherent-texture-flushing

Reorganize coherent texture flushing on memory map and unmap.