Skip to content

Commit

Permalink
Push FPDenormMode, FPOperationMode to the end
Browse files Browse the repository at this point in the history
This is a cosmetic change for the benefit of generating the SPIR-V spec.
It reorders the "FP Denorm Mode" and "FP Operation Mode" so they are
the last sections in chapter 3 before the instruction listing.
They become 3.37 and 3.38. The idea is to preserve the section numbering
for earlier sections. For example, keep 3.31 as the Capability section.
  • Loading branch information
dneto0 committed Jan 20, 2021
1 parent 8bb2420 commit 80438cd
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 100 deletions.
22 changes: 10 additions & 12 deletions include/spirv/unified1/spirv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,18 +403,6 @@ public enum FPRoundingMode
RTN = 3,
}

public enum FPDenormMode
{
Preserve = 0,
FlushToZero = 1,
}

public enum FPOperationMode
{
IEEE = 0,
ALT = 1,
}

public enum LinkageType
{
Export = 0,
Expand Down Expand Up @@ -1115,6 +1103,16 @@ public enum FragmentShadingRateMask
Horizontal4Pixels = 0x00000008,
}

public enum FPDenormMode {
Preserve = 0,
FlushToZero = 1,
}

public enum FPOperationMode {
IEEE = 0,
ALT = 1,
}

public enum Op
{
OpNop = 0,
Expand Down
24 changes: 12 additions & 12 deletions include/spirv/unified1/spirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,18 +410,6 @@ typedef enum SpvFPRoundingMode_ {
SpvFPRoundingModeMax = 0x7fffffff,
} SpvFPRoundingMode;

typedef enum SpvFPDenormMode_ {
SpvFPDenormModePreserve = 0,
SpvFPDenormModeFlushToZero = 1,
SpvFPDenormModeMax = 0x7fffffff,
} SpvFPDenormMode;

typedef enum SpvFPOperationMode_ {
SpvFPOperationModeIEEE = 0,
SpvFPOperationModeALT = 1,
SpvFPOperationModeMax = 0x7fffffff,
} SpvFPOperationMode;

typedef enum SpvLinkageType_ {
SpvLinkageTypeExport = 0,
SpvLinkageTypeImport = 1,
Expand Down Expand Up @@ -1114,6 +1102,18 @@ typedef enum SpvFragmentShadingRateMask_ {
SpvFragmentShadingRateHorizontal4PixelsMask = 0x00000008,
} SpvFragmentShadingRateMask;

typedef enum SpvFPDenormMode_ {
SpvFPDenormModePreserve = 0,
SpvFPDenormModeFlushToZero = 1,
SpvFPDenormModeMax = 0x7fffffff,
} SpvFPDenormMode;

typedef enum SpvFPOperationMode_ {
SpvFPOperationModeIEEE = 0,
SpvFPOperationModeALT = 1,
SpvFPOperationModeMax = 0x7fffffff,
} SpvFPOperationMode;

typedef enum SpvOp_ {
SpvOpNop = 0,
SpvOpUndef = 1,
Expand Down
24 changes: 12 additions & 12 deletions include/spirv/unified1/spirv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,6 @@ enum FPRoundingMode {
FPRoundingModeMax = 0x7fffffff,
};

enum FPDenormMode {
FPDenormModePreserve = 0,
FPDenormModeFlushToZero = 1,
FPDenormModeMax = 0x7fffffff,
};

enum FPOperationMode {
FPOperationModeIEEE = 0,
FPOperationModeALT = 1,
FPOperationModeMax = 0x7fffffff,
};

enum LinkageType {
LinkageTypeExport = 0,
LinkageTypeImport = 1,
Expand Down Expand Up @@ -1110,6 +1098,18 @@ enum FragmentShadingRateMask {
FragmentShadingRateHorizontal4PixelsMask = 0x00000008,
};

enum FPDenormMode {
FPDenormModePreserve = 0,
FPDenormModeFlushToZero = 1,
FPDenormModeMax = 0x7fffffff,
};

enum FPOperationMode {
FPOperationModeIEEE = 0,
FPOperationModeALT = 1,
FPOperationModeMax = 0x7fffffff,
};

enum Op {
OpNop = 0,
OpUndef = 1,
Expand Down
24 changes: 12 additions & 12 deletions include/spirv/unified1/spirv.hpp11
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,6 @@ enum class FPRoundingMode : unsigned {
Max = 0x7fffffff,
};

enum class FPDenormMode : unsigned {
Preserve = 0,
FlushToZero = 1,
Max = 0x7fffffff,
};

enum class FPOperationMode : unsigned {
IEEE = 0,
ALT = 1,
Max = 0x7fffffff,
};

enum class LinkageType : unsigned {
Export = 0,
Import = 1,
Expand Down Expand Up @@ -1110,6 +1098,18 @@ enum class FragmentShadingRateMask : unsigned {
Horizontal4Pixels = 0x00000008,
};

enum class FPDenormMode : unsigned {
Preserve = 0,
FlushToZero = 1,
Max = 0x7fffffff,
};

enum class FPOperationMode : unsigned {
IEEE = 0,
ALT = 1,
Max = 0x7fffffff,
};

enum class Op : unsigned {
OpNop = 0,
OpUndef = 1,
Expand Down
36 changes: 18 additions & 18 deletions include/spirv/unified1/spirv.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,24 +421,6 @@
"RTN": 3
}
},
{
"Name": "FPDenormMode",
"Type": "Value",
"Values":
{
"Preserve": 0,
"FlushToZero": 1
}
},
{
"Name": "FPOperationMode",
"Type": "Value",
"Values":
{
"IEEE": 0,
"ALT": 1
}
},
{
"Name": "LinkageType",
"Type": "Value",
Expand Down Expand Up @@ -1095,6 +1077,24 @@
"Horizontal4Pixels": 3
}
},
{
"Name": "FPDenormMode",
"Type": "Value",
"Values":
{
"Preserve": 0,
"FlushToZero": 1
}
},
{
"Name": "FPOperationMode",
"Type": "Value",
"Values":
{
"IEEE": 0,
"ALT": 1
}
},
{
"Name": "Op",
"Type": "Value",
Expand Down
20 changes: 10 additions & 10 deletions include/spirv/unified1/spirv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,6 @@ spv = {
RTN = 3,
},

FPDenormMode = {
Preserve = 0,
FlushToZero = 1,
},

FPOperationMode = {
IEEE = 0,
ALT = 1,
},

LinkageType = {
Export = 0,
Import = 1,
Expand Down Expand Up @@ -1064,6 +1054,16 @@ spv = {
Horizontal4Pixels = 0x00000008,
},

FPDenormMode = {
Preserve = 0,
FlushToZero = 1,
},

FPOperationMode = {
IEEE = 0,
ALT = 1,
},

Op = {
OpNop = 0,
OpUndef = 1,
Expand Down
20 changes: 10 additions & 10 deletions include/spirv/unified1/spirv.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,6 @@
'RTN' : 3,
},

'FPDenormMode' : {
'Preserve' : 0,
'FlushToZero' : 1,
},

'FPOperationMode' : {
'IEEE' : 0,
'ALT' : 1,
},

'LinkageType' : {
'Export' : 0,
'Import' : 1,
Expand Down Expand Up @@ -1064,6 +1054,16 @@
'Horizontal4Pixels' : 0x00000008,
},

'FPDenormMode' : {
'Preserve' : 0,
'FlushToZero' : 1,
},

'FPOperationMode' : {
'IEEE' : 0,
'ALT' : 1,
},

'Op' : {
'OpNop' : 0,
'OpUndef' : 1,
Expand Down
24 changes: 12 additions & 12 deletions include/spirv/unified1/spv.d
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,6 @@ enum FPRoundingMode : uint
RTN = 3,
}

enum FPDenormMode : uint
{
Preserve = 0,
FlushToZero = 1,
}

enum FPOperationMode : uint
{
IEEE = 0,
ALT = 1,
}

enum LinkageType : uint
{
Export = 0,
Expand Down Expand Up @@ -1118,6 +1106,18 @@ enum FragmentShadingRateMask : uint
Horizontal4Pixels = 0x00000008,
}

enum FPDenormMode : uint
{
Preserve = 0,
FlushToZero = 1,
}

enum FPOperationMode : uint
{
IEEE = 0,
ALT = 1,
}

enum Op : uint
{
OpNop = 0,
Expand Down
6 changes: 4 additions & 2 deletions tools/buildHeaders/jsonToSpirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ std::pair<bool, std::string> ReadFile(const std::string& path);
void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders);

// For parameterizing operands.
// The ordering here affects the printing order in the SPIR-V specification.
// Please add new operand classes at the end.
enum OperandClass {
OperandNone,
OperandId,
Expand Down Expand Up @@ -69,8 +71,6 @@ enum OperandClass {
OperandImageOperands,
OperandFPFastMath,
OperandFPRoundingMode,
OperandFPDenormMode,
OperandFPOperationMode,
OperandLinkageType,
OperandAccessQualifier,
OperandFuncParamAttr,
Expand All @@ -91,6 +91,8 @@ enum OperandClass {
OperandRayQueryCommittedIntersectionType,
OperandRayQueryCandidateIntersectionType,
OperandFragmentShadingRate,
OperandFPDenormMode,
OperandFPOperationMode,

OperandOpcode,

Expand Down

0 comments on commit 80438cd

Please sign in to comment.