vulkan

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2017 License: Apache-2.0 Imports: 37 Imported by: 14

README

Vulkan Status

Trace and Replay

Vulkan is currently WIP. Many samples, and applications do work correctly, but not all.

Mid-Execution Capture

Mid-Execution capture is currently in progress. Currently there is no way exposed to start a capture at any frame other than 0, but this will be exposed once the functionality is at parity with non mid-execution capture.

Subcommands

When replaying to a specific command within a command buffer, we have to re-write the command-buffer. The Subcommands list shows all commands in command-buffers that support re-writing.

Current Support

The current status of support for the Vulkan API on a method by method basis are as follows.

Command Name Capture Mid-Execution Subcommands
vkAllocateCommandBuffers ✅ ✅ ➖
vkCreateDevice ✅ ✅ ➖
vkCreateInstance ✅ ✅ ➖
vkDestroyDevice ✅ ✅ ➖
vkDestroyInstance ✅ ✅ ➖
vkEnumerateDeviceExtensionProperties ✅ ➖ ➖
vkEnumerateDeviceLayerProperties ✅ ➖ ➖
vkEnumerateInstanceExtensionProperties ✅ ➖ ➖
vkEnumerateInstanceLayerProperties ✅ ➖ ➖
vkEnumeratePhysicalDevices ✅ ➖ ➖
vkFreeCommandBuffers ✅ ✅ ➖
vkGetDeviceProcAddr ✅ ➖ ➖
vkGetDeviceQueue ✅ ✅ ➖
vkGetInstanceProcAddr ✅ ➖ ➖
vkGetPhysicalDeviceSparseImageFormatProperties ✅ ➖ ➖
vkGetPhysicalDeviceFeatures ✅ ➖ ➖
vkGetPhysicalDeviceFormatProperties ✅ ➖ ➖
vkGetPhysicalDeviceImageFormatProperties ✅ ➖ ➖
vkGetPhysicalDeviceMemoryProperties ✅ ➖ ➖
vkGetPhysicalDeviceProperties ✅ ➖ ➖
vkGetPhysicalDeviceQueueFamilyProperties ✅ ➖ ➖
vkAcquireNextImageKHR ✅ ➖ ➖
vkAllocateDescriptorSets ✅ ✅ ➖
vkAllocateMemory ✅ ✅ ➖
vkBeginCommandBuffer ✅ ✅ ➖
vkBindBufferMemory ✅ ✅ ➖
vkBindImageMemory ✅ ✅ ➖
vkCmdBeginQuery ✅ ✅ ✅
vkCmdBeginRenderPass ✅ ✅ ✅
vkCmdBindDescriptorSets ✅ ✅ ✅
vkCmdBindIndexBuffer ✅ ✅ ✅
vkCmdBindPipeline ✅ ✅ ✅
vkCmdBindVertexBuffers ✅ ✅ ✅
vkCmdBlitImage ✅ ✅ ✅
vkCmdClearAttachments ✅ ✅ ✅
vkCmdClearColorImage ✅ ✅ ✅
vkCmdClearDepthStencilImage ✅ ✅ ✅
vkCmdCopyBuffer ✅ ✅ ✅
vkCmdCopyBufferToImage ✅ ✅ ✅
vkCmdCopyImage ✅ ✅ ✅
vkCmdCopyImageToBuffer ✅ ✅ ✅
vkCmdCopyQueryPoolResults ✅ ✅ ✅
vkCmdDispatch ✅ ✅ ✅
vkCmdDispatchIndirect ✅ ✅ ✅
vkCmdDraw ✅ ✅ ✅
vkCmdDrawIndexed ✅ ✅ ✅
vkCmdDrawIndexedIndirect ✅ ✅ ✅
vkCmdDrawIndirect ✅ ✅ ✅
vkCmdEndQuery ✅ ✅ ✅
vkCmdEndRenderPass ✅ ✅ ✅
vkCmdExecuteCommands ✅ ✅ ✅
vkCmdFillBuffer ✅ ✅ ✅
vkCmdNextSubpass ✅ ✅ ✅
vkCmdPipelineBarrier ✅ ✅ ✅
vkCmdPushConstants ✅ ✅ ✅
vkCmdResetEvent ✅ ✅ ✅
vkCmdResetQueryPool ✅ ✅ ✅
vkCmdResolveImage ✅ ✅ ✅
vkCmdSetBlendConstants ✅ ✅ ✅
vkCmdSetDepthBias ✅ ✅ ✅
vkCmdSetDepthBounds ✅ ✅ ✅
vkCmdSetEvent ✅ ✅ ✅
vkCmdSetLineWidth ✅ ✅ ✅
vkCmdSetScissor ✅ ✅ ✅
vkCmdSetStencilCompareMask ✅ ✅ ✅
vkCmdSetStencilReference ✅ ✅ ✅
vkCmdSetStencilWriteMask ✅ ✅ ✅
vkCmdSetViewport ✅ ✅ ✅
vkCmdUpdateBuffer ✅ ✅ ✅
vkCmdWaitEvents ✅ ✅ ✅
vkCmdWriteTimestamp ✅ ✅ ✅
vkCreateAndroidSurfaceKHR ✅ ✅ ➖
vkCreateBuffer ✅ ✅ ➖
vkCreateBufferView ✅ ✅ ➖
vkCreateCommandPool ✅ ✅ ➖
vkCreateComputePipelines ✅ ✅ ➖
vkCreateDescriptorPool ✅ ✅ ➖
vkCreateDescriptorSetLayout ✅ ✅ ➖
vkCreateDisplayModeKHR ◻ ◻ ➖
vkCreateDisplayPlaneSurfaceKHR ◻ ◻ ➖
vkCreateEvent ✅ ✅ ➖
vkCreateFramebuffer ✅ ✅ ➖
vkCreateGraphicsPipelines ✅ ✅ ➖
vkCreateImage ✅ ✅ ➖
vkCreateImageView ✅ ✅ ➖
vkCreateMirSurfaceKHR ✅ ✅ ➖
vkCreatePipelineCache ✅ ✅ ➖
vkCreatePipelineLayout ✅ ✅ ➖
vkCreateQueryPool ✅ ✅ ➖
vkCreateRenderPass ✅ ✅ ➖
vkCreateSampler ✅ ✅ ➖
vkCreateSemaphore ✅ ✅ ➖
vkCreateShaderModule ✅ ✅ ➖
vkCreateSharedSwapchainsKHR ◻ ◻ ➖
vkCreateSwapchainKHR ✅ ✅ ➖
vkCreateWaylandSurfaceKHR ✅ ✅ ➖
vkCreateWin32SurfaceKHR ✅ ✅ ➖
vkCreateXcbSurfaceKHR ✅ ✅ ➖
vkCreateXlibSurfaceKHR ✅ ✅ ➖
vkDestroyBuffer ✅ ✅ ➖
vkDestroyBufferView ✅ ✅ ➖
vkDestroyCommandPool ✅ ✅ ➖
vkDestroyDescriptorPool ✅ ✅ ➖
vkDestroyDescriptorSetLayout ✅ ✅ ➖
vkDestroyEvent ✅ ✅ ➖
vkDestroyFramebuffer ✅ ✅ ➖
vkDestroyImage ✅ ✅ ➖
vkDestroyImageView ✅ ✅ ➖
vkDestroyPipeline ✅ ✅ ➖
vkDestroyPipelineCache ✅ ✅ ➖
vkDestroyPipelineLayout ✅ ✅ ➖
vkDestroyQueryPool ✅ ✅ ➖
vkDestroyRenderPass ✅ ✅ ➖
vkDestroySampler ✅ ✅ ➖
vkDestroySemaphore ✅ ✅ ➖
vkDestroyShaderModule ✅ ✅ ➖
vkDestroySwapchainKHR ✅ ✅ ➖
vkDeviceWaitIdle ✅ ✅ ➖
vkEndCommandBuffer ✅ ✅ ➖
vkFlushMappedMemoryRanges ✅ ➖ ➖
vkFreeDescriptorSets ✅ ✅ ➖
vkFreeMemory ✅ ✅ ➖
vkGetBufferMemoryRequirements ✅ ➖ ➖
vkGetDeviceMemoryCommitment ◻ ➖ ➖
vkGetDisplayModePropertiesKHR ◻ ➖ ➖
vkGetDisplayPlaneCapabilitiesKHR ◻ ➖ ➖
vkGetDisplayPlaneSupportedDisplaysKHR ◻ ➖ ➖
vkGetEventStatus ✅ ➖ ➖
vkGetFenceStatus ✅ ➖ ➖
vkGetImageMemoryRequirements ✅ ➖ ➖
vkGetImageSparseMemoryRequirements ✅ ➖ ➖
vkGetImageSubresourceLayout ✅ ➖ ➖
vkGetPhysicalDeviceDisplayPlanePropertiesKHR ◻ ➖ ➖
vkGetPhysicalDeviceDisplayPropertiesKHR ◻ ➖ ➖
vkGetPhysicalDeviceMirPresentationSupportKHR ✅ ➖ ➖
vkGetPhysicalDeviceSurfaceCapabilitiesKHR ✅ ➖ ➖
vkGetPhysicalDeviceSurfaceFormatsKHR ✅ ➖ ➖
vkGetPhysicalDeviceSurfacePresentModesKHR ✅ ➖ ➖
vkGetPhysicalDeviceSurfaceSupportKHR ✅ ➖ ➖
vkGetPhysicalDeviceWaylandPresentationSupportKHR ✅ ➖ ➖
vkGetPhysicalDeviceWin32PresentationSupportKHR ✅ ➖ ➖
vkGetPhysicalDeviceXcbPresentationSupportKHR ✅ ➖ ➖
vkGetPhysicalDeviceXlibPresentationSupportKHR ✅ ➖ ➖
vkGetPipelineCacheData ✅ ➖ ➖
vkGetQueryPoolResults ✅ ➖ ➖
vkGetRenderAreaGranularity ✅ ➖ ➖
vkGetSwapchainImagesKHR ✅ ➖ ➖
vkInvalidateMappedMemoryRanges ✅ ➖ ➖
vkMapMemory ✅ ✅ ➖
vkMergePipelineCaches ✅ ➖ ➖
vkQueueBindSparse ◻ ◻ ➖
vkQueuePresentKHR ✅ ➖ ➖
vkQueueSubmit ✅ ✅ ➖
vkQueueWaitIdle ✅ ➖ ➖
vkResetCommandBuffer ✅ ✅ ➖
vkResetCommandPool ✅ ✅ ➖
vkResetDescriptorPool ✅ ✅ ➖
vkResetEvent ✅ ✅ ➖
vkResetFences ✅ ✅ ➖
vkSetEvent ✅ ✅ ➖
vkUnmapMemory ✅ ✅ ➖
vkUpdateDescriptorSets ✅ ✅ ➖
vkWaitForFences ✅ ➖ ➖
vkCreateFence ✅ ✅ ➖
vkDestroyFence ✅ ✅ ➖
vkDestroySurfaceKHR ✅ ✅ ➖

Documentation

Overview

Package vulkan implementes the API interface for the Vulkan graphics library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(ctx context.Context,
	cb CommandBuilder,
	commandBuffer VkCommandBuffer,
	s *api.State,
	rebuildInfo interface{}) (func(), api.Cmd)

AddCommand recreates the command defined by recreateInfo and places it into the given command buffer. It returns the atoms that it had to create in order to satisfy the command. It also returns a function to clean up the data that was allocated during the creation.

Types

type CommandBufferCommand

type CommandBufferCommand struct {
	// contains filtered or unexported fields
}

type CommandBufferCommands

type CommandBufferCommands []CommandBufferCommand

type CustomState

type CustomState struct {
	SubcommandIndex   sync.SubcommandIndex
	CurrentSubmission *api.Cmd
	HandleSubcommand  func(interface{}) `nobox:"true"`
}

type RecreateCmdPushConstantsDataExpanded

type RecreateCmdPushConstantsDataExpanded struct {
	Layout     VkPipelineLayout
	StageFlags VkShaderStageFlags
	Offset     uint32
	Size       uint32
	Data       []uint8
}

type RecreateCmdUpdateBufferDataExpanded

type RecreateCmdUpdateBufferDataExpanded struct {
	DstBuffer VkBuffer
	DstOffset VkDeviceSize
	DataSize  VkDeviceSize
	Data      []uint8
}

type VulkanContext

type VulkanContext struct{}

func (VulkanContext) ID

func (VulkanContext) Name

func (VulkanContext) Name() string

type VulkanDependencyGraphBehaviourProvider

type VulkanDependencyGraphBehaviourProvider struct {
	// contains filtered or unexported fields
}

func (*VulkanDependencyGraphBehaviourProvider) GetBehaviourForAtom

type VulkanTerminator

type VulkanTerminator struct {
	// contains filtered or unexported fields
}

VulkanTerminator is very similar to EarlyTerminator. It has 2 additional properties.

  1. If a VkQueueSubmit is found, and it contains an event that will be signaled after the final request, we remove the event from the command-list, and remove any subsequent events
  2. If a request is made to replay until the MIDDLE of a vkQueueSubmit, then it will patch that command-list to remove any commands after the command in question. Furthermore it will continue the replay until that command can be run i.e. it will make sure to continue to mutate the trace until all pending events have been successfully completed. TODO(awoloszyn): Handle #2

This takes advantage of the fact that all atoms will be in order.

func NewVulkanTerminator

func NewVulkanTerminator(ctx context.Context, capture *path.Capture) (*VulkanTerminator, error)

func (*VulkanTerminator) Add

func (t *VulkanTerminator) Add(ctx context.Context, id api.CmdID, subcommand []uint64) error

Add adds the atom with identifier id to the set of atoms that must be seen before the VulkanTerminator will consume all atoms (excluding the EOS atom).

func (*VulkanTerminator) Flush

func (t *VulkanTerminator) Flush(ctx context.Context, out transform.Writer)

func (*VulkanTerminator) Transform

func (t *VulkanTerminator) Transform(ctx context.Context, id api.CmdID, cmd api.Cmd, out transform.Writer)

Directories

Path Synopsis
Package vulkan_pb describes the serialization format for the vulkan api.
Package vulkan_pb describes the serialization format for the vulkan api.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL