/* Copyright (c) 2015-2024 The Khronos Group Inc. * Copyright (c) 2015-2024 Valve Corporation * Copyright (c) 2015-2024 LunarG, Inc. * Copyright (C) 2015-2024 Google Inc. * Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. * * 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 "state_tracker/state_object.h" #include "containers/range_vector.h" #include <vulkan/utility/vk_safe_struct.hpp> namespace vvl { struct MemRange { … }; struct DedicatedBinding { … }; // Data struct for tracking memory object class DeviceMemory : public StateObject { … }; // Generic memory binding struct to track objects bound to objects // No size needed since it will either be the size of the resource if not sparse; // the size of the plane if multiplanar; and if sparse, the size of the bound range // will be stored in the range_map // We need the resource_offset and memory_offset to be able to transform from // resource space (in which the range is) to memory space struct MEM_BINDING { … }; class BindableMemoryTracker { … }; // Dummy memory tracker for swapchains class BindableNoMemoryTracker : public BindableMemoryTracker { … }; // Non sparse bindable memory tracker class BindableLinearMemoryTracker : public BindableMemoryTracker { … }; // Sparse bindable memory tracker // Does not contemplate the idea of multiplanar sparse images class BindableSparseMemoryTracker : public BindableMemoryTracker { … }; // Non sparse multi planar bindable memory tracker class BindableMultiplanarMemoryTracker : public BindableMemoryTracker { … }; // Superclass for bindable object state (currently images, buffers and acceleration structures) class Bindable : public StateObject { … }; } // namespace vvl