Implement the extension GL_ARB_gpu_shader_int64

- Add new keyword int64_t/uint64_t/i64vec/u64vec.
- Support 64-bit integer literals (dec/hex/oct).
- Support built-in operators for 64-bit integer type.
- Add implicit and explicit type conversion for 64-bit integer type.
- Add new built-in functions defined in this extension.
This commit is contained in:
Rex Xu 2016-04-22 16:51:45 +08:00
parent 010e93fe62
commit 8ff43de891
33 changed files with 5047 additions and 3009 deletions

View file

@ -81,22 +81,44 @@ enum TOperator {
EOpConvUintToBool,
EOpConvFloatToBool,
EOpConvDoubleToBool,
EOpConvInt64ToBool,
EOpConvUint64ToBool,
EOpConvBoolToFloat,
EOpConvIntToFloat,
EOpConvUintToFloat,
EOpConvDoubleToFloat,
EOpConvInt64ToFloat,
EOpConvUint64ToFloat,
EOpConvUintToInt,
EOpConvFloatToInt,
EOpConvBoolToInt,
EOpConvDoubleToInt,
EOpConvInt64ToInt,
EOpConvUint64ToInt,
EOpConvIntToUint,
EOpConvFloatToUint,
EOpConvBoolToUint,
EOpConvDoubleToUint,
EOpConvInt64ToUint,
EOpConvUint64ToUint,
EOpConvIntToDouble,
EOpConvUintToDouble,
EOpConvFloatToDouble,
EOpConvBoolToDouble,
EOpConvInt64ToDouble,
EOpConvUint64ToDouble,
EOpConvBoolToInt64,
EOpConvIntToInt64,
EOpConvUintToInt64,
EOpConvFloatToInt64,
EOpConvDoubleToInt64,
EOpConvUint64ToInt64,
EOpConvBoolToUint64,
EOpConvIntToUint64,
EOpConvUintToUint64,
EOpConvFloatToUint64,
EOpConvDoubleToUint64,
EOpConvInt64ToUint64,
//
// binary operations
@ -194,6 +216,10 @@ enum TOperator {
EOpFloatBitsToUint,
EOpIntBitsToFloat,
EOpUintBitsToFloat,
EOpDoubleBitsToInt64,
EOpDoubleBitsToUint64,
EOpInt64BitsToDouble,
EOpUint64BitsToDouble,
EOpPackSnorm2x16,
EOpUnpackSnorm2x16,
EOpPackUnorm2x16,
@ -206,6 +232,10 @@ enum TOperator {
EOpUnpackHalf2x16,
EOpPackDouble2x32,
EOpUnpackDouble2x32,
EOpPackInt2x32,
EOpUnpackInt2x32,
EOpPackUint2x32,
EOpUnpackUint2x32,
EOpLength,
EOpDistance,
@ -287,6 +317,8 @@ enum TOperator {
EOpConstructGuardStart,
EOpConstructInt, // these first scalar forms also identify what implicit conversion is needed
EOpConstructUint,
EOpConstructInt64,
EOpConstructUint64,
EOpConstructBool,
EOpConstructFloat,
EOpConstructDouble,
@ -305,6 +337,12 @@ enum TOperator {
EOpConstructUVec2,
EOpConstructUVec3,
EOpConstructUVec4,
EOpConstructI64Vec2,
EOpConstructI64Vec3,
EOpConstructI64Vec4,
EOpConstructU64Vec2,
EOpConstructU64Vec3,
EOpConstructU64Vec4,
EOpConstructMat2x2,
EOpConstructMat2x3,
EOpConstructMat2x4,