diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-05-21 14:44:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-21 14:44:09 -0400 |
| commit | c2b4c5838431e12abb6f233c459d3d6a717aad18 (patch) | |
| tree | ed11811faa1c47b71a2acb482e01990baab8f43e /source/slang/ir.h | |
| parent | 7ffe6f03976c98ba0233483d0182fc0ad600fd7a (diff) | |
Hotfix/improve glsl semantic conversion (#965)
* Specify glsl semantic format - such that conversions are possible from hlsl sematics.
* Comment improvements. Give appropriate type in glsl for sv_tessfactor. Note that sv_tessfactor is not functional though.
* Work in progress for comparison of types.
* * Fix type comparison issues around the hash.
* Fix tests whos output changed with use of isTypeEqual
Diffstat (limited to 'source/slang/ir.h')
| -rw-r--r-- | source/slang/ir.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/slang/ir.h b/source/slang/ir.h index 61cae5847..47c672a99 100644 --- a/source/slang/ir.h +++ b/source/slang/ir.h @@ -504,6 +504,13 @@ struct IRBoolType : IRBasicType SIMPLE_IR_TYPE(StringType, Type) + +// True if types are equal +// Note compares nominal types by name alone +bool isTypeEqual(IRType* a, IRType* b); + +void findAllInstsBreadthFirst(IRInst* inst, List<IRInst*>& outInsts); + // Constant Instructions typedef int64_t IRIntegerValue; @@ -540,6 +547,10 @@ struct IRConstant : IRInst /// True if constants are equal bool equal(IRConstant& rhs); + /// True if the value is equal. + /// Does *NOT* compare if the type is equal. + bool isValueEqual(IRConstant& rhs); + /// Get the hash int getHashCode(); |
