Parser: Implement extension GL_AMD_gpu_shader_half_float.
- Add built-in types: float16_t, f16vec, f16mat. - Add support of half float constant: hf, HF. - Extend built-in floating-point operators: +, -, *, /, ++, --, +=, -=, *=, /=, ==, !=, >=, <=, >, <. - Add support of type conversions: float16_t -> XXX, XXX -> float16_t. - Add new built-in functions.
This commit is contained in:
parent
b1672fa0de
commit
c9e3c3c941
35 changed files with 9765 additions and 4370 deletions
|
|
@ -185,8 +185,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
|
|||
case EbtFloat: break;
|
||||
case EbtInt: s.append("i"); break;
|
||||
case EbtUint: s.append("u"); break;
|
||||
case EbtInt64: s.append("i64"); break;
|
||||
case EbtUint64: s.append("u64"); break;
|
||||
default: break; // some compilers want this
|
||||
}
|
||||
if (image) {
|
||||
|
|
@ -1277,7 +1275,11 @@ public:
|
|||
virtual bool isImplicitlySizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage != EvqBuffer; }
|
||||
virtual bool isRuntimeSizedArray() const { return isArray() && getOuterArraySize() == UnsizedArraySize && qualifier.storage == EvqBuffer; }
|
||||
virtual bool isStruct() const { return structure != nullptr; }
|
||||
#ifdef AMD_EXTENSIONS
|
||||
virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; }
|
||||
#else
|
||||
virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble; }
|
||||
#endif
|
||||
|
||||
virtual bool isOpaque() const { return basicType == EbtSampler || basicType == EbtAtomicUint; }
|
||||
|
||||
|
|
@ -1359,6 +1361,9 @@ public:
|
|||
case EbtVoid:
|
||||
case EbtFloat:
|
||||
case EbtDouble:
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
#endif
|
||||
case EbtInt:
|
||||
case EbtUint:
|
||||
case EbtInt64:
|
||||
|
|
@ -1451,6 +1456,9 @@ public:
|
|||
case EbtVoid: return "void";
|
||||
case EbtFloat: return "float";
|
||||
case EbtDouble: return "double";
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16: return "float16_t";
|
||||
#endif
|
||||
case EbtInt: return "int";
|
||||
case EbtUint: return "uint";
|
||||
case EbtInt64: return "int64_t";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue