             desc.level = Int(level)!
         }
         if let slice = elem.valueForAttribute("slice") as? String {
-            desc.level = Int(slice)!
+            desc.slice = Int(slice)!
         }
         if let depthPlane = elem.valueForAttribute("depth-plane") as? String {
-            desc.level = Int(depthPlane)!
+            desc.depthPlane = Int(depthPlane)!
         }
         
         //TODO: resolveTexture & ref
         
         if let resolveLevel = elem.valueForAttribute("resolve-level") as? String {
-            desc.level = Int(resolveLevel)!
+            desc.resolveLevel = Int(resolveLevel)!
         }
         if let resolveSlice = elem.valueForAttribute("resolve-slice") as? String {
-            desc.level = Int(resolveSlice)!
+            desc.resolveSlice = Int(resolveSlice)!
         }
         if let resolveDepthPlane = elem.valueForAttribute("resolve-depth-plane") as? String {
-            desc.level = Int(resolveDepthPlane)!
+            desc.resolveDepthPlane = Int(resolveDepthPlane)!
         }
         if let loadAction = elem.valueForAttribute("load-action") as? String {
             let mtlEnum = descriptorManager.mtlEnums["mtlLoadAction"]!

        //TODO: resourceOptions is option set type
        // texDesc.resourceOptions?  optional?  set later?
        if let cpuCacheMode = elem.valueForAttribute("cpu-cache-mode") as? String {
            let mtlEnum = descriptorManager.mtlEnums["mtlTextureType"]!
            let enumVal = UInt(mtlEnum.getValue(cpuCacheMode))
            texDesc.cpuCacheMode = MTLCPUCacheMode(rawValue: enumVal)!
        }

        return desc
    }
}

public class S3DXMLMTLRenderPipelineDescriptorNode: S3DXMLNodeParser {
    public typealias NodeType = MTLRenderPipelineDescriptor
