主机写入保证源访问范围
Host write guarantees source access scope
根据规范 (1.2.138),第 6.9 节(主机写入顺序保证):
When batches of command buffers are submitted to a queue via vkQueueSubmit, it defines a
memory dependency with prior host operations, and execution of command buffers submitted to
the queue.
[...]
The first access scope includes all host writes to mappable device memory that are available to the
host memory domain.
"mappable"是否意味着使用VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
分配?
"available to the host memory domain"是否表示当前已映射?
does "mappable" mean allocated using VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
?
是的。
does "available to the host memory domain" mean currently mapped?
没有
在设备上,这意味着执行包括对主机的域操作的同步。这意味着具有 VK_PIPELINE_STAGE_HOST_BIT
的类似屏障的原语。
或者在主机上通过映射指针写入必须是 vkFlushMappedMemoryRanges
如果它们不是 COHERENT
。内存写入已在主机域中,但 vkFlush
执行可用性 OP。
在本章中指的是后者。通过 COHERENT
或 vkFlushMappedMemoryRanges
映射指针的内存写入将 automatically\implicitly 在下一个 vkQueueSubmit
.
时对 GPU 可见
根据规范 (1.2.138),第 6.9 节(主机写入顺序保证):
When batches of command buffers are submitted to a queue via vkQueueSubmit, it defines a memory dependency with prior host operations, and execution of command buffers submitted to the queue.
[...]
The first access scope includes all host writes to mappable device memory that are available to the host memory domain.
"mappable"是否意味着使用VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
分配?
"available to the host memory domain"是否表示当前已映射?
does "mappable" mean allocated using
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
?
是的。
does "available to the host memory domain" mean currently mapped?
没有
在设备上,这意味着执行包括对主机的域操作的同步。这意味着具有 VK_PIPELINE_STAGE_HOST_BIT
的类似屏障的原语。
或者在主机上通过映射指针写入必须是 vkFlushMappedMemoryRanges
如果它们不是 COHERENT
。内存写入已在主机域中,但 vkFlush
执行可用性 OP。
在本章中指的是后者。通过 COHERENT
或 vkFlushMappedMemoryRanges
映射指针的内存写入将 automatically\implicitly 在下一个 vkQueueSubmit
.