chromium/third_party/vulkan-validation-layers/src/layers/vulkan/generated/sync_validation_types.h

// *** THIS FILE IS GENERATED - DO NOT EDIT ***
// See sync_validation_generator.py for modifications

/***************************************************************************
 *
 * Copyright (c) 2015-2024 Valve Corporation
 * Copyright (c) 2015-2024 LunarG, 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.
 ****************************************************************************/

// NOLINTBEGIN

#pragma once

#include <array>
#include <bitset>
#include <map>
#include <stdint.h>
#include <vulkan/vulkan.h>
#include "containers/custom_containers.h"
// clang-format off
static constexpr VkAccessFlags2 kShaderReadExpandBits =;
static constexpr VkAccessFlags2 kShaderWriteExpandBits =;

// Fake stages and accesses for acquire present support
static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRESENT_ENGINE_BIT_SYNCVAL =;
static const VkAccessFlagBits2 VK_ACCESS_2_PRESENT_ACQUIRE_READ_BIT_SYNCVAL =;
static const VkAccessFlagBits2 VK_ACCESS_2_PRESENT_PRESENTED_BIT_SYNCVAL =;
// Unique number for each  stage/access combination
enum SyncStageAccessIndex {};

SyncStageAccessFlags;
// Unique bit for each stage/access combination
static const SyncStageAccessFlags SYNC_DRAW_INDIRECT_INDIRECT_COMMAND_READ_BIT =;
static const SyncStageAccessFlags SYNC_DRAW_INDIRECT_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_CONTROL_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_TESSELLATION_EVALUATION_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_GEOMETRY_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_COLOR_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_DEPTH_STENCIL_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_INPUT_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_EARLY_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_EARLY_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_LATE_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_LATE_FRAGMENT_TESTS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT =;
static const SyncStageAccessFlags SYNC_COLOR_ATTACHMENT_OUTPUT_COLOR_ATTACHMENT_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_COMPUTE_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_HOST_HOST_READ_BIT =;
static const SyncStageAccessFlags SYNC_HOST_HOST_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_COMMAND_PREPROCESS_BIT_NV_COMMAND_PREPROCESS_READ_BIT_NV =;
static const SyncStageAccessFlags SYNC_COMMAND_PREPROCESS_BIT_NV_COMMAND_PREPROCESS_WRITE_BIT_NV =;
static const SyncStageAccessFlags SYNC_CONDITIONAL_RENDERING_BIT_EXT_CONDITIONAL_RENDERING_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_BIT_EXT_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_TASK_SHADER_EXT_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_BIT_EXT_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_MESH_SHADER_EXT_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_RAY_TRACING_SHADER_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_SHADING_RATE_ATTACHMENT_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_FRAGMENT_DENSITY_PROCESS_BIT_EXT_FRAGMENT_DENSITY_MAP_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TRANSFORM_FEEDBACK_BIT_EXT_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TRANSFORM_FEEDBACK_BIT_EXT_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT =;
static const SyncStageAccessFlags SYNC_TRANSFORM_FEEDBACK_BIT_EXT_TRANSFORM_FEEDBACK_WRITE_BIT_EXT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_ACCELERATION_STRUCTURE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_INDIRECT_COMMAND_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_MICROMAP_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_BUILD_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_VIDEO_DECODE_VIDEO_DECODE_READ_BIT =;
static const SyncStageAccessFlags SYNC_VIDEO_DECODE_VIDEO_DECODE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_VIDEO_ENCODE_VIDEO_ENCODE_READ_BIT =;
static const SyncStageAccessFlags SYNC_VIDEO_ENCODE_VIDEO_ENCODE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_COPY_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_COPY_ACCELERATION_STRUCTURE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_COPY_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_ACCELERATION_STRUCTURE_COPY_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_OPTICAL_FLOW_BIT_NV_OPTICAL_FLOW_READ_BIT_NV =;
static const SyncStageAccessFlags SYNC_OPTICAL_FLOW_BIT_NV_OPTICAL_FLOW_WRITE_BIT_NV =;
static const SyncStageAccessFlags SYNC_MICROMAP_BUILD_BIT_EXT_MICROMAP_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_MICROMAP_BUILD_BIT_EXT_MICROMAP_WRITE_BIT_EXT =;
static const SyncStageAccessFlags SYNC_MICROMAP_BUILD_EXT_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_MICROMAP_BUILD_EXT_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_MICROMAP_BUILD_EXT_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_COPY_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_COPY_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_RESOLVE_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_RESOLVE_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_BLIT_TRANSFER_READ_BIT =;
static const SyncStageAccessFlags SYNC_BLIT_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_CLEAR_TRANSFER_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_INDEX_INPUT_INDEX_READ_BIT =;
static const SyncStageAccessFlags SYNC_VERTEX_ATTRIBUTE_INPUT_VERTEX_ATTRIBUTE_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_INPUT_ATTACHMENT_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_SUBPASS_SHADER_HUAWEI_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_INVOCATION_MASK_HUAWEI_INVOCATION_MASK_READ_HUAWEI_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_ACCELERATION_STRUCTURE_READ_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_DESCRIPTOR_BUFFER_READ_BIT_EXT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_SHADER_BINDING_TABLE_READ_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_SHADER_SAMPLED_READ_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_SHADER_STORAGE_READ_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_SHADER_STORAGE_WRITE_BIT =;
static const SyncStageAccessFlags SYNC_CLUSTER_CULLING_SHADER_HUAWEI_UNIFORM_READ_BIT =;
static const SyncStageAccessFlags SYNC_PRESENT_ENGINE_BIT_SYNCVAL_PRESENT_ACQUIRE_READ_BIT_SYNCVAL =;
static const SyncStageAccessFlags SYNC_PRESENT_ENGINE_BIT_SYNCVAL_PRESENT_PRESENTED_BIT_SYNCVAL =;
static const SyncStageAccessFlags SYNC_IMAGE_LAYOUT_TRANSITION_BIT =;
static const SyncStageAccessFlags SYNC_QUEUE_FAMILY_OWNERSHIP_TRANSFER_BIT =;

struct SyncStageAccessInfoType {};

// Array of text names and component masks for each stage/access index
const std::array<SyncStageAccessInfoType, 137>& syncStageAccessInfoByStageAccessIndex();

// Constants defining the mask of all read and write stage_access states
static const SyncStageAccessFlags syncStageAccessReadMask =;

static const SyncStageAccessFlags syncStageAccessWriteMask =;

// Bit order mask of stage_access bit for each stage
const std::map<VkPipelineStageFlags2, SyncStageAccessFlags>& syncStageAccessMaskByStageBit();

// Bit order mask of stage_access bit for each access
const std::map<VkAccessFlags2, SyncStageAccessFlags>& syncStageAccessMaskByAccessBit();

// Direct VkPipelineStageFlags to valid VkAccessFlags lookup table
const std::map<VkPipelineStageFlags2, VkAccessFlags2>& syncDirectStageToAccessMask();

// Pipeline stages corresponding to VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT for each VkQueueFlagBits
const std::map<VkQueueFlagBits, VkPipelineStageFlags2>& syncAllCommandStagesByQueueFlags();

// Masks of logically earlier stage flags for a given stage flag
const std::map<VkPipelineStageFlags2, VkPipelineStageFlags2>& syncLogicallyEarlierStages();

// Masks of logically later stage flags for a given stage flag
const std::map<VkPipelineStageFlags2, VkPipelineStageFlags2>& syncLogicallyLaterStages();
// clang-format on

// NOLINTEND