"version" : "1.3"
},
{
- "enumerant" : "SubgroupGeMask",
- "value" : 4417,
+ "enumerant" : "SubgroupEqMaskKHR",
+ "value" : 4416,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
+ "extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupGtMask",
- "value" : 4418,
+ "enumerant" : "SubgroupGeMask",
+ "value" : 4417,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupLeMask",
- "value" : 4419,
+ "enumerant" : "SubgroupGeMaskKHR",
+ "value" : 4417,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
+ "extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupLtMask",
- "value" : 4420,
+ "enumerant" : "SubgroupGtMask",
+ "value" : 4418,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupEqMaskKHR",
- "value" : 4416,
+ "enumerant" : "SubgroupGtMaskKHR",
+ "value" : 4418,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
"extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupGeMaskKHR",
- "value" : 4417,
+ "enumerant" : "SubgroupLeMask",
+ "value" : 4419,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
- "extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupGtMaskKHR",
- "value" : 4418,
+ "enumerant" : "SubgroupLeMaskKHR",
+ "value" : 4419,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
"extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
- "enumerant" : "SubgroupLeMaskKHR",
- "value" : 4419,
+ "enumerant" : "SubgroupLtMask",
+ "value" : 4420,
"capabilities" : [ "SubgroupBallotKHR", "GroupNonUniformBallot" ],
- "extensions" : [ "SPV_KHR_shader_ballot" ],
"version" : "1.3"
},
{
Horizontal4Pixels = 0x00000008,
}
- public enum FPDenormMode {
- Preserve = 0,
- FlushToZero = 1,
+ public enum FPDenormMode
+ {
+ Preserve = 0,
+ FlushToZero = 1,
}
- public enum FPOperationMode {
- IEEE = 0,
- ALT = 1,
+ public enum FPOperationMode
+ {
+ IEEE = 0,
+ ALT = 1,
}
public enum Op
} SpvFragmentShadingRateMask;
typedef enum SpvFPDenormMode_ {
- SpvFPDenormModePreserve = 0,
- SpvFPDenormModeFlushToZero = 1,
- SpvFPDenormModeMax = 0x7fffffff,
+ SpvFPDenormModePreserve = 0,
+ SpvFPDenormModeFlushToZero = 1,
+ SpvFPDenormModeMax = 0x7fffffff,
} SpvFPDenormMode;
typedef enum SpvFPOperationMode_ {
- SpvFPOperationModeIEEE = 0,
- SpvFPOperationModeALT = 1,
- SpvFPOperationModeMax = 0x7fffffff,
+ SpvFPOperationModeIEEE = 0,
+ SpvFPOperationModeALT = 1,
+ SpvFPOperationModeMax = 0x7fffffff,
} SpvFPOperationMode;
typedef enum SpvOp_ {
};
enum FPDenormMode {
- FPDenormModePreserve = 0,
- FPDenormModeFlushToZero = 1,
- FPDenormModeMax = 0x7fffffff,
+ FPDenormModePreserve = 0,
+ FPDenormModeFlushToZero = 1,
+ FPDenormModeMax = 0x7fffffff,
};
enum FPOperationMode {
- FPOperationModeIEEE = 0,
- FPOperationModeALT = 1,
- FPOperationModeMax = 0x7fffffff,
+ FPOperationModeIEEE = 0,
+ FPOperationModeALT = 1,
+ FPOperationModeMax = 0x7fffffff,
};
enum Op {
#include <assert.h>
#include <string.h>
#include <algorithm>
+#include <cstdlib>
#include <iostream>
#include <unordered_map>
#include <unordered_set>
// process the instructions
const Json::Value insts = root["instructions"];
+ unsigned maxOpcode = 0;
+ bool firstOpcode = true;
for (const auto& inst : insts) {
const auto printingClass = inst["class"].asString();
if (printingClass.size() == 0) {
}
const auto opcode = inst["opcode"].asUInt();
const std::string name = inst["opname"].asString();
+ if (firstOpcode) {
+ maxOpcode = opcode;
+ firstOpcode = false;
+ } else {
+ if (maxOpcode > opcode) {
+ std::cerr << "Error: " << name
+ << " is out of order. It follows the instruction with opcode " << maxOpcode
+ << std::endl;
+ std::exit(1);
+ } else {
+ maxOpcode = opcode;
+ }
+ }
EnumCaps caps = getCaps(inst);
std::string version = inst["version"].asString();
std::string lastVersion = inst["lastVersion"].asString();
return result;
};
+ unsigned maxValue = 0;
+ bool firstValue = true;
for (const auto& enumerant : source["enumerants"]) {
unsigned value;
bool skip_zero_in_bitfield;
std::tie(value, skip_zero_in_bitfield) = getValue(enumerant);
if (skip_zero_in_bitfield)
continue;
+ if (firstValue) {
+ maxValue = value;
+ firstValue = false;
+ } else {
+ if (maxValue > value) {
+ std::cerr << "Error: " << source["kind"] << " enumerant " << enumerant["enumerant"]
+ << " is out of order. It has value " << value
+ << " but follows the enumerant with value " << maxValue << std::endl;
+ std::exit(1);
+ } else {
+ maxValue = value;
+ }
+ }
EnumCaps caps(getCaps(enumerant));
std::string version = enumerant["version"].asString();
std::string lastVersion = enumerant["lastVersion"].asString();