godot/thirdparty/glslang/SPIRV/doc.cpp

//
// Copyright (C) 2014-2015 LunarG, Inc.
// Copyright (C) 2022-2024 Arm Limited.
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
//    Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//
//    Redistributions in binary form must reproduce the above
//    copyright notice, this list of conditions and the following
//    disclaimer in the documentation and/or other materials provided
//    with the distribution.
//
//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

//
// 1) Programmatically fill in instruction/operand information.
//    This can be used for disassembly, printing documentation, etc.
//
// 2) Print documentation from this parameterization.
//

#include "doc.h"

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <mutex>

namespace spv {
    extern "C" {
        // Include C-based headers that don't have a namespace
        #include "GLSL.ext.KHR.h"
        #include "GLSL.ext.EXT.h"
        #include "GLSL.ext.AMD.h"
        #include "GLSL.ext.NV.h"
        #include "GLSL.ext.ARM.h"
        #include "GLSL.ext.QCOM.h"
    }
}

namespace spv {

//
// Whole set of functions that translate enumerants to their text strings for
// the specification (or their sanitized versions for auto-generating the
// spirv headers.
//
// Also, for masks the ceilings are declared next to these, to help keep them in sync.
// Ceilings should be
//  - one more than the maximum value an enumerant takes on, for non-mask enumerants
//    (for non-sparse enums, this is the number of enumerants)
//  - the number of bits consumed by the set of masks
//    (for non-sparse mask enums, this is the number of enumerants)
//

const char* SourceString(int source)
{}

const char* ExecutionModelString(int model)
{}

const char* AddressingString(int addr)
{}

const char* MemoryString(int mem)
{}

const int ExecutionModeCeiling =;

const char* ExecutionModeString(int mode)
{}

const char* StorageClassString(int StorageClass)
{}

const int DecorationCeiling =;

const char* DecorationString(int decoration)
{}

const char* BuiltInString(int builtIn)
{}

const char* DimensionString(int dim)
{}

const char* SamplerAddressingModeString(int mode)
{}

const char* SamplerFilterModeString(int mode)
{}

const char* ImageFormatString(int format)
{}

const char* ImageChannelOrderString(int format)
{}

const char* ImageChannelDataTypeString(int type)
{}

const int ImageOperandsCeiling =;

const char* ImageOperandsString(int format)
{}

const char* FPFastMathString(int mode)
{}

const char* FPRoundingModeString(int mode)
{}

const char* LinkageTypeString(int type)
{}

const char* FuncParamAttrString(int attr)
{}

const char* AccessQualifierString(int attr)
{}

const int SelectControlCeiling =;

const char* SelectControlString(int cont)
{}

const int LoopControlCeiling =;

const char* LoopControlString(int cont)
{}

const int FunctionControlCeiling =;

const char* FunctionControlString(int cont)
{}

const char* MemorySemanticsString(int mem)
{}

const int MemoryAccessCeiling =;

const char* MemoryAccessString(int mem)
{}

const int CooperativeMatrixOperandsCeiling =;

const char* CooperativeMatrixOperandsString(int op)
{}

const char* ScopeString(int mem)
{}

const char* GroupOperationString(int gop)
{}

const char* KernelEnqueueFlagsString(int flag)
{}

const char* KernelProfilingInfoString(int info)
{}

const char* CapabilityString(int info)
{}

const char* OpcodeString(int op)
{}

// The set of objects that hold all the instruction/operand
// parameterization information.
InstructionParameters InstructionDesc[OpCodeMask + 1];
OperandParameters ExecutionModeOperands[ExecutionModeCeiling];
OperandParameters DecorationOperands[DecorationCeiling];

EnumDefinition OperandClassParams[OperandCount];
EnumParameters ExecutionModeParams[ExecutionModeCeiling];
EnumParameters ImageOperandsParams[ImageOperandsCeiling];
EnumParameters DecorationParams[DecorationCeiling];
EnumParameters LoopControlParams[FunctionControlCeiling];
EnumParameters SelectionControlParams[SelectControlCeiling];
EnumParameters FunctionControlParams[FunctionControlCeiling];
EnumParameters MemoryAccessParams[MemoryAccessCeiling];
EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling];

// Set up all the parameterizing descriptions of the opcodes, operands, etc.
void Parameterize()
{}

}; // end spv namespace