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

Method IsRAWHazard

layers/sync/sync_access_state.cpp:1035–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035bool AccessState::IsRAWHazard(const SyncAccessInfo& usage_info) const {
1036 assert(IsRead(usage_info.access_index));
1037 // Only RAW vs. last_write if it doesn't happen-after any other read because either:
1038 // * the previous reads are not hazards, and thus last_write must be visible and available to
1039 // any reads that happen after.
1040 // * the previous reads *are* hazards to last_write, have been reported, and if that hazard is fixed
1041 // the current read will be also not be a hazard, thus reporting a hazard here adds no needed information.
1042 return last_write.has_value() && (0 == (read_execution_barriers & usage_info.stage_mask)) &&
1043 last_write->IsWriteHazard(usage_info);
1044}
1045
1046VkPipelineStageFlags2 AccessState::GetOrderedStages(QueueId queue_id, const OrderingBarrier& ordering,
1047 AttachmentAccessType attachment_access_type) const {

Callers

nothing calls this directly

Calls 3

IsReadFunction · 0.85
has_valueMethod · 0.80
IsWriteHazardMethod · 0.80

Tested by

no test coverage detected