Exemple #1
0
 public VkLayerProperties(Raw *raw)
 {
     LayerName             = VkHelpers.ToString(raw->layerName);
     SpecVersion           = raw->specVersion;
     ImplementationVersion = raw->implementationVersion;
     Description           = VkHelpers.ToString(raw->description);
 }
Exemple #2
0
 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");
 }
Exemple #3
0
        public VkObjectResult <IVkInstance> CreateInstance(VkInstanceCreateInfo createInfo, VkAllocationCallbacks allocator)
        {
            var size =
                createInfo.SizeOfMarshalIndirect() +
                allocator.SizeOfMarshalIndirect();

            return(VkHelpers.RunWithUnamangedData(size, u => CreateInstanceInternal(u, createInfo, allocator)));
        }
Exemple #4
0
 public DirectFunctions()
 {
     EnumerateInstanceLayerProperties =
         VkHelpers.GetInstanceDelegate <EnumerateInstanceLayerPropertiesDelegate>(null, "vkEnumerateInstanceLayerProperties");
     EnumerateInstanceExtensionProperties =
         VkHelpers.GetInstanceDelegate <EnumerateInstanceExtensionPropertiesDelegate>(null, "vkEnumerateInstanceExtensionProperties");
     CreateInstance =
         VkHelpers.GetInstanceDelegate <CreateInstanceDelegate>(null, "vkCreateInstance");
 }
Exemple #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;
 }
Exemple #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);
 }
Exemple #7
0
 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");
 }
Exemple #8
0
        private IReadOnlyList <IVkExtensionProperties> EnumerateInstanceExtensionProperties(string layerName)
        {
            var size = layerName.SizeOfMarshalIndirect();

            return(VkHelpers.RunWithUnamangedData(size, u => EnumerateInstanceExtensionPropertiesInternal(u, layerName)));
        }
Exemple #9
0
 public VkExtensionProperties(Raw *raw)
 {
     ExtensionName = VkHelpers.ToString(raw->extensionName);
     SpecVersion   = raw->specVersion;
 }
Exemple #10
0
        public void Dispose()
        {
            var size = Allocator.SizeOfMarshalIndirect();

            VkHelpers.RunWithUnamangedData(size, DisposeInternal);
        }