chromium/third_party/vulkan-validation-layers/src/layers/gpu/shaders/gpu_error_codes.h

// Copyright (c) 2021-2024 The Khronos Group Inc.
// Copyright (c) 2021-2024 Valve Corporation
// Copyright (c) 2021-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.
// Values used between the GLSL shaders and the GPU-AV logic

// NOTE: This header is included by the instrumentation shaders and glslang doesn't support #pragma once
#ifndef GPU_ERROR_CODES_H
#define GPU_ERROR_CODES_H

#ifdef __cplusplus
namespace gpuav {
namespace glsl {
#endif

// Error Groups
//
// These will match one-for-one with the file found in gpu_shader folder
const int kErrorGroupInstBindlessDescriptor =;
const int kErrorGroupInstBufferDeviceAddress =;
const int kErrorGroupInstRayQuery =;
const int kErrorGroupGpuPreDraw =;
const int kErrorGroupGpuPreDispatch =;
const int kErrorGroupGpuPreTraceRays =;
const int kErrorGroupGpuCopyBufferToImage =;
const int kErrorGroupInstNonBindlessOOB =;

// Used for MultiEntry and there is no single stage set
const int kHeaderStageIdMultiEntryPoint =;  // same as spv::ExecutionModelMax

// Bindless Descriptor
//
const int kErrorSubCodeBindlessDescriptorBounds =;
const int kErrorSubCodeBindlessDescriptorUninit =;
const int kErrorSubCodeBindlessDescriptorOOB =;
const int kErrorSubCodeBindlessDescriptorDestroyed =;
const int kErrorSubCodeBindlessDescriptorNullPointer =;

// Non-Bindless OOB
//
// Buffers
const int kErrorSubCodeNonBindlessOOBBufferArrays =;
const int kErrorSubCodeNonBindlessOOBBufferBounds =;
// Texel Buffers
const int kErrorSubCodeNonBindlessOOBTexelBufferArrays =;
const int kErrorSubCodeNonBindlessOOBTexelBufferBounds =;

// Buffer Device Address
//
const int kErrorSubCodeBufferDeviceAddressUnallocRef =;

// Ray Query
//
const int kErrorSubCodeRayQueryNegativeMin =;
const int kErrorSubCodeRayQueryNegativeMax =;
const int kErrorSubCodeRayQueryBothSkip =;
const int kErrorSubCodeRayQuerySkipCull =;
const int kErrorSubCodeRayQueryOpaque =;
const int kErrorSubCodeRayQueryMinMax =;
const int kErrorSubCodeRayQueryMinNaN =;
const int kErrorSubCodeRayQueryMaxNaN =;
const int kErrorSubCodeRayQueryOriginNaN =;
const int kErrorSubCodeRayQueryDirectionNaN =;
const int kErrorSubCodeRayQueryOriginFinite =;
const int kErrorSubCodeRayQueryDirectionFinite =;

// Pre Draw
//
const int kErrorSubCodePreDrawBufferSize =;
const int kErrorSubCodePreDrawCountLimit =;
const int kErrorSubCodePreDrawFirstInstance =;
const int kErrorSubCodePreDrawGroupCountX =;
const int kErrorSubCodePreDrawGroupCountY =;
const int kErrorSubCodePreDrawGroupCountZ =;
const int kErrorSubCodePreDrawGroupCountTotal =;

const int kPreDrawSelectCountBuffer =;
const int kPreDrawSelectDrawBuffer =;
const int kPreDrawSelectMeshCountBuffer =;
const int kPreDrawSelectMeshNoCount =;

// Pre Dispatch
//
const int kErrorSubCodePreDispatchCountLimitX =;
const int kErrorSubCodePreDispatchCountLimitY =;
const int kErrorSubCodePreDispatchCountLimitZ =;

// Pre Tracy Rays
//
const int kErrorSubCodePreTraceRaysLimitWidth =;
const int kErrorSubCodePreTraceRaysLimitHeight =;
const int kErrorSubCodePreTraceRaysLimitDepth =;

// Pre Copy Buffer To Image
//
const int kErrorSubCodePreCopyBufferToImageBufferTexel =;

#ifdef __cplusplus
}  // namespace glsl
}  // namespace gpuav
#endif
#endif