1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef VULKAN_GPU_RESOURCE_UTIL_VK_H
17 #define VULKAN_GPU_RESOURCE_UTIL_VK_H
18 
19 #include <cstdint>
20 #include <vulkan/vulkan_core.h>
21 
22 #include <base/containers/string_view.h>
23 #include <render/namespace.h>
24 
25 BASE_BEGIN_NAMESPACE()
26 class ByteArray;
27 BASE_END_NAMESPACE()
28 RENDER_BEGIN_NAMESPACE()
29 class IDevice;
30 class GpuBuffer;
31 class GpuImage;
32 class GpuSampler;
33 
34 namespace GpuResourceUtil {
35 void CopyGpuBufferVk(GpuBuffer& buffer, BASE_NS::ByteArray& byteArray);
36 void DebugObjectNameVk(
37     const IDevice& device, const VkObjectType objectType, const uint64_t castedHandle, const BASE_NS::string_view name);
38 void DebugBufferNameVk(const IDevice& device, const GpuBuffer& buffer, const BASE_NS::string_view name);
39 void DebugImageNameVk(const IDevice& device, const GpuImage& image, const BASE_NS::string_view name);
40 void DebugSamplerNameVk(const IDevice& device, const GpuSampler& sampler, const BASE_NS::string_view name);
41 } // namespace GpuResourceUtil
42 RENDER_END_NAMESPACE()
43 
44 #endif // VULKAN_GPU_RESOURCE_UTIL_VK_H
45