public override async Task<InitializationResult> Initialize() { return await Task.Run(() => { for (uint i = 1; ; i++) { var delcom = new DelcomHid(); if (delcom.OpenNthDevice(i) != 0) break; var physicalDevice = new PhysicalDevice(delcom); var delcomDevice = new DelcomDevice { PhysicalDevice = physicalDevice }; var physicalDeviceId = physicalDevice.Id; var configuredDevice = delcomConfiguration.OutputDevices.OfType<DelcomDevice>().SingleOrDefault(d => d.PhysicalDeviceId == physicalDeviceId); var delcomDeviceInfo = new DelcomDeviceInfo(delcomDevice, configuredDevice, delcomConfiguration); if (configuredDevice != null) { ConfiguredDevices.Add(delcomDeviceInfo); } else { AvailableDevices.Add(delcomDeviceInfo); } } foreach (var missingDevice in delcomConfiguration.OutputDevices.Where(od => ConfiguredDevices.All(cd => cd.Name != od.Name))) ConfiguredDevices.Add(new DelcomDeviceInfo(null, missingDevice, delcomConfiguration)); return InitializationResult.Succeeded; }); }
/// <summary>To be documented.</summary> public static unsafe Result GetRandROutputDisplay(this ExtAcquireXlibDisplay thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Span <nint> dpy, [Count(Count = 0)] nint rrOutput, [Count(Count = 0), Flow(FlowDirection.Out)] Span <DisplayKHR> pDisplay) { // SpanOverloader return(thisApi.GetRandROutputDisplay(physicalDevice, ref dpy.GetPinnableReference(), rrOutput, out pDisplay.GetPinnableReference())); }
public abstract Result GetPhysicalDeviceDisplayProperties2([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] ref uint pPropertyCount, [Count(Computed = "pPropertyCount"), Flow(FlowDirection.Out)] out DisplayProperties2KHR pProperties);
public abstract Result GetDisplayPlaneCapabilities2([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0), Flow(FlowDirection.In)] ref DisplayPlaneInfo2KHR pDisplayPlaneInfo, [Count(Count = 0), Flow(FlowDirection.Out)] out DisplayPlaneCapabilities2KHR pCapabilities);
public static unsafe Result GetPhysicalDeviceCooperativeMatrixProperties(this NVCooperativeMatrix thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Span <uint> pPropertyCount, [Count(Parameter = "pPropertyCount"), Flow(FlowDirection.Out)] Span <CooperativeMatrixPropertiesNV> pProperties) { // SpanOverloader return(thisApi.GetPhysicalDeviceCooperativeMatrixProperties(physicalDevice, ref pPropertyCount.GetPinnableReference(), out pProperties.GetPinnableReference())); }
public abstract Result GetPhysicalDeviceSurfacePresentModes([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] SurfaceKHR surface, [Count(Count = 0)] ref uint pPresentModeCount, [Count(Computed = "pPresentModeCount"), Flow(FlowDirection.Out)] out PresentModeKHR pPresentModes);
public abstract unsafe Result GetPhysicalDeviceSurfacePresentModes2([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0), Flow(FlowDirection.In)] PhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, [Count(Count = 0)] uint *pPresentModeCount, [Count(Computed = "pPresentModeCount"), Flow(FlowDirection.Out)] PresentModeKHR *pPresentModes);
public static string[] GetDeviceLayers(PhysicalDevice physicalDevice, IEnumerable <InitRequest> initRequest) { return(GetLayers(physicalDevice.EnumerateDeviceLayerProperties(), InitRequestType.Layer, initRequest)); }
public IOExpander Connect(PhysicalDevice.INeedsPixelOutput device) { device.PixelOutputPort = this; return this; }
public SendStatus SendPixelValue(int channel, PhysicalDevice.PixelRGBByte rgb) { throw new NotImplementedException(); }
public SendStatus SendPixelsValue(int channel, PhysicalDevice.PixelRGBByte[] rgb) { byte[] rgbArray = new byte[rgb.Length * 3]; int bytePos = 0; for (int i = 0; i < rgb.Length; i++) { rgbArray[bytePos++] = rgb[i].R; rgbArray[bytePos++] = rgb[i].G; rgbArray[bytePos++] = rgb[i].B; } this.opcClient.Send(this.opcChannel, (byte)0, rgbArray); return SendStatus.NotSet; }
public void Connect(PhysicalDevice.INeedsPixelOutput device, int opcChannel) { device.PixelOutputPort = new OpcPixelUniverse(this, opcChannel); }
public LogicalDevice(PhysicalDevice owner, PartitionTable partition) { this.physicalDevice = owner; this.partition = partition; Refresh(); }
public AcnStream Connect(PhysicalDevice.INeedsPixelOutput device, int startUniverse, int startDmxChannel) { device.PixelOutputPort = GetPixelSendingUniverse(startUniverse, startDmxChannel); return this; }
/// <summary>To be documented.</summary> public static unsafe Result GetPhysicalDeviceExternalImageFormatProperties(this NVExternalMemoryCapabilities thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Format format, [Count(Count = 0)] ImageType type, [Count(Count = 0)] ImageTiling tiling, [Count(Count = 0)] ImageUsageFlags usage, [Count(Count = 0)] ImageCreateFlags flags, [Count(Count = 0)] ExternalMemoryHandleTypeFlagsNV externalHandleType, [Count(Count = 0), Flow(FlowDirection.Out)] Span <ExternalImageFormatPropertiesNV> pExternalImageFormatProperties) { // SpanOverloader return(thisApi.GetPhysicalDeviceExternalImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, externalHandleType, out pExternalImageFormatProperties.GetPinnableReference())); }
public bool CreateSwapChain(DrunkSpock spock, int extentX, int extentY) { PhysicalDevice phys = mLogical.Parent; SurfaceKhr surf = spock.GetSurface(); SurfaceCapabilitiesKhr surfCaps = phys.GetSurfaceCapabilitiesKhr(surf); SurfaceFormatKhr [] surfFormats = phys.GetSurfaceFormatsKhr(surf); PresentModeKhr [] presModes = phys.GetSurfacePresentModesKhr(surf); if (surfFormats.Length <= 0 || presModes.Length <= 0) { Misc.SafeInvoke(eErrorSpam, "Bad formats or pres modes..."); return(false); } mSwapExtent = new Extent2D(extentX, extentY); int imageCount = surfCaps.MinImageCount + 1; if (surfCaps.MaxImageCount > 0 && imageCount > surfCaps.MaxImageCount) { imageCount = surfCaps.MaxImageCount; } SwapchainCreateInfoKhr scci = new SwapchainCreateInfoKhr( surf, Format.B8G8R8A8UNorm, mSwapExtent, imageCount, ColorSpaceKhr.SRgbNonlinear, 1, ImageUsages.ColorAttachment); scci.ImageSharingMode = SharingMode.Exclusive; if (presModes.Contains(PresentModeKhr.Mailbox)) { scci.PresentMode = PresentModeKhr.Mailbox; } mSwapChain = mLogical.CreateSwapchainKhr(scci); if (mSwapChain == null) { Misc.SafeInvoke(eErrorSpam, "Create swap chain failed..."); return(false); } VulkanCore.Image [] chainImages = mSwapChain.GetImages(); mChainImageViews = new ImageView[chainImages.Length]; for (int i = 0; i < chainImages.Length; i++) { ImageSubresourceRange isr = new ImageSubresourceRange( ImageAspects.Color, 0, 1, 0, 1); ImageViewCreateInfo ivci = new ImageViewCreateInfo( mSwapChain.Format, isr); mChainImageViews[i] = chainImages[i].CreateView(ivci); } //descriptor pool stuff DescriptorPoolSize dps = new DescriptorPoolSize( DescriptorType.UniformBuffer, chainImages.Length); DescriptorPoolCreateInfo dpci = new DescriptorPoolCreateInfo(); dpci.PoolSizes = new DescriptorPoolSize[] { dps }; dpci.MaxSets = chainImages.Length; mDPool = mLogical.CreateDescriptorPool(dpci); return(true); }
public SendStatus SendPixelsValue(int startChannel, PhysicalDevice.PixelRGBByte[] rgb) { lock (lockObject) { if (!this.changedPixels.Any()) this.firstChange.Restart(); int readOffset = 0; for (int i = 0; i < rgb.Length; i++) { int dataOffset = 1 + (startChannel + i) * 4; this.pixelData[dataOffset + 0] = rgb[readOffset].R; this.pixelData[dataOffset + 1] = rgb[readOffset].G; this.pixelData[dataOffset + 2] = rgb[readOffset].B; readOffset++; this.changedPixels.Add((byte)(startChannel + i)); } receivedUpdates++; } return SendStatus.NotSet; }
public static void ClearCaches() { QueueFamilyPropertiesCachePhysicalDevice = null; QueueFamilyPropertiesCache = null; }
public SendStatus SendPixelValue(int channel, PhysicalDevice.PixelRGBByte rgb) { int dataOffset = 1 + channel * 4; lock (lockObject) { if (!this.changedPixels.Any()) this.firstChange.Restart(); this.pixelData[dataOffset + 0] = rgb.R; this.pixelData[dataOffset + 1] = rgb.G; this.pixelData[dataOffset + 2] = rgb.B; this.changedPixels.Add((byte)channel); receivedUpdates++; } return SendStatus.NotSet; }
public AcnStream Connect(PhysicalDevice.INeedsDmxOutput device, int universe) { device.DmxOutputPort = GetSendingUniverse(universe); return this; }
/// <summary>To be documented.</summary> public static unsafe void GetPhysicalDeviceExternalSemaphoreProperties(this KhrExternalSemaphoreCapabilities thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0), Flow(FlowDirection.In)] ReadOnlySpan <PhysicalDeviceExternalSemaphoreInfo> pExternalSemaphoreInfo, [Count(Count = 0), Flow(FlowDirection.Out)] Span <ExternalSemaphoreProperties> pExternalSemaphoreProperties) { // SpanOverloader thisApi.GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, in pExternalSemaphoreInfo.GetPinnableReference(), out pExternalSemaphoreProperties.GetPinnableReference()); }
public abstract Result GetPhysicalDeviceSurfaceSupport([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint queueFamilyIndex, [Count(Count = 0)] SurfaceKHR surface, [Count(Count = 0), Flow(FlowDirection.Out)] out Bool32 pSupported);
public partial Result GetPhysicalDeviceSupportedFramebufferMixedSamplesCombination([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] ref uint pCombinationCount, [Count(Computed = "pCombinationCount"), Flow(FlowDirection.Out)] out FramebufferMixedSamplesCombinationNV pCombinations);
public abstract Bool32 GetPhysicalDeviceWin32PresentationSupport([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint queueFamilyIndex);
public partial Result AcquireWinrtDisplay([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] DisplayKHR display);
public abstract unsafe Result GetPhysicalDeviceDisplayProperties2([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint *pPropertyCount, [Count(Computed = "pPropertyCount"), Flow(FlowDirection.Out)] DisplayProperties2KHR *pProperties);
public partial Result GetWinrtDisplay([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint deviceRelativeId, [Count(Count = 0), Flow(FlowDirection.Out)] out DisplayKHR pDisplay);
/// <summary>To be documented.</summary> public static unsafe Result AcquireXlibDisplay(this ExtAcquireXlibDisplay thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Span <nint> dpy, [Count(Count = 0)] DisplayKHR display) { // SpanOverloader return(thisApi.AcquireXlibDisplay(physicalDevice, ref dpy.GetPinnableReference(), display)); }
public abstract Bool32 GetPhysicalDeviceXcbPresentationSupport([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint queueFamilyIndex, [Count(Count = 0)] ref IntPtr connection, [Count(Count = 0)] IntPtr visual_id);
/// <summary> /// Check if a queue family supports presenting /// </summary> /// <param name="index"></param> /// <param name="device"></param> /// <param name="surface"></param> /// <returns></returns> public static bool SupportsPresenting(int index, PhysicalDevice device, SurfaceKhr surface) { return(device.GetSurfaceSupportKhr(index, surface) && GetPresentationSupport(device, index)); }
/// <summary>To be added.</summary> public unsafe Bool32 GetPhysicalDeviceXcbPresentationSupport([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint queueFamilyIndex, [Count(Count = 0)] ref IntPtr connection, [Count(Count = 0)] int visual_id) { // IntPtrOverloader return(GetPhysicalDeviceXcbPresentationSupport(physicalDevice, queueFamilyIndex, ref connection, new IntPtr(visual_id))); }
public static unsafe Result GetPhysicalDeviceToolProperties(this ExtToolingInfo thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Span <uint> pToolCount, [Count(Parameter = "pToolCount"), Flow(FlowDirection.Out)] Span <PhysicalDeviceToolPropertiesEXT> pToolProperties) { // SpanOverloader return(thisApi.GetPhysicalDeviceToolProperties(physicalDevice, ref pToolCount.GetPinnableReference(), out pToolProperties.GetPinnableReference())); }
public abstract unsafe void GetPhysicalDeviceExternalBufferProperties([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0), Flow(FlowDirection.In)] PhysicalDeviceExternalBufferInfo *pExternalBufferInfo, [Count(Count = 0), Flow(FlowDirection.Out)] ExternalBufferProperties *pExternalBufferProperties);
/// <summary>To be documented.</summary> public static unsafe Result GetPhysicalDeviceSupportedFramebufferMixedSamplesCombination(this NVCoverageReductionMode thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] Span <uint> pCombinationCount, [Count(Computed = "pCombinationCount"), Flow(FlowDirection.Out)] Span <FramebufferMixedSamplesCombinationNV> pCombinations) { // SpanOverloader return(thisApi.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombination(physicalDevice, ref pCombinationCount.GetPinnableReference(), out pCombinations.GetPinnableReference())); }
public abstract void GetPhysicalDeviceExternalBufferProperties([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0), Flow(FlowDirection.In)] ref PhysicalDeviceExternalBufferInfo pExternalBufferInfo, [Count(Count = 0), Flow(FlowDirection.Out)] out ExternalBufferProperties pExternalBufferProperties);
public static string[] GetDeviceExtention(PhysicalDevice physicalDevice, IEnumerable <InitRequest> initRequest) { return(GetExtention(physicalDevice.EnumerateDeviceExtensionProperties(), InitRequestType.DeviceExtention, initRequest)); }
public abstract Result GetPhysicalDeviceSurfaceCapabilities([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] SurfaceKHR surface, [Count(Count = 0), Flow(FlowDirection.Out)] out SurfaceCapabilitiesKHR pSurfaceCapabilities);
/// <summary>To be documented.</summary> public static unsafe Bool32 GetPhysicalDeviceXlibPresentationSupport(this KhrXlibSurface thisApi, [Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] uint queueFamilyIndex, [Count(Count = 0)] Span <nint> dpy, [Count(Count = 0)] nint visualID) { // SpanOverloader return(thisApi.GetPhysicalDeviceXlibPresentationSupport(physicalDevice, queueFamilyIndex, ref dpy.GetPinnableReference(), visualID)); }
public abstract unsafe Result GetPhysicalDeviceSurfaceFormats([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] SurfaceKHR surface, [Count(Count = 0)] uint *pSurfaceFormatCount, [Count(Computed = "pSurfaceFormatCount"), Flow(FlowDirection.Out)] SurfaceFormatKHR *pSurfaceFormats);
public Renard Connect(PhysicalDevice.INeedsDmxOutput device) { device.DmxOutputPort = this; return this; }
public abstract Result GetPhysicalDeviceSurfaceFormats([Count(Count = 0)] PhysicalDevice physicalDevice, [Count(Count = 0)] SurfaceKHR surface, [Count(Count = 0)] ref uint pSurfaceFormatCount, [Count(Computed = "pSurfaceFormatCount"), Flow(FlowDirection.Out)] out SurfaceFormatKHR pSurfaceFormats);