From 093bdf61c3aab5e40840b5ef547c6fff6bedeb07 Mon Sep 17 00:00:00 2001 From: yukiny0811 Date: Wed, 10 Jan 2024 03:36:22 +0900 Subject: [PATCH] fix int32 --- Sources/EasyMetalShader/Models/EMArgumentCompatible.swift | 2 +- Sources/EasyMetalShader/Models/EMMetalArgument.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/EasyMetalShader/Models/EMArgumentCompatible.swift b/Sources/EasyMetalShader/Models/EMArgumentCompatible.swift index 6585b0a..5daed0a 100644 --- a/Sources/EasyMetalShader/Models/EMArgumentCompatible.swift +++ b/Sources/EasyMetalShader/Models/EMArgumentCompatible.swift @@ -10,7 +10,7 @@ import MetalKit public protocol EMArgumentCompatible {} extension Bool: EMArgumentCompatible {} -extension Int: EMArgumentCompatible {} +extension Int32: EMArgumentCompatible {} extension Float: EMArgumentCompatible {} extension em_int2: EMArgumentCompatible {} extension em_int3: EMArgumentCompatible {} diff --git a/Sources/EasyMetalShader/Models/EMMetalArgument.swift b/Sources/EasyMetalShader/Models/EMMetalArgument.swift index 9a9f471..65ae32c 100644 --- a/Sources/EasyMetalShader/Models/EMMetalArgument.swift +++ b/Sources/EasyMetalShader/Models/EMMetalArgument.swift @@ -25,8 +25,8 @@ public enum EMMetalArgument { switch objTypeString { case "Swift.Bool": return (obj as? EMArgument)?.initialValue - case "Swift.Int": - return (obj as? EMArgument)?.initialValue + case "Swift.Int32": + return (obj as? EMArgument)?.initialValue case "EasyMetalShader.em_int2": return (obj as? EMArgument)?.initialValue case "EasyMetalShader.em_int3":