/* Copyright (c) 2019-2024 The Khronos Group Inc. * Copyright (c) 2019-2024 Valve Corporation * Copyright (c) 2019-2024 LunarG, Inc. * Copyright (C) 2019-2024 Google 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. * * John Zulauf <[email protected]> * */ #pragma once #include <vector> #include "range_vector.h" #include "custom_containers.h" #ifndef SPARSE_CONTAINER_UNIT_TEST #include "vulkan/vulkan.h" #else #include "vk_snippets.h" #endif namespace vvl { class Image; } // namespace vvl namespace subresource_adapter { class RangeEncoder; IndexType; Range; IndexRange; WritePolicy; split_op_keep_both; // Interface for aspect specific traits objects (now isolated in the cpp file) class AspectParameters { … }; struct Subresource : public VkImageSubresource { … }; // Subresource is encoded in (from slowest varying to fastest) // aspect_index // mip_level_index // array_layer_index // into continuous index ranges class RangeEncoder { … }; class SubresourceGenerator : public Subresource { … }; // Like an iterator for ranges... class RangeGenerator { … }; class ImageRangeEncoder : public RangeEncoder { … }; class ImageRangeGenerator { … }; // double wrapped map variants.. to avoid needing to templatize on the range map type. The underlying maps are available for // use in performance sensitive places that are *already* templatized (for example update_range_value). // In STL style. Note that N must be < uint8_t max enum BothRangeMapMode { … }; template <typename T, size_t N> class BothRangeMap { … }; } // namespace subresource_adapter