Skip to content

Commit 3bb4aba

Browse files
committed
hk: clarify G17P alias-scope gaps after stream closure
Name barriers after a compute stream closes as well as command-buffer openers. Also document the untested graphics-only source case, which keeps the ordinary strong flush. No behaviour changes. (cherry picked from commit 1498a03)
1 parent 68f7dbd commit 3bb4aba

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

‎src/asahi/vulkan/hk_device.h‎

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,20 @@ enum hk_perftest {
365365
* and only when that stream already holds work
366366
* (hk_cdm_visibility_flush_needed()). It writes back every dirty line, so
367367
* the writes it covers include those of earlier streams and earlier
368-
* command buffers. A barrier recorded before any work in a command buffer
369-
* has no such stream; hk_CmdPipelineBarrier2() and hk_CmdSetEvent2() then
370-
* record the flush into a stream ordered after the source scope, as a
371-
* host-read dependency does, and order the destination after that stream.
372-
* That the hardware writes those earlier lines back from a flush in a later
373-
* stream has not been tested. Not covered: a resource created after the
374-
* command buffer was recorded and reached through a path recording did not
375-
* see, that is a device address the command buffer reads indirectly, or a
376-
* descriptor set bound at recording and updated after it
377-
* (descriptorBinding*UpdateAfterBind). */
368+
* command buffers. When no open compute stream holds work, including after
369+
* a timestamp or query copy closed it partway through a command buffer,
370+
* hk_CmdPipelineBarrier2() and hk_CmdSetEvent2() record the flush into a
371+
* stream ordered after the source scope, as a host-read dependency does,
372+
* and order the destination after that stream. That the hardware writes
373+
* those earlier lines back from a flush in a later stream has not been
374+
* tested. Not covered: a resource created after the command buffer was
375+
* recorded and reached through a path recording did not see, that is a
376+
* device address the command buffer reads indirectly, or a descriptor set
377+
* bound at recording and updated after it (descriptorBinding*UpdateAfterBind).
378+
* Graphics-only sources also do not request memory scope: attachment or
379+
* shader writes through a sparse image followed by transfer or compute
380+
* reads through a plain alias receive the ordinary post-graphics strong
381+
* flush. That case has not been hardware-tested. */
378382
static inline bool
379383
hk_cdm_alias_scope(const struct hk_device *dev)
380384
{

0 commit comments

Comments
 (0)