From c2b4c5838431e12abb6f233c459d3d6a717aad18 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 21 May 2019 14:44:09 -0400 Subject: 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 --- source/slang/ir.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/slang/ir.h') 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& 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(); -- cgit v1.2.3