예제 #1
0
 public VK_FrameBuffer(VK_Graphics graphics, int width, int height, TextureFormat[] attachments)
 {
     for (int i = 0; i < attachments.Length; i++)
     {
         var attachment = new Texture(graphics, width, height, attachments[i]);
         var texture    = (VK_Texture)attachment.Implementation;
         texture.isRenderTexture = true;
         Attachments.Add(attachment);
     }
 }
예제 #2
0
 public VK_Texture(VK_Graphics graphics, int width, int height, TextureFormat format)
 {
 }
예제 #3
0
        public VK(VK_Graphics graphics)
        {
            this.graphics = graphics;

            CreateDelegate(ref DestroyInstance, "vkDestroyInstance");
            CreateDelegate(ref EnumeratePhysicalDevices, "vkEnumeratePhysicalDevices");
            CreateDelegate(ref GetPhysicalDeviceFeatures, "vkGetPhysicalDeviceFeatures");
            CreateDelegate(ref GetPhysicalDeviceFormatProperties, "vkGetPhysicalDeviceFormatProperties");
            CreateDelegate(ref GetPhysicalDeviceImageFormatProperties, "vkGetPhysicalDeviceImageFormatProperties");
            CreateDelegate(ref GetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties");
            CreateDelegate(ref GetPhysicalDeviceQueueFamilyProperties, "vkGetPhysicalDeviceQueueFamilyProperties");
            CreateDelegate(ref GetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties");
            CreateDelegate(ref GetInstanceProcAddr, "vkGetInstanceProcAddr");
            CreateDelegate(ref GetDeviceProcAddr, "vkGetDeviceProcAddr");
            CreateDelegate(ref CreateDevice, "vkCreateDevice");
            CreateDelegate(ref DestroyDevice, "vkDestroyDevice");
            CreateDelegate(ref EnumerateDeviceExtensionProperties, "vkEnumerateDeviceExtensionProperties");
            CreateDelegate(ref EnumerateDeviceLayerProperties, "vkEnumerateDeviceLayerProperties");
            CreateDelegate(ref GetDeviceQueue, "vkGetDeviceQueue");
            CreateDelegate(ref QueueSubmit, "vkQueueSubmit");
            CreateDelegate(ref QueueWaitIdle, "vkQueueWaitIdle");
            CreateDelegate(ref DeviceWaitIdle, "vkDeviceWaitIdle");
            CreateDelegate(ref AllocateMemory, "vkAllocateMemory");
            CreateDelegate(ref FreeMemory, "vkFreeMemory");
            CreateDelegate(ref MapMemory, "vkMapMemory");
            CreateDelegate(ref UnmapMemory, "vkUnmapMemory");
            CreateDelegate(ref FlushMappedMemoryRanges, "vkFlushMappedMemoryRanges");
            CreateDelegate(ref InvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges");
            CreateDelegate(ref GetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment");
            CreateDelegate(ref BindBufferMemory, "vkBindBufferMemory");
            CreateDelegate(ref BindImageMemory, "vkBindImageMemory");
            CreateDelegate(ref GetBufferMemoryRequirements, "vkGetBufferMemoryRequirements");
            CreateDelegate(ref GetImageMemoryRequirements, "vkGetImageMemoryRequirements");
            CreateDelegate(ref GetImageSparseMemoryRequirements, "vkGetImageSparseMemoryRequirements");
            CreateDelegate(ref GetPhysicalDeviceSparseImageFormatProperties, "vkGetPhysicalDeviceSparseImageFormatProperties");
            CreateDelegate(ref QueueBindSparse, "vkQueueBindSparse");
            CreateDelegate(ref CreateFence, "vkCreateFence");
            CreateDelegate(ref DestroyFence, "vkDestroyFence");
            CreateDelegate(ref ResetFences, "vkResetFences");
            CreateDelegate(ref GetFenceStatus, "vkGetFenceStatus");
            CreateDelegate(ref WaitForFences, "vkWaitForFences");
            CreateDelegate(ref CreateSemaphore, "vkCreateSemaphore");
            CreateDelegate(ref DestroySemaphore, "vkDestroySemaphore");
            CreateDelegate(ref CreateEvent, "vkCreateEvent");
            CreateDelegate(ref DestroyEvent, "vkDestroyEvent");
            CreateDelegate(ref GetEventStatus, "vkGetEventStatus");
            CreateDelegate(ref SetEvent, "vkSetEvent");
            CreateDelegate(ref ResetEvent, "vkResetEvent");
            CreateDelegate(ref CreateQueryPool, "vkCreateQueryPool");
            CreateDelegate(ref DestroyQueryPool, "vkDestroyQueryPool");
            CreateDelegate(ref GetQueryPoolResults, "vkGetQueryPoolResults");
            CreateDelegate(ref CreateBuffer, "vkCreateBuffer");
            CreateDelegate(ref DestroyBuffer, "vkDestroyBuffer");
            CreateDelegate(ref CreateBufferView, "vkCreateBufferView");
            CreateDelegate(ref DestroyBufferView, "vkDestroyBufferView");
            CreateDelegate(ref CreateImage, "vkCreateImage");
            CreateDelegate(ref DestroyImage, "vkDestroyImage");
            CreateDelegate(ref GetImageSubresourceLayout, "vkGetImageSubresourceLayout");
            CreateDelegate(ref CreateImageView, "vkCreateImageView");
            CreateDelegate(ref DestroyImageView, "vkDestroyImageView");
            CreateDelegate(ref CreateShaderModule, "vkCreateShaderModule");
            CreateDelegate(ref DestroyShaderModule, "vkDestroyShaderModule");
            CreateDelegate(ref CreatePipelineCache, "vkCreatePipelineCache");
            CreateDelegate(ref DestroyPipelineCache, "vkDestroyPipelineCache");
            CreateDelegate(ref GetPipelineCacheData, "vkGetPipelineCacheData");
            CreateDelegate(ref MergePipelineCaches, "vkMergePipelineCaches");
            CreateDelegate(ref CreateGraphicsPipelines, "vkCreateGraphicsPipelines");
            CreateDelegate(ref CreateComputePipelines, "vkCreateComputePipelines");
            CreateDelegate(ref DestroyPipeline, "vkDestroyPipeline");
            CreateDelegate(ref CreatePipelineLayout, "vkCreatePipelineLayout");
            CreateDelegate(ref DestroyPipelineLayout, "vkDestroyPipelineLayout");
            CreateDelegate(ref CreateSampler, "vkCreateSampler");
            CreateDelegate(ref DestroySampler, "vkDestroySampler");
            CreateDelegate(ref CreateDescriptorSetLayout, "vkCreateDescriptorSetLayout");
            CreateDelegate(ref DestroyDescriptorSetLayout, "vkDestroyDescriptorSetLayout");
            CreateDelegate(ref CreateDescriptorPool, "vkCreateDescriptorPool");
            CreateDelegate(ref DestroyDescriptorPool, "vkDestroyDescriptorPool");
            CreateDelegate(ref ResetDescriptorPool, "vkResetDescriptorPool");
            CreateDelegate(ref AllocateDescriptorSets, "vkAllocateDescriptorSets");
            CreateDelegate(ref FreeDescriptorSets, "vkFreeDescriptorSets");
            CreateDelegate(ref UpdateDescriptorSets, "vkUpdateDescriptorSets");
            CreateDelegate(ref CreateFramebuffer, "vkCreateFramebuffer");
            CreateDelegate(ref DestroyFramebuffer, "vkDestroyFramebuffer");
            CreateDelegate(ref CreateRenderPass, "vkCreateRenderPass");
            CreateDelegate(ref DestroyRenderPass, "vkDestroyRenderPass");
            CreateDelegate(ref GetRenderAreaGranularity, "vkGetRenderAreaGranularity");
            CreateDelegate(ref CreateCommandPool, "vkCreateCommandPool");
            CreateDelegate(ref DestroyCommandPool, "vkDestroyCommandPool");
            CreateDelegate(ref ResetCommandPool, "vkResetCommandPool");
            CreateDelegate(ref AllocateCommandBuffers, "vkAllocateCommandBuffers");
            CreateDelegate(ref FreeCommandBuffers, "vkFreeCommandBuffers");
            CreateDelegate(ref BeginCommandBuffer, "vkBeginCommandBuffer");
            CreateDelegate(ref EndCommandBuffer, "vkEndCommandBuffer");
            CreateDelegate(ref ResetCommandBuffer, "vkResetCommandBuffer");
            CreateDelegate(ref CmdBindPipeline, "vkCmdBindPipeline");
            CreateDelegate(ref CmdSetViewport, "vkCmdSetViewport");
            CreateDelegate(ref CmdSetScissor, "vkCmdSetScissor");
            CreateDelegate(ref CmdSetLineWidth, "vkCmdSetLineWidth");
            CreateDelegate(ref CmdSetDepthBias, "vkCmdSetDepthBias");
            CreateDelegate(ref CmdSetBlendConstants, "vkCmdSetBlendConstants");
            CreateDelegate(ref CmdSetDepthBounds, "vkCmdSetDepthBounds");
            CreateDelegate(ref CmdSetStencilCompareMask, "vkCmdSetStencilCompareMask");
            CreateDelegate(ref CmdSetStencilWriteMask, "vkCmdSetStencilWriteMask");
            CreateDelegate(ref CmdSetStencilReference, "vkCmdSetStencilReference");
            CreateDelegate(ref CmdBindDescriptorSets, "vkCmdBindDescriptorSets");
            CreateDelegate(ref CmdBindIndexBuffer, "vkCmdBindIndexBuffer");
            CreateDelegate(ref CmdBindVertexBuffers, "vkCmdBindVertexBuffers");
            CreateDelegate(ref CmdDraw, "vkCmdDraw");
            CreateDelegate(ref CmdDrawIndexed, "vkCmdDrawIndexed");
            CreateDelegate(ref CmdDrawIndirect, "vkCmdDrawIndirect");
            CreateDelegate(ref CmdDrawIndexedIndirect, "vkCmdDrawIndexedIndirect");
            CreateDelegate(ref CmdDispatch, "vkCmdDispatch");
            CreateDelegate(ref CmdDispatchIndirect, "vkCmdDispatchIndirect");
            CreateDelegate(ref CmdCopyBuffer, "vkCmdCopyBuffer");
            CreateDelegate(ref CmdCopyImage, "vkCmdCopyImage");
            CreateDelegate(ref CmdBlitImage, "vkCmdBlitImage");
            CreateDelegate(ref CmdCopyBufferToImage, "vkCmdCopyBufferToImage");
            CreateDelegate(ref CmdCopyImageToBuffer, "vkCmdCopyImageToBuffer");
            CreateDelegate(ref CmdUpdateBuffer, "vkCmdUpdateBuffer");
            CreateDelegate(ref CmdFillBuffer, "vkCmdFillBuffer");
            CreateDelegate(ref CmdClearColorImage, "vkCmdClearColorImage");
            CreateDelegate(ref CmdClearDepthStencilImage, "vkCmdClearDepthStencilImage");
            CreateDelegate(ref CmdClearAttachments, "vkCmdClearAttachments");
            CreateDelegate(ref CmdResolveImage, "vkCmdResolveImage");
            CreateDelegate(ref CmdSetEvent, "vkCmdSetEvent");
            CreateDelegate(ref CmdResetEvent, "vkCmdResetEvent");
            CreateDelegate(ref CmdWaitEvents, "vkCmdWaitEvents");
            CreateDelegate(ref CmdPipelineBarrier, "vkCmdPipelineBarrier");
            CreateDelegate(ref CmdBeginQuery, "vkCmdBeginQuery");
            CreateDelegate(ref CmdEndQuery, "vkCmdEndQuery");
            CreateDelegate(ref CmdResetQueryPool, "vkCmdResetQueryPool");
            CreateDelegate(ref CmdWriteTimestamp, "vkCmdWriteTimestamp");
            CreateDelegate(ref CmdCopyQueryPoolResults, "vkCmdCopyQueryPoolResults");
            CreateDelegate(ref CmdPushConstants, "vkCmdPushConstants");
            CreateDelegate(ref CmdBeginRenderPass, "vkCmdBeginRenderPass");
            CreateDelegate(ref CmdNextSubpass, "vkCmdNextSubpass");
            CreateDelegate(ref CmdEndRenderPass, "vkCmdEndRenderPass");
            CreateDelegate(ref CmdExecuteCommands, "vkCmdExecuteCommands");
            CreateDelegate(ref DestroySurfaceKHR, "vkDestroySurfaceKHR");
            CreateDelegate(ref GetPhysicalDeviceSurfaceSupportKHR, "vkGetPhysicalDeviceSurfaceSupportKHR");
            CreateDelegate(ref GetPhysicalDeviceSurfaceCapabilitiesKHR, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
            CreateDelegate(ref GetPhysicalDeviceSurfaceFormatsKHR, "vkGetPhysicalDeviceSurfaceFormatsKHR");
            CreateDelegate(ref GetPhysicalDeviceSurfacePresentModesKHR, "vkGetPhysicalDeviceSurfacePresentModesKHR");
            CreateDelegate(ref CreateSwapchainKHR, "vkCreateSwapchainKHR");
            CreateDelegate(ref DestroySwapchainKHR, "vkDestroySwapchainKHR");
            CreateDelegate(ref GetSwapchainImagesKHR, "vkGetSwapchainImagesKHR");
            CreateDelegate(ref AcquireNextImageKHR, "vkAcquireNextImageKHR");
            CreateDelegate(ref QueuePresentKHR, "vkQueuePresentKHR");
            CreateDelegate(ref GetPhysicalDeviceDisplayPropertiesKHR, "vkGetPhysicalDeviceDisplayPropertiesKHR");
            CreateDelegate(ref GetPhysicalDeviceDisplayPlanePropertiesKHR, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
            CreateDelegate(ref GetDisplayPlaneSupportedDisplaysKHR, "vkGetDisplayPlaneSupportedDisplaysKHR");
            CreateDelegate(ref GetDisplayModePropertiesKHR, "vkGetDisplayModePropertiesKHR");
            CreateDelegate(ref CreateDisplayModeKHR, "vkCreateDisplayModeKHR");
            CreateDelegate(ref GetDisplayPlaneCapabilitiesKHR, "vkGetDisplayPlaneCapabilitiesKHR");
            CreateDelegate(ref CreateDisplayPlaneSurfaceKHR, "vkCreateDisplayPlaneSurfaceKHR");
            CreateDelegate(ref CreateSharedSwapchainsKHR, "vkCreateSharedSwapchainsKHR");
            CreateDelegate(ref CreateDebugReportCallbackEXT, "vkCreateDebugReportCallbackEXT");
            CreateDelegate(ref DestroyDebugReportCallbackEXT, "vkDestroyDebugReportCallbackEXT");
            CreateDelegate(ref DebugReportMessageEXT, "vkDebugReportMessageEXT");
            CreateDelegate(ref DebugMarkerSetObjectTagEXT, "vkDebugMarkerSetObjectTagEXT");
            CreateDelegate(ref DebugMarkerSetObjectNameEXT, "vkDebugMarkerSetObjectNameEXT");
            CreateDelegate(ref CmdDebugMarkerBeginEXT, "vkCmdDebugMarkerBeginEXT");
            CreateDelegate(ref CmdDebugMarkerEndEXT, "vkCmdDebugMarkerEndEXT");
            CreateDelegate(ref CmdDebugMarkerInsertEXT, "vkCmdDebugMarkerInsertEXT");
            CreateDelegate(ref CmdDrawIndirectCountAMD, "vkCmdDrawIndirectCountAMD");
            CreateDelegate(ref CmdDrawIndexedIndirectCountAMD, "vkCmdDrawIndexedIndirectCountAMD");
            CreateDelegate(ref GetPhysicalDeviceExternalImageFormatPropertiesNV, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV");

            CreateDelegate(ref SetDebugUtilsObjectNameEXT, "vkSetDebugUtilsObjectNameEXT");
            CreateDelegate(ref SetDebugUtilsObjectTagEXT, "vkSetDebugUtilsObjectTagEXT");
            CreateDelegate(ref QueueBeginDebugUtilsLabelEXT, "vkQueueBeginDebugUtilsLabelEXT");
            CreateDelegate(ref QueueEndDebugUtilsLabelEXT, "vkQueueEndDebugUtilsLabelEXT");
            CreateDelegate(ref QueueInsertDebugUtilsLabelEXT, "vkQueueInsertDebugUtilsLabelEXT");
            CreateDelegate(ref CmdBeginDebugUtilsLabelEXT, "vkCmdBeginDebugUtilsLabelEXT");
            CreateDelegate(ref CmdEndDebugUtilsLabelEXT, "vkCmdEndDebugUtilsLabelEXT");
            CreateDelegate(ref CmdInsertDebugUtilsLabelEXT, "vkCmdInsertDebugUtilsLabelEXT");
            CreateDelegate(ref CreateDebugUtilsMessengerEXT, "vkCreateDebugUtilsMessengerEXT");
            CreateDelegate(ref DestroyDebugUtilsMessengerEXT, "vkDestroyDebugUtilsMessengerEXT");
            CreateDelegate(ref SubmitDebugUtilsMessageEXT, "vkSubmitDebugUtilsMessageEXT");
        }