diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 794a1f3..5d6921d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -13,6 +13,18 @@ ### 5.3.0-prerelease0001 * Initial prerelease version for 5.3 +### 5.2.13 +* Fixed issue with constant swizzles + +### 5.2.12 +* disabled warnings again + +### 5.2.11 +* printing warnings when Expr.TryGetReflectedDefinition fails + +### 5.2.10 +* try/with for Expr.TryGetReflectedDefinition (seems to raise exceptions in some cases) + ### 5.2.9 * Fixed issue with topological sort and raytracing data * Removed warnings in raytracing shaders diff --git a/src/Libs/FShade.Core/Serializer.fs b/src/Libs/FShade.Core/Serializer.fs index 9afa985..8f82cb2 100644 --- a/src/Libs/FShade.Core/Serializer.fs +++ b/src/Libs/FShade.Core/Serializer.fs @@ -823,7 +823,9 @@ module Serializer = let (|ReflectedCall|_|) (e : Expr) = match e with | Call(t,mi,args) -> - let isInline = mi.GetCustomAttributes() |> Seq.isEmpty |> not + let isInline = + try mi.GetCustomAttributes() |> Seq.isEmpty |> not + with _ -> false match ExprWorkardound.TryGetReflectedDefinition mi with | Some def -> let args = diff --git a/src/Libs/FShade.Imperative/Utilities.fs b/src/Libs/FShade.Imperative/Utilities.fs index e3f0ae9..c869502 100644 --- a/src/Libs/FShade.Imperative/Utilities.fs +++ b/src/Libs/FShade.Imperative/Utilities.fs @@ -18,7 +18,8 @@ module ExprWorkardound = let TryGetReflectedDefinition (mb : MethodBase) = lock lockObj (fun _ -> - Expr.TryGetReflectedDefinition mb + try Expr.TryGetReflectedDefinition mb + with e -> None ) module Peano =