File: cc_sync_vuid_maps.h

package info (click to toggle)
vulkan-validationlayers 1.4.328.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,412 kB
  • sloc: cpp: 615,223; python: 12,115; sh: 24; makefile: 20; xml: 14
file content (132 lines) | stat: -rw-r--r-- 3,963 bytes parent folder | download | duplicates (7)
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* Copyright (c) 2021-2025 The Khronos Group Inc.
 * Copyright (c) 2021-2025 Valve Corporation
 * Copyright (c) 2021-2025 LunarG, Inc.
 * Copyright (C) 2021-2025 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.
 */
#pragma once
#include <string>
#include <vulkan/vulkan_core.h>
#include "containers/custom_containers.h"

struct Location;
struct DeviceExtensions;
struct SubresourceRangeErrorCodes;
struct DeviceExtensions;

namespace vvl {

const vvl::unordered_map<VkPipelineStageFlags2, std::string> &GetFeatureNameMap();

const std::string &GetBadFeatureVUID(const Location &loc, VkPipelineStageFlags2 bit, const DeviceExtensions &device_extensions);

const std::string &GetBadAccessFlagsVUID(const Location &loc, VkAccessFlags2 bit);

const std::string &GetStageQueueCapVUID(const Location &loc, VkPipelineStageFlags2 bit);

enum class QueueError {
    kSrcNoExternalExt = 0,
    kDstNoExternalExt,
    kSrcNoForeignExt,
    kDstNoForeignExt,
    kSync1ConcurrentNoIgnored,
    kSync1ConcurrentSrc,
    kSync1ConcurrentDst,
    kExclusiveSrc,
    kExclusiveDst,
    kHostStage,
    kSubmitQueueMustMatchSrcOrDst,
};

const vvl::unordered_map<QueueError, std::string> &GetQueueErrorSummaryMap();

const std::string &GetBarrierQueueVUID(const Location &loc, QueueError error);

const std::string &GetBadImageLayoutVUID(const Location &loc, VkImageLayout layout);

enum class BufferError {
    kNoMemory = 0,
    kOffsetTooBig,
    kSizeOutOfRange,
    kSizeZero,
};

const std::string &GetBufferBarrierVUID(const Location &loc, BufferError error);

enum class ImageError {
    kNoMemory = 0,
    kConflictingLayout,
    kBadLayout,
    kBadAttFeedbackLoopLayout,
    kBadSync2OldLayout,
    kBadSync2NewLayout,
    kBadZeroInitializeOldLayout,
    kZeroInitializeSubresource,
    kNotColorAspectSinglePlane,
    kNotColorAspectNonDisjoint,
    kBadMultiplanarAspect,
    kBadPlaneCount,
    kNotDepthOrStencilAspect,
    kNotDepthAndStencilAspect,
    kSeparateDepthWithStencilLayout,
    kSeparateStencilhWithDepthLayout,
    kRenderPassMismatch,
    kRenderPassMismatchColorUnused,
    kRenderPassMismatchAhbZero,
    kRenderPassInstanceLayoutChange,
    kDynamicRenderingLocalReadNew,
    kDynamicRenderingLocalReadOld,
    kAspectMask,
};

const std::string &GetImageBarrierVUID(const Location &loc, ImageError error);

struct GetImageBarrierVUIDFunctor {
    ImageError error;
    GetImageBarrierVUIDFunctor(ImageError error_) : error(error_) {}
    const std::string &operator()(const Location &loc) const { return GetImageBarrierVUID(loc, error); }
};

enum class SubmitError {
    kTimelineSemSmallValue,
    kSemAlreadySignalled,
    kBinaryCannotBeSignalled,
    kTimelineSemMaxDiff,
    kProtectedFeatureDisabled,
    kBadUnprotectedSubmit,
    kBadProtectedSubmit,
    kCmdNotSimultaneous,
    kReusedOneTimeCmd,
    kSecondaryCmdNotSimultaneous,
    kCmdWrongQueueFamily,
    kSecondaryCmdInSubmit,
    kHostStageMask,
    kOtherQueueWaiting,
};

const std::string &GetQueueSubmitVUID(const Location &loc, SubmitError error);

enum class DynamicRenderingBarrierError {
    kFeatureError,
    kFramebufferSpace,
    kNoBuffersOrImages,
    kImageLayout,
    kDependencyFlags,
};

const std::string &GetDynamicRenderingBarrierVUID(const Location &loc, DynamicRenderingBarrierError error);

const std::string &GetAccessMaskRayQueryVUIDSelector(const Location &loc, const DeviceExtensions &device_extensions);

}  // namespace vvl