forked from KhronosGroup/Vulkan-ValidationLayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync_vuid_maps.h
106 lines (87 loc) · 3.17 KB
/
sync_vuid_maps.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* Copyright (c) 2021 The Khronos Group Inc.
* Copyright (c) 2021 Valve Corporation
* Copyright (c) 2021 LunarG, Inc.
* Copyright (C) 2021 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.
*
* Author: Jeremy Gebben <[email protected]>
*/
#pragma once
#include <string>
#include <map>
#include <vulkan/vulkan_core.h>
struct CoreErrorLocation;
struct SubresourceRangeErrorCodes;
namespace sync_vuid_maps {
extern const std::map<VkPipelineStageFlags2KHR, std::string> kFeatureNameMap;
const std::string &GetBadFeatureVUID(const CoreErrorLocation &loc, VkPipelineStageFlags2KHR bit);
const std::string &GetBadAccessFlagsVUID(const CoreErrorLocation &loc, VkAccessFlags2KHR bit);
const std::string &GetStageQueueCapVUID(const CoreErrorLocation &loc, VkPipelineStageFlags2KHR bit);
enum class QueueError {
kSrcOrDstMustBeIgnore = 0,
kSpecialOrIgnoreOnly,
kSrcAndDstValidOrSpecial,
kSrcAndDestMustBeIgnore,
kSrcAndDstBothValid,
kSubmitQueueMustMatchSrcOrDst,
};
extern const std::map<QueueError, std::string> kQueueErrorSummary;
const std::string &GetBarrierQueueVUID(const CoreErrorLocation &loc, QueueError error);
const std::string &GetBadImageLayoutVUID(const CoreErrorLocation &loc, VkImageLayout layout);
enum class BufferError {
kNoMemory = 0,
kOffsetTooBig,
kSizeOutOfRange,
kSizeZero,
};
const std::string &GetBufferBarrierVUID(const CoreErrorLocation &loc, BufferError error);
enum class ImageError {
kNoMemory = 0,
kConflictingLayout,
kBadLayout,
kNotColorAspect,
kNotColorAspectYcbcr,
kBadMultiplanarAspect,
kBadPlaneCount,
kNotDepthOrStencilAspect,
kNotDepthAndStencilAspect,
kNotSeparateDepthAndStencilAspect,
kRenderPassMismatch,
kRenderPassLayoutChange,
};
const std::string &GetImageBarrierVUID(const CoreErrorLocation &loc, ImageError error);
struct GetImageBarrierVUIDFunctor {
ImageError error;
GetImageBarrierVUIDFunctor(ImageError error_) : error(error_) {}
const std::string &operator()(const CoreErrorLocation &loc) const { return GetImageBarrierVUID(loc, error); }
};
const SubresourceRangeErrorCodes& GetSubResourceVUIDs(const CoreErrorLocation &loc);
enum class SubmitError {
kTimelineSemSmallValue,
kSemAlreadySignalled,
kBinaryCannotBeSignalled,
kTimelineCannotBeSignalled,
kTimelineSemMaxDiff,
kProtectedFeatureDisabled,
kBadUnprotectedSubmit,
kBadProtectedSubmit,
kCmdNotSimultaneous,
kReusedOneTimeCmd,
kSecondaryCmdNotSimultaneous,
kCmdWrongQueueFamily,
kSecondaryCmdInSubmit,
kHostStageMask,
};
const std::string &GetQueueSubmitVUID(const CoreErrorLocation &loc, SubmitError error);
}; // namespace sync_vuid_maps