/* * Copyright (c) 2019-2024 Valve Corporation * Copyright (c) 2019-2024 LunarG, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include "sync/sync_renderpass.h" #include "state_tracker/cmd_buffer_state.h" class SyncValidator; class AlternateResourceUsage { … }; inline std::ostream &operator<<(std::ostream &out, const AlternateResourceUsage::FormatterState &formatter) { … } template <typename State, typename T> struct FormatterImpl { … }; // Vulkan handle and associated information. // Command buffer context stores array of handles that are referenced by the tagged commands. // VulkanTypedHandle is stored in unpacked form to avoid structure padding gaps. struct HandleRecord { … }; struct ResourceCmdUsageRecord { … }; struct DebugNameProvider; struct ResourceUsageRecord : public ResourceCmdUsageRecord { … }; // Provides debug region name for the specified access log command. // If empty name is returned it means the command is not inside debug region. struct DebugNameProvider { … }; // Command execution context is the base class for command buffer and queue contexts // Preventing unintented leakage of subclass specific state, storing enough information // for message logging. // TODO: determine where to draw the design split for tag tracking (is there anything command to Queues and CB's) class CommandExecutionContext : public SyncValidationInfo { … }; class CommandBufferAccessContext : public CommandExecutionContext, DebugNameProvider { … }; namespace syncval_state { class CommandBuffer : public vvl::CommandBuffer { … }; } // namespace syncval_state // Message Creation Helpers struct SyncNodeFormatter { … }; std::ostream &operator<<(std::ostream &out, const SyncNodeFormatter &formatter); std::ostream &operator<<(std::ostream &out, const HandleRecord::FormatterState &formatter); std::ostream &operator<<(std::ostream &out, const ResourceUsageRecord::FormatterState &formatter); std::ostream &operator<<(std::ostream &out, const HazardResult::HazardState &hazard);