vulkan-sync icon indicating copy to clipboard operation
vulkan-sync copied to clipboard

Host CPU accesses: HOST_COHERENT explanation

Open elderkeltir opened this issue 4 years ago • 0 comments

Hello!

First of all, thank you very much for the time you invested in this article! I'm trying to understand concept of system memory visible to GPU and write-combined memory. I read papers regarding the topic and still can't get full image in my mind.

What you wrote there: "Writes are cached a little bit - bytes written to the same cache line are collected in a write buffer, and eventually the write buffer will be flushed to VRAM in a single memory transaction."

What concerns me: write combined memory is system memory(located in RAM, not VRAM) as far as I got it right. Then, assume CPU writes to region of write-combined memory(RAM) and then GPU will access that memory through PCIe and put it in it's caches eventually. This doesn't look like CPU will write anything to VRAM in here.

I might got something wrong or just didn't understand the concept of write-combined memory correct. If you can explain this a bit, it would be very great.

elderkeltir avatar Jul 06 '21 09:07 elderkeltir