Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VK API Commands should be correctly generated, compiled & executed #22

Open
FacticiusVir opened this issue Sep 21, 2016 · 9 comments
Open
Assignees

Comments

@FacticiusVir
Copy link
Owner

FacticiusVir commented Sep 21, 2016

These commands are successfully generated but need exercising in sample code:

  • Device initialization
  • vkCreateInstance
  • vkDestroyInstance
  • vkEnumeratePhysicalDevices
  • vkGetPhysicalDeviceFeatures
  • vkGetPhysicalDeviceFormatProperties
  • vkGetPhysicalDeviceImageFormatProperties
  • vkGetPhysicalDeviceProperties
  • vkGetPhysicalDeviceQueueFamilyProperties
  • vkGetPhysicalDeviceMemoryProperties
  • vkGetInstanceProcAddr
  • vkGetDeviceProcAddr
  • Device commands
    • vkCreateDevice
    • vkDestroyDevice
  • Extension discovery commands
    • vkEnumerateInstanceExtensionProperties
    • vkEnumerateDeviceExtensionProperties
  • Layer discovery commands
    • vkEnumerateInstanceLayerProperties
    • vkEnumerateDeviceLayerProperties
  • Queue commands
    • vkGetDeviceQueue
    • vkQueueSubmit
    • vkQueueWaitIdle
    • vkDeviceWaitIdle
  • Memory commands
    • vkAllocateMemory
    • vkFreeMemory
    • vkMapMemory
    • vkUnmapMemory
    • vkFlushMappedMemoryRanges
    • vkInvalidateMappedMemoryRanges
    • vkGetDeviceMemoryCommitment
  • Memory management API commands
    • vkBindBufferMemory
    • vkBindImageMemory
    • vkGetBufferMemoryRequirements
    • vkGetImageMemoryRequirements
  • Sparse resource memory management API commands
    • vkGetImageSparseMemoryRequirements
    • vkGetPhysicalDeviceSparseImageFormatProperties
    • vkQueueBindSparse
  • Fence commands
    • vkCreateFence
    • vkDestroyFence
    • vkResetFences
    • vkGetFenceStatus
    • vkWaitForFences
  • Queue semaphore commands
    • vkCreateSemaphore
    • vkDestroySemaphore
  • Event commands
    • vkCreateEvent
    • vkDestroyEvent
    • vkGetEventStatus
    • vkSetEvent
    • vkResetEvent
  • Query commands
    • vkCreateQueryPool
    • vkDestroyQueryPool
    • vkGetQueryPoolResults
  • Buffer commands
    • vkCreateBuffer
    • vkDestroyBuffer
  • Buffer view commands
    • vkCreateBufferView
    • vkDestroyBufferView
  • Image commands
    • vkCreateImage
    • vkDestroyImage
    • vkGetImageSubresourceLayout
  • Image view commands
    • vkCreateImageView
    • vkDestroyImageView
  • Shader commands
    • vkCreateShaderModule
    • vkDestroyShaderModule
  • Pipeline Cache commands
    • vkCreatePipelineCache
    • vkDestroyPipelineCache
    • vkGetPipelineCacheData
    • vkMergePipelineCaches
  • Pipeline commands
    • vkCreateGraphicsPipelines
    • vkCreateComputePipelines
    • vkDestroyPipeline
  • Pipeline layout commands
    • vkCreatePipelineLayout
    • vkDestroyPipelineLayout
  • Sampler commands
    • vkCreateSampler
    • vkDestroySampler
  • Descriptor set commands
    • vkCreateDescriptorSetLayout
    • vkDestroyDescriptorSetLayout
    • vkCreateDescriptorPool
    • vkDestroyDescriptorPool
    • vkResetDescriptorPool
    • vkAllocateDescriptorSets
    • vkFreeDescriptorSets
    • vkUpdateDescriptorSets
  • Pass commands
    • vkCreateFramebuffer
    • vkDestroyFramebuffer
    • vkCreateRenderPass
    • vkDestroyRenderPass
    • vkGetRenderAreaGranularity
  • Command pool commands
    • vkCreateCommandPool
    • vkDestroyCommandPool
    • vkResetCommandPool
  • Command buffer commands
    • vkAllocateCommandBuffers
    • vkFreeCommandBuffers
    • vkBeginCommandBuffer
    • vkEndCommandBuffer
    • vkResetCommandBuffer
  • Command buffer building commands
    • vkCmdBindPipeline
    • vkCmdSetViewport
    • vkCmdSetScissor
    • vkCmdSetLineWidth
    • vkCmdSetDepthBias
    • vkCmdSetBlendConstants
    • vkCmdSetDepthBounds
    • vkCmdSetStencilCompareMask
    • vkCmdSetStencilWriteMask
    • vkCmdSetStencilReference
    • vkCmdBindDescriptorSets
    • vkCmdBindIndexBuffer
    • vkCmdBindVertexBuffers
    • vkCmdDraw
    • vkCmdDrawIndexed
    • vkCmdDrawIndirect
    • vkCmdDrawIndexedIndirect
    • vkCmdDispatch
    • vkCmdDispatchIndirect
    • vkCmdCopyBuffer
    • vkCmdCopyImage
    • vkCmdBlitImage
    • vkCmdCopyBufferToImage
    • vkCmdCopyImageToBuffer
    • vkCmdUpdateBuffer
    • vkCmdFillBuffer
    • vkCmdClearColorImage
    • vkCmdClearDepthStencilImage
    • vkCmdClearAttachments
    • vkCmdResolveImage
    • vkCmdSetEvent
    • vkCmdResetEvent
    • vkCmdWaitEvents
    • vkCmdPipelineBarrier
    • vkCmdBeginQuery
    • vkCmdEndQuery
    • vkCmdResetQueryPool
    • vkCmdWriteTimestamp
    • vkCmdCopyQueryPoolResults
    • vkCmdPushConstants
    • vkCmdBeginRenderPass
    • vkCmdNextSubpass
    • vkCmdEndRenderPass
    • vkCmdExecuteCommands
@FacticiusVir FacticiusVir self-assigned this Sep 21, 2016
@realvictorprm
Copy link

Is this still up to date?

@FacticiusVir
Copy link
Owner Author

For the most part this is up to date; I'm currently working on a port of Sascha Willem's Vulkan samples that will properly test the remaining methods, though the full API is being generated and should work correctly.

@realvictorprm
Copy link

Please bear with me, but what prevents usage of VulkanSharp from Mono?

@FacticiusVir
Copy link
Owner Author

If you're asking why I created these bindings, rather than using the VulkanSharp project - I'm not a fan of VulkanSharp's interop layer which has a lot of opportunities for memory leaks. Additionally, the API as a whole uses a lot of short-lived reference-type objects which causes a lot of memory churn & GC pauses, which is a real problem for apps trying maintain a consistent framerate. On an aesthetic note, SharpVk also arranges the API to be more C#-like, with commands invoked from the specific handle (e.g. CommandBuffer.Draw) instead of the parent Instance or Device.

You might also want to look at https://github.com/discosultan/VulkanCore, which is a hand-crafted binding where ours are auto-generated.

@realvictorprm
Copy link

I would rather say that it's more Object oriented :) Thanks for this information. I would suggest to add this to the read me or somewhere else too because it wasn't clear to me from the readme.

@realvictorprm
Copy link

You said it's auto generated, why isn't than everything auto generated? If so the list would be checked completely wouldn't it?

@FacticiusVir
Copy link
Owner Author

To clarify - all the methods listed are generated, but they're checked when I have sample code that proves the generation is correct and shows how they're used. You should be able to use any of these methods from your code if you need them.

@realvictorprm
Copy link

Thanks you very much for this information. So we could contribute to this if we help translating the C++ Samples for Vulkan, right? If so I'm going to translate some too.

@FacticiusVir
Copy link
Owner Author

That would be great, thanks! There's a Samples projects here - I'd started porting the C++ base classes in response to FacticiusVir/SharpVk-Samples#2 so the TextOverlay project is the priority, but I'd not had time recently to make much progress so any contribution would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants