コード例 #1
0
 public VkLayerProperties(Raw *raw)
 {
     LayerName             = VkHelpers.ToString(raw->layerName);
     SpecVersion           = raw->specVersion;
     ImplementationVersion = raw->implementationVersion;
     Description           = VkHelpers.ToString(raw->description);
 }
コード例 #2
0
ファイル: VkPhysicalDevice.cs プロジェクト: Zulkir/VulkaNet
 public DirectFunctions(IVkInstance instance)
 {
     GetPhysicalDeviceProperties            = VkHelpers.GetInstanceDelegate <GetPhysicalDevicePropertiesDelegate>(instance, "vkGetPhysicalDeviceProperties");
     GetPhysicalDeviceQueueFamilyProperties = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceQueueFamilyPropertiesDelegate>(instance, "vkGetPhysicalDeviceQueueFamilyProperties");
     CreateDevice = VkHelpers.GetInstanceDelegate <CreateDeviceDelegate>(instance, "vkCreateDevice");
     GetPhysicalDeviceFeatures                    = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceFeaturesDelegate>(instance, "vkGetPhysicalDeviceFeatures");
     GetPhysicalDeviceMemoryProperties            = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceMemoryPropertiesDelegate>(instance, "vkGetPhysicalDeviceMemoryProperties");
     GetPhysicalDeviceSparseImageFormatProperties = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceSparseImageFormatPropertiesDelegate>(instance, "vkGetPhysicalDeviceSparseImageFormatProperties");
     GetPhysicalDeviceDisplayPropertiesKHR        = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceDisplayPropertiesKHRDelegate>(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR");
     GetPhysicalDeviceDisplayPlanePropertiesKHR   = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceDisplayPlanePropertiesKHRDelegate>(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
     GetDisplayPlaneSupportedDisplaysKHR          = VkHelpers.GetInstanceDelegate <GetDisplayPlaneSupportedDisplaysKHRDelegate>(instance, "vkGetDisplayPlaneSupportedDisplaysKHR");
     GetDisplayModePropertiesKHR                  = VkHelpers.GetInstanceDelegate <GetDisplayModePropertiesKHRDelegate>(instance, "vkGetDisplayModePropertiesKHR");
     CreateDisplayModeKHR                           = VkHelpers.GetInstanceDelegate <CreateDisplayModeKHRDelegate>(instance, "vkCreateDisplayModeKHR");
     GetDisplayPlaneCapabilitiesKHR                 = VkHelpers.GetInstanceDelegate <GetDisplayPlaneCapabilitiesKHRDelegate>(instance, "vkGetDisplayPlaneCapabilitiesKHR");
     GetPhysicalDeviceSurfaceSupportKHR             = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceSurfaceSupportKHRDelegate>(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
     GetPhysicalDeviceMirPresentationSupportKHR     = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceMirPresentationSupportKHRDelegate>(instance, "vkGetPhysicalDeviceMirPresentationSupportKHR");
     GetPhysicalDeviceWaylandPresentationSupportKHR = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceWaylandPresentationSupportKHRDelegate>(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
     GetPhysicalDeviceWin32PresentationSupportKHR   = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceWin32PresentationSupportKHRDelegate>(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
     GetPhysicalDeviceXcbPresentationSupportKHR     = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceXcbPresentationSupportKHRDelegate>(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
     GetPhysicalDeviceXlibPresentationSupportKHR    = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceXlibPresentationSupportKHRDelegate>(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
     GetPhysicalDeviceSurfaceCapabilitiesKHR        = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceSurfaceCapabilitiesKHRDelegate>(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
     GetPhysicalDeviceSurfaceFormatsKHR             = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceSurfaceFormatsKHRDelegate>(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
     GetPhysicalDeviceSurfacePresentModesKHR        = VkHelpers.GetInstanceDelegate <GetPhysicalDeviceSurfacePresentModesKHRDelegate>(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
     EnumerateDeviceExtensionProperties             = VkHelpers.GetInstanceDelegate <EnumerateDeviceExtensionPropertiesDelegate>(instance, "vkEnumerateDeviceExtensionProperties");
 }
コード例 #3
0
ファイル: VkGlobal.cs プロジェクト: Zulkir/VulkaNet
        public VkObjectResult <IVkInstance> CreateInstance(VkInstanceCreateInfo createInfo, VkAllocationCallbacks allocator)
        {
            var size =
                createInfo.SizeOfMarshalIndirect() +
                allocator.SizeOfMarshalIndirect();

            return(VkHelpers.RunWithUnamangedData(size, u => CreateInstanceInternal(u, createInfo, allocator)));
        }
コード例 #4
0
ファイル: VkGlobal.cs プロジェクト: Zulkir/VulkaNet
 public DirectFunctions()
 {
     EnumerateInstanceLayerProperties =
         VkHelpers.GetInstanceDelegate <EnumerateInstanceLayerPropertiesDelegate>(null, "vkEnumerateInstanceLayerProperties");
     EnumerateInstanceExtensionProperties =
         VkHelpers.GetInstanceDelegate <EnumerateInstanceExtensionPropertiesDelegate>(null, "vkEnumerateInstanceExtensionProperties");
     CreateInstance =
         VkHelpers.GetInstanceDelegate <CreateInstanceDelegate>(null, "vkCreateInstance");
 }
コード例 #5
0
 public VkDisplayPropertiesKHR(Raw *raw, IVkPhysicalDevice physicalDevice)
 {
     Display              = physicalDevice.GetDisplay(raw->display);
     DisplayName          = VkHelpers.ToString(raw->displayName);
     PhysicalDimensions   = raw->physicalDimensions;
     PhysicalResolution   = raw->physicalResolution;
     SupportedTransforms  = raw->supportedTransforms;
     PlaneReorderPossible = (bool)raw->planeReorderPossible;
     PersistentContent    = (bool)raw->persistentContent;
 }
コード例 #6
0
 public VkPhysicalDeviceProperties(Raw *raw)
 {
     ApiVersion        = raw->apiVersion;
     DriverVersion     = raw->driverVersion;
     VendorID          = raw->vendorID;
     DeviceID          = raw->deviceID;
     DeviceType        = raw->deviceType;
     DeviceName        = VkHelpers.ToString(raw->deviceName);
     PipelineCacheUUID = new VkUuid(raw->pipelineCacheUUID);
     Limits            = new VkPhysicalDeviceLimits(&raw->limits);
     SparseProperties  = new VkPhysicalDeviceSparseProperties(&raw->sparseProperties);
 }
コード例 #7
0
ファイル: VkInstance.cs プロジェクト: Zulkir/VulkaNet
 public DirectFunctions(IVkInstance instance)
 {
     DestroyInstance               = VkHelpers.GetInstanceDelegate <DestroyInstanceDelegate>(instance, "vkDestroyInstance");
     EnumeratePhysicalDevices      = VkHelpers.GetInstanceDelegate <EnumeratePhysicalDevicesDelegate>(instance, "vkEnumeratePhysicalDevices");
     CreateAndroidSurfaceKHR       = VkHelpers.GetInstanceDelegate <CreateAndroidSurfaceKHRDelegate>(instance, "vkCreateAndroidSurfaceKHR");
     CreateMirSurfaceKHR           = VkHelpers.GetInstanceDelegate <CreateMirSurfaceKHRDelegate>(instance, "vkCreateMirSurfaceKHR");
     CreateWaylandSurfaceKHR       = VkHelpers.GetInstanceDelegate <CreateWaylandSurfaceKHRDelegate>(instance, "vkCreateWaylandSurfaceKHR");
     CreateWin32SurfaceKHR         = VkHelpers.GetInstanceDelegate <CreateWin32SurfaceKHRDelegate>(instance, "vkCreateWin32SurfaceKHR");
     CreateXcbSurfaceKHR           = VkHelpers.GetInstanceDelegate <CreateXcbSurfaceKHRDelegate>(instance, "vkCreateXcbSurfaceKHR");
     CreateXlibSurfaceKHR          = VkHelpers.GetInstanceDelegate <CreateXlibSurfaceKHRDelegate>(instance, "vkCreateXlibSurfaceKHR");
     DestroySurfaceKHR             = VkHelpers.GetInstanceDelegate <DestroySurfaceKHRDelegate>(instance, "vkDestroySurfaceKHR");
     CreateDisplayPlaneSurfaceKHR  = VkHelpers.GetInstanceDelegate <CreateDisplayPlaneSurfaceKHRDelegate>(instance, "vkCreateDisplayPlaneSurfaceKHR");
     CreateDebugReportCallbackEXT  = VkHelpers.GetInstanceDelegate <CreateDebugReportCallbackEXTDelegate>(instance, "vkCreateDebugReportCallbackEXT");
     DebugReportMessageEXT         = VkHelpers.GetInstanceDelegate <DebugReportMessageEXTDelegate>(instance, "vkDebugReportMessageEXT");
     DestroyDebugReportCallbackEXT = VkHelpers.GetInstanceDelegate <DestroyDebugReportCallbackEXTDelegate>(instance, "vkDestroyDebugReportCallbackEXT");
 }
コード例 #8
0
ファイル: VkGlobal.cs プロジェクト: Zulkir/VulkaNet
        private IReadOnlyList <IVkExtensionProperties> EnumerateInstanceExtensionProperties(string layerName)
        {
            var size = layerName.SizeOfMarshalIndirect();

            return(VkHelpers.RunWithUnamangedData(size, u => EnumerateInstanceExtensionPropertiesInternal(u, layerName)));
        }
コード例 #9
0
 public VkExtensionProperties(Raw *raw)
 {
     ExtensionName = VkHelpers.ToString(raw->extensionName);
     SpecVersion   = raw->specVersion;
 }
コード例 #10
0
ファイル: VkInstance.cs プロジェクト: Zulkir/VulkaNet
        public void Dispose()
        {
            var size = Allocator.SizeOfMarshalIndirect();

            VkHelpers.RunWithUnamangedData(size, DisposeInternal);
        }