             desc.resolveDepthPlane = Int(resolveDepthPlane)!
         }
         if let loadAction = elem.attributes["load-action"] {
-            let mtlEnum = descriptorManager.mtlEnums["mtlLoadAction"]!
-            let enumVal = UInt(mtlEnum.getValue(loadAction))
+            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlLoadAction")!
+            let enumVal = mtlEnum.getValue(loadAction)
             desc.loadAction = MTLLoadAction(rawValue: enumVal)!
         }
         if let storeAction = elem.attributes["store-action"] {
-            let mtlEnum = descriptorManager.mtlEnums["mtlStoreAction"]!
-            let enumVal = UInt(mtlEnum.getValue(storeAction))
+            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlStoreAction")!
+            let enumVal = mtlEnum.getValue(storeAction)
             desc.storeAction = MTLStoreAction(rawValue: enumVal)!
         }
         if let clearStencil = elem.attributes["clear-stencil"] {

        }
        #endif
        if let compareFn = elem.attributes["compare-function"] {
            let mtlEnum = descriptorManager.mtlEnums["mtlCompareFunction"]!
            let enumVal = UInt(mtlEnum.getValue(compareFn))
            samplerDesc.compareFunction = MTLCompareFunction(rawValue: enumVal)!
        }
        

            desc.resolveDepthPlane = Int(resolveDepthPlane)!
        }
        if let loadAction = elem.attributes["load-action"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlLoadAction")!
            let enumVal = mtlEnum.getValue(loadAction)
            desc.loadAction = MTLLoadAction(rawValue: enumVal)!
        }
        if let storeAction = elem.attributes["store-action"] {
            let mtlEnum = container.resolve(S3DMtlEnum.self, argument: "mtlStoreAction")!
            let enumVal = mtlEnum.getValue(storeAction)
            desc.storeAction = MTLStoreAction(rawValue: enumVal)!
        }
        
