Skip to content

Potential missing WAW #11549

@MennoVink

Description

@MennoVink

Describe the situation in which you encountered the missing validation
VK_LAYER_KHRONOS_validation + validate_sync + gpuav_enable + exclusive queue ownership resources
I have a setup in which i'm expecting a WAW error, but i'm not getting it. Now that could be good, but i'm not entirely convinced that my code is actually valid. Here's the steps i'm executing:

On the Transfer QF:

  1. vkCmdCopyBuffer
  2. Release barrier ALL_TRANSFER / MEMORY_WRITE -> ALL_COMMANDS / MEMORY_READ
  3. Signal semaphore

On the Compute QF:

  1. Wait semaphore
  2. Acquire barrier ALL_TRANSFER / MEMORY_WRITE -> ALL_COMMANDS / MEMORY_READ
  3. Signal fence

On Host:

  1. WaitForFences

On the Compute QF:

  1. vkCmdBindDescriptorSets (containing that buffer)
  2. vkCmdDispatch (writing to the buffer)

What i'm worried about is that the QFOT barrier doesn't properly prevent compute memory writes from happening before the resource has been acquired on the Compute QF or the initial data has been copied.

Valid Usage IDs requested
To be honest i have not done the full evidence gathering yet. If you agree this looks suspicious, I'd be willing to do some digging to see if something is listed in the specs about this.

Additional Context
I have a renderdoc capture of a simplified app doing almost the same thing. The difference with the more involved app is that this capture doesn't use writeonly on the output buffer. One could then argue that since the shader is also reading and writing is dependent on reads that it's still valid. Using this example for simplicity of illustration though, the other app also doesn't give the validation error.

https://drive.google.com/file/d/1OnXxckJuXMOtuIClSnfV9g6g7bgCIj_9/view?usp=sharing
EID 107: vkCmdCopyBuffer (to buffer 569)
EID 108: release barrier
EID 112: acquire barrier
EID 114: vkWaitForFences
EID 128: vkUpdateDescriptorSets (buffer 569)
EID 134: vkCmdBindDescriptorSets
EID 136: vkCmdDispatch

Metadata

Metadata

Assignees

Labels

SynchronizationSynchronization Validation Object Issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions