MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / SetWrite

Method SetWrite

layers/sync/sync_access_state.cpp:597–604  ·  view source on GitHub ↗

Clobber last read and all barriers... because all we have is DANGER, DANGER, WILL ROBINSON!!! if the last_reads/last_write were unsafe, we've reported them, in either case the prior access is irrelevant. We can overwrite them as *this* write is now after them.

Source from the content-addressed store, hash-verified

595// if the last_reads/last_write were unsafe, we've reported them, in either case the prior access is irrelevant.
596// We can overwrite them as *this* write is now after them.
597void AccessState::SetWrite(SyncAccessIndex access_index, const AttachmentAccess& attachment_access, ResourceUsageTagEx tag_ex,
598 SyncFlags flags) {
599 ClearRead();
600 if (!last_write.has_value()) {
601 last_write.emplace();
602 }
603 last_write->Set(access_index, attachment_access, tag_ex, flags);
604}
605
606void AccessState::ClearWrite() { last_write.reset(); }
607

Callers

nothing calls this directly

Calls 3

has_valueMethod · 0.80
emplaceMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected