/* Copyright (c) 2024-2026 The Khronos Group Inc.
 * Copyright (c) 2024-2026 Valve Corporation
 * Copyright (c) 2024-2026 LunarG, Inc.
 * Modifications Copyright (C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
 *
 * 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>

struct Location;

namespace vvl {
class Pipeline;

enum class CopyError {
    TexelBlockSize_07975,
    MultiPlaneCompatible_07976,
    TransferGranularity_07747,
    BufferOffset_07737,
    BufferOffset_07978,
    MemoryOverlap_00173,
    ImageExtentWidthZero_06659,
    ImageExtentHeightZero_06660,
    ImageExtentDepthZero_06661,
    ImageExtentRowLength_09101,
    ImageExtentImageHeight_09102,
    AspectMaskSingleBit_09103,
    ExceedBufferBounds_00171,

    ImageOffset_07971,
    ImageOffset_07972,
    Image1D_07979,
    Image1D_07980,
    Image3D_07983,
    TexelBlockExtentWidth_07274,
    TexelBlockExtentHeight_07275,
    TexelBlockExtentDepth_07276,
    TexelBlockExtentWidth_00207,
    TexelBlockExtentHeight_00208,
    TexelBlockExtentDepth_00209,
    MultiPlaneAspectMask_07981,
    ImageOffset_09104,
    AspectMask_09105,
    bufferRowLength_09106,
    bufferImageHeight_09107,
    bufferRowLength_09108,

    SrcImage1D_00146,
    DstImage1D_00152,
    DstImage1D_10908,
    SrcImage1D_01785,
    DstImage1D_01786,
    DstImage1D_10907,
    SrcOffset_01728,
    SrcOffset_01729,
    SrcOffset_01730,
    SrcImageContiguous_07966,
    DstImageContiguous_07966,
    SrcImageSubsampled_07969,
    DstImageSubsampled_07969,
    SrcSubresourceLayerCount_07968,
    DstSubresourceLayerCount_07968,
    SrcOffset_07278,
    SrcOffset_07279,
    SrcOffset_07280,
    DstOffset_07281,
    DstOffset_07282,
    DstOffset_07283,
    SrcSubresource_00142,
    DstSubresource_00143,
    SrcOffset_00144,
    SrcOffset_00145,
    SrcOffset_00147,
    DstOffset_00150,
    DstOffset_00151,
    DstOffset_00153,
    SrcImage3D_04443,
    DstImage3D_04444,
};

// Does not contain Host Image Copy
const std::string &GetCopyBufferImageDeviceVUID(const Location &loc, CopyError error);
// contains Host Image Copy
const std::string &GetCopyBufferImageVUID(const Location &loc, CopyError error);
// When copying between images
const std::string &GetCopyImageVUID(const Location &loc, CopyError error);
const std::string &GetImageMipLevelVUID(const Location &loc);
const std::string &GetImageArrayLayerRangeVUID(const Location &loc);
const std::string &GetImageImageLayoutVUID(const Location &loc);

const char* GetSurfaceSupportVUID(const Location& loc);
const char* GetRenderPassCompatibilityVUID(const Location& loc, const char* vuid);
const char* GetDispatchIndirectProtectVUID(const Location& loc);

enum class BuildASError {
    IsBuilt_03667,
    SameCount_03758,
    SameFlags_03759,
    SameType_03760,
    SameType_03761,
    SameFlags_03762,
    TriangleVertexFormat_03763,
    TriangleMaxVertex_03764,
    TriangleIndexType_03765,
    TriangleTransformData_03766,
    TriangleTransformData_03767,
    DstTop_03699,
    DstBottom_03700,
};
const char* GetBuildASVUID(const Location& loc, BuildASError error);

enum class SubresourceRangeError {
    BaseMip_01486,
    MipCount_01724,
    BaseLayer_01488,
    LayerCount_01725,
    BaseLayer_02724_10798,
    LayerCount_02725_10800,
    LevelCount_10799,
};
const std::string &GetSubresourceRangeVUID(const Location &loc, SubresourceRangeError error);

enum class SpirvInterfaceVariableError {
    ShaderStage_07988,
    Mutable_07990,
    DescriptorCount_07991,
    Inline_10391,
    DescriptorHeapMapping_11312,
    PushConstantStage_07987,
    PushConstantRange_10069,
};
const char *GetSpirvInterfaceVariableVUID(const Location &loc, SpirvInterfaceVariableError error);

enum class DeviceAddressCommandError {
    CompletelyBound_13097,
    Protected_13098,
    Protected_13099,
    Storage_13122,
    Storage_13123,
    Xfb_13124,
    Xfb_13125,
};
const std::string GetDeviceAddressCommandVUID(const Location& loc, DeviceAddressCommandError error);

enum class DrawDispatchIndirectError {
    PROTECTED_CD_02711,
    CONTIGUOUS_MEMORY_02708,
    BUFFER_02709,
    COUNT_CONTIGUOUS_MEMORY_02714,
    COUNT_BUFFER_02715,
    COUNT_OFFSET_04129,
};

const char* GetDrawDispatchIndirectVUID(const Location& loc, DrawDispatchIndirectError error);

}  // namespace vvl