| 1068 | } |
| 1069 | |
| 1070 | void AccessState::UpdateFirst(const ResourceUsageTagEx tag_ex, const SyncAccessInfo& usage_info, |
| 1071 | const AttachmentAccess& attachment_access, SyncFlags flags) { |
| 1072 | // Only record until we record a write. |
| 1073 | if (!first_access_closed_) { |
| 1074 | const bool is_read = IsRead(usage_info.access_index); |
| 1075 | const VkPipelineStageFlags2 usage_stage = is_read ? usage_info.stage_mask : 0U; |
| 1076 | if (0 == (usage_stage & first_read_stages_)) { |
| 1077 | // If this is a read we haven't seen or a write, record. |
| 1078 | // We always need to know what stages were found prior to write |
| 1079 | first_read_stages_ |= usage_stage; |
| 1080 | if (0 == (read_execution_barriers & usage_stage)) { |
| 1081 | // If this stage isn't masked then we add it (since writes map to usage_stage 0, this also records writes) |
| 1082 | first_accesses_.emplace_back(usage_info, tag_ex, attachment_access, flags); |
| 1083 | first_access_closed_ = !is_read; |
| 1084 | } |
| 1085 | } |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | void AccessState::TouchupFirstForLayoutTransition(ResourceUsageTag tag, const OrderingBarrier& layout_ordering) { |
| 1090 | // Only call this after recording an image layout transition |
nothing calls this directly
no test coverage detected