Documentation ¶
Overview ¶
Package vulkan implementes the API interface for the Vulkan graphics library.
Index ¶
- Constants
- func AddCommand(ctx context.Context, cb CommandBuilder, commandBuffer VkCommandBuffer, ...) (func(), api.Cmd, error)
- func CallReflectedCommand(ctx context.Context, cmd api.Cmd, id api.CmdID, s *api.GlobalState, ...)
- func EnterRecreate(ctx context.Context, s *api.GlobalState) func()
- func GetCommandArgs(ctx context.Context, cr CommandReferenceʳ, s *State) interface{}
- func GetCommandFunction(cr *CommandReference) interface{}
- func IsFullyBound(offset VkDeviceSize, size VkDeviceSize, bindings U64ːVkSparseMemoryBindᵐ) bool
- func NewCommandSplitter(ctx context.Context) *commandSplitter
- type ExternalBufferData
- type ExternalImageData
- type ExternalImageDataRange
- type ExternalMemoryData
- type InsertionCommand
- func (s *InsertionCommand) API() api.API
- func (s *InsertionCommand) Alive() bool
- func (s *InsertionCommand) Caller() api.CmdID
- func (s *InsertionCommand) Clone(a arena.Arena) api.Cmd
- func (s *InsertionCommand) CmdFlags(context.Context, api.CmdID, *api.GlobalState) api.CmdFlags
- func (s *InsertionCommand) CmdName() string
- func (s *InsertionCommand) CmdParams() api.Properties
- func (s *InsertionCommand) CmdResult() *api.Property
- func (s *InsertionCommand) Extras() *api.CmdExtras
- func (*InsertionCommand) Mutate(ctx context.Context, cmd api.CmdID, g *api.GlobalState, b *builder.Builder, ...) error
- func (s *InsertionCommand) SetCaller(c api.CmdID)
- func (s *InsertionCommand) SetTerminated(bool)
- func (s *InsertionCommand) SetThread(c uint64)
- func (s *InsertionCommand) Terminated() bool
- func (s *InsertionCommand) Thread() uint64
- type MarkerType
- type SemaphoreState
- type VulkanContext
- type VulkanTerminator
- func (t *VulkanTerminator) Add(ctx context.Context, id api.CmdID, subcommand api.SubCmdIdx) error
- func (t *VulkanTerminator) BuffersCommands() bool
- func (t *VulkanTerminator) Flush(ctx context.Context, out transform.Writer) error
- func (t *VulkanTerminator) PostLoop(ctx context.Context, output transform.Writer)
- func (t *VulkanTerminator) PreLoop(ctx context.Context, output transform.Writer)
- func (t *VulkanTerminator) Transform(ctx context.Context, id api.CmdID, cmd api.Cmd, out transform.Writer) error
- type WaitForPerfetto
- func (t *WaitForPerfetto) BuffersCommands() bool
- func (t *WaitForPerfetto) Flush(ctx context.Context, out transform.Writer) error
- func (t *WaitForPerfetto) PostLoop(ctx context.Context, out transform.Writer)
- func (t *WaitForPerfetto) PreLoop(ctx context.Context, out transform.Writer)
- func (t *WaitForPerfetto) Transform(ctx context.Context, id api.CmdID, cmd api.Cmd, out transform.Writer) error
Constants ¶
const ( VK_BEGIN_COMMAND_BUFFER = "vkBeginCommandBuffer" VK_CMD_BEGIN_RENDER_PASS = "vkCmdBeginRenderPass" VK_CMD_NEXT_SUBPASS = "vkCmdNextSubpass" VK_COMMAND_BUFFER = "vkCommandBuffer" VK_RENDER_PASS = "vkRenderPass" VK_SUBPASS = "vkSubpass" VK_END_COMMAND_BUFFER = "vkEndCommandBuffer" VK_CMD_END_RENDER_PASS = "vkCmdEndRenderPass" COMMAND_BUFFER = "commandBuffer" VK_CMD_DEBUG_MARKER_BEGIN = "vkCmdDebugMarkerBeginEXT" VK_CMD_DEBUG_MARKER_END = "vkCmdDebugMarkerEndEXT" VK_CMD_DEBUG_MARKER = "vkCmdDebugMarker" )
const ( DebugMarker = iota RenderPassMarker )
const VK_ATTACHMENT_UNUSED = uint32(0xFFFFFFFF)
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
func AddCommand(ctx context.Context, cb CommandBuilder, commandBuffer VkCommandBuffer, r *api.GlobalState, s *api.GlobalState, rebuildInfo interface{}) (func(), api.Cmd, error)
AddCommand recreates the command defined by recreateInfo and places it into the given command buffer. It returns the commands 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.
func CallReflectedCommand ¶
func CallReflectedCommand(ctx context.Context, cmd api.Cmd, id api.CmdID, s *api.GlobalState, b *rb.Builder, w api.StateWatcher, sub, data interface{})
CallReflectedCommand unpacks the given subcommand and arguments, and calls the method
func EnterRecreate ¶
func EnterRecreate(ctx context.Context, s *api.GlobalState) func()
func GetCommandArgs ¶
GetCommandArgs takes a command reference and returns the command arguments of that recorded command.
func GetCommandFunction ¶
func GetCommandFunction(cr *CommandReference) interface{}
GetCommandFunction takes a command reference (recorded command buffer command) and returns the function which mutates the state as the recorded command get executed.
func IsFullyBound ¶
func IsFullyBound(offset VkDeviceSize, size VkDeviceSize, bindings U64ːVkSparseMemoryBindᵐ) bool
IsFullyBound returns true if the resource range from offset with size is fully covered in the bindings. If the size ofd the resource range is 0, returns false.
func NewCommandSplitter ¶
Types ¶
type ExternalBufferData ¶
type ExternalImageData ¶
type ExternalImageData struct { Image VkImage BarrierRange VkImageSubresourceRange OldLayout VkImageLayout NewLayout VkImageLayout SubmitIndex uint32 CommandBufferIndex uint32 CopyRanges []ExternalImageDataRange }
type ExternalImageDataRange ¶
type ExternalImageDataRange struct { DataOffset VkDeviceSize Subresource VkImageSubresourceLayers }
type ExternalMemoryData ¶
type ExternalMemoryData struct { ID id.ID Size VkDeviceSize Buffers []ExternalBufferData Images []ExternalImageData }
func GetExternalMemoryData ¶
func GetExternalMemoryData(e *api.CmdExtras) *ExternalMemoryData
ExternalMemoryData returns a pointer to the ExternalMemoryData structure in the CmdExtras, or nil if there are no observations in the CmdExtras.
type InsertionCommand ¶
type InsertionCommand struct {
// contains filtered or unexported fields
}
InsertionCommand is a temporary command that is expected to be replaced by a down-stream transform.
func (*InsertionCommand) API ¶
func (s *InsertionCommand) API() api.API
func (*InsertionCommand) Alive ¶
func (s *InsertionCommand) Alive() bool
func (*InsertionCommand) Caller ¶
func (s *InsertionCommand) Caller() api.CmdID
func (*InsertionCommand) CmdFlags ¶
func (s *InsertionCommand) CmdFlags(context.Context, api.CmdID, *api.GlobalState) api.CmdFlags
func (*InsertionCommand) CmdName ¶
func (s *InsertionCommand) CmdName() string
CmdName returns the name of the command.
func (*InsertionCommand) CmdParams ¶
func (s *InsertionCommand) CmdParams() api.Properties
func (*InsertionCommand) CmdResult ¶
func (s *InsertionCommand) CmdResult() *api.Property
func (*InsertionCommand) Extras ¶
func (s *InsertionCommand) Extras() *api.CmdExtras
func (*InsertionCommand) Mutate ¶
func (*InsertionCommand) Mutate(ctx context.Context, cmd api.CmdID, g *api.GlobalState, b *builder.Builder, w api.StateWatcher) error
func (*InsertionCommand) SetCaller ¶
func (s *InsertionCommand) SetCaller(c api.CmdID)
func (*InsertionCommand) SetTerminated ¶
func (s *InsertionCommand) SetTerminated(bool)
func (*InsertionCommand) SetThread ¶
func (s *InsertionCommand) SetThread(c uint64)
func (*InsertionCommand) Terminated ¶
func (s *InsertionCommand) Terminated() bool
func (*InsertionCommand) Thread ¶
func (s *InsertionCommand) Thread() uint64
type MarkerType ¶
type MarkerType int
type SemaphoreState ¶
type SemaphoreState struct {
// contains filtered or unexported fields
}
type VulkanContext ¶
type VulkanContext struct{}
func (VulkanContext) ID ¶
func (VulkanContext) ID() api.ContextID
ID returns the context's unique identifier.
func (VulkanContext) Name ¶
func (VulkanContext) Name() string
Name returns the display-name of the context.
type VulkanTerminator ¶
type VulkanTerminator struct {
// contains filtered or unexported fields
}
VulkanTerminator is very similar to EarlyTerminator. It has 2 additional properties.
- 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
- 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 commands will be in order.
func NewVulkanTerminator ¶
func (*VulkanTerminator) Add ¶
Add adds the command with identifier id to the set of commands that must be seen before the VulkanTerminator will consume all commands (excluding the EOS command).
func (*VulkanTerminator) BuffersCommands ¶
func (t *VulkanTerminator) BuffersCommands() bool
func (*VulkanTerminator) PostLoop ¶
func (t *VulkanTerminator) PostLoop(ctx context.Context, output transform.Writer)
type WaitForPerfetto ¶
type WaitForPerfetto struct {
// contains filtered or unexported fields
}
func NewWaitForPerfetto ¶
func NewWaitForPerfetto(traceOptions *service.TraceOptions, h *replay.SignalHandler, buffer *bytes.Buffer, cmdId api.CmdID) *WaitForPerfetto
func (*WaitForPerfetto) BuffersCommands ¶
func (t *WaitForPerfetto) BuffersCommands() bool
func (*WaitForPerfetto) PostLoop ¶
func (t *WaitForPerfetto) PostLoop(ctx context.Context, out transform.Writer)
Source Files ¶
- command_buffer_rebuilder.go
- command_splitter.go
- custom_replay.go
- doc.go
- drawCall.go
- draw_call_mesh.go
- external_memory.go
- externs.go
- extras.go
- find_issues.go
- frame_loop.go
- graph_visualization.go
- image_primer.go
- image_primer_device_copy.go
- image_primer_host_copy.go
- image_primer_render.go
- image_primer_resources.go
- image_primer_shaders.go
- image_primer_store.go
- links.go
- mem_binding_list.go
- memory_breakdown.go
- overdraw.go
- primeable_image_data.go
- profiling_layers.go
- query_timestamps.go
- queue_task.go
- read_framebuffer.go
- replay.go
- resources.go
- scratch_resources.go
- state.go
- state_rebuilder.go
- vulkan.go
- vulkan_terminator.go
- wait_for_perfetto.go
- wireframe.go