| 1060 | } |
| 1061 | |
| 1062 | bool SyncValidator::ValidateCountBuffer(const CommandBufferAccessContext& cb_context, const AccessContext& context, VkBuffer buffer, |
| 1063 | VkDeviceSize offset, const Location& loc) const { |
| 1064 | bool skip = false; |
| 1065 | |
| 1066 | auto count_buf_state = Get<vvl::Buffer>(buffer); |
| 1067 | const AccessRange range = MakeRange(offset, 4); |
| 1068 | auto hazard = context.DetectHazard(*count_buf_state, SYNC_DRAW_INDIRECT_INDIRECT_COMMAND_READ, range); |
| 1069 | if (hazard.IsHazard()) { |
| 1070 | const LogObjectList objlist(cb_context.GetCBState().Handle(), count_buf_state->Handle()); |
| 1071 | const std::string resource_description = "draw count " + FormatHandle(buffer); |
| 1072 | const auto error = error_messages_.BufferError(hazard, cb_context, loc.function, resource_description, range); |
| 1073 | skip |= SyncError(hazard.Hazard(), objlist, loc, error); |
| 1074 | } |
| 1075 | return skip; |
| 1076 | } |
| 1077 | |
| 1078 | void SyncValidator::RecordCountBuffer(CommandBufferAccessContext& cb_context, const ResourceUsageTag tag, VkBuffer buffer, |
| 1079 | VkDeviceSize offset) { |
nothing calls this directly
no test coverage detected