private unsafe MTLFunctionConstantValues CreateConstantValues(SpecializationConstant[] specializations) { MTLFunctionConstantValues ret = MTLFunctionConstantValues.New(); if (specializations != null) { foreach (SpecializationConstant sc in specializations) { MTLDataType mtlType = MTLFormats.VdVoMTLShaderConstantType(sc.Type); ret.setConstantValuetypeatIndex(&sc.Data, mtlType, (UIntPtr)sc.ID); } } return(ret); }
public unsafe void setConstantValuetypeatIndex(void *value, MTLDataType type, UIntPtr index) { ObjectiveCRuntime.objc_msgSend(NativePtr, sel_setConstantValuetypeatIndex, value, (uint)type, index); }