Documentation
¶
Index ¶
- Constants
- type AttachmentDescription2
- type AttachmentReference2
- type Extension
- type RenderPassCreateInfo2
- type SubpassBeginInfo
- type SubpassDependency2
- type SubpassDescription2
- type SubpassEndInfo
- type VulkanExtension
- func (e *VulkanExtension) CmdBeginRenderPass2(commandBuffer core1_0.CommandBuffer, ...) error
- func (e *VulkanExtension) CmdEndRenderPass2(commandBuffer core1_0.CommandBuffer, subpassEnd SubpassEndInfo) error
- func (e *VulkanExtension) CmdNextSubpass2(commandBuffer core1_0.CommandBuffer, subpassBegin SubpassBeginInfo, ...) error
- func (e *VulkanExtension) CreateRenderPass2(device core1_0.Device, allocator *driver.AllocationCallbacks, ...) (core1_0.RenderPass, common.VkResult, error)
Constants ¶
const ( // ExtensionName is "VK_KHR_create_renderpass2" // // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_create_renderpass2.html ExtensionName string = C.VK_KHR_CREATE_RENDERPASS_2_EXTENSION_NAME )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachmentDescription2 ¶
type AttachmentDescription2 struct {
// Flags specifies additional properties of the attachment
Flags core1_0.AttachmentDescriptionFlags
// Format specifies the format of the Image that will be used for the attachment
Format core1_0.Format
// Samples specifies the number of samples of the Image
Samples core1_0.SampleCountFlags
// LoadOp specifies how the contents of color and depth components of the attachment
// are treated at the beginning of the subpass where it is first used
LoadOp core1_0.AttachmentLoadOp
// StoreOp specifies how the contents of color and depth components of the attachment
// are treated at the end of the subpass where it is last used
StoreOp core1_0.AttachmentStoreOp
// StencilLoadOp specifies how the contents of stencil components of the attachment
// are treated at the beginning of the subpass where it is first used
StencilLoadOp core1_0.AttachmentLoadOp
// StencilStoreOp specifies how the contents of the stencil components of the attachment
// are treated at the end of the last subpass where it is used
StencilStoreOp core1_0.AttachmentStoreOp
// InitialLayout is the layout of the attachment Image subresource will be in when
// a RenderPass instance begins
InitialLayout core1_0.ImageLayout
// FinalLayout is the layout the attachment Image subresource will be transitioned to
// when a RenderPass instance ends
FinalLayout core1_0.ImageLayout
common.NextOptions
}
AttachmentDescription2 specifies an attachment description
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkAttachmentDescription2.html
type AttachmentReference2 ¶
type AttachmentReference2 struct {
// Attachment identifies an attachment at the corresponding index in
// RenderPassCreateInfo2.Attachments, or core1_0.AttachmentUnused
Attachment int
// Layout specifies the layout the attachment uses during the subpass
Layout core1_0.ImageLayout
// AspectMask is a mask of which aspect(s) can be accessed within the specified
// subpass as an input attachment
AspectMask core1_0.ImageAspectFlags
common.NextOptions
}
AttachmentReference2 specifies an attachment reference
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkAttachmentReference2.html
type Extension ¶
type Extension interface {
// CmdBeginRenderPass2 begins a new RenderPass
//
// commandBuffer - The CommandBuffer to begin the RenderPass in
//
// renderPassBegin - Specifies the RenderPass to begin an instance of, and the Framebuffer the instance
// uses
//
// subpassBegin - Contains information about the subpass which is about to begin rendering
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdBeginRenderPass2.html
CmdBeginRenderPass2(commandBuffer core1_0.CommandBuffer, renderPassBegin core1_0.RenderPassBeginInfo, subpassBegin SubpassBeginInfo) error
// CmdEndRenderPass2 ends the current RenderPass
//
// commandBuffer - The CommandBuffer to end the RenderPass in
//
// subpassEnd - Contains information about how the previous subpass will be ended
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdEndRenderPass2.html
CmdEndRenderPass2(commandBuffer core1_0.CommandBuffer, subpassEnd SubpassEndInfo) error
// CmdNextSubpass2 transitions to the next subpass of a RenderPass
//
// commandBuffer - The CommandBuffer to end the RenderPass in
//
// subpassBegin - Contains information about the subpass which is about to begin rendering.
//
// subpassEnd - Contains information about how the previous subpass will be ended.
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCmdNextSubpass2.html
CmdNextSubpass2(commandBuffer core1_0.CommandBuffer, subpassBegin SubpassBeginInfo, subpassEnd SubpassEndInfo) error
// CreateRenderPass2 creates a new RenderPass object
//
// device - The Device to create the RenderPass from
//
// allocator - Controls host memory allocation behavior
//
// options - Describes the parameters of the RenderPass
//
// https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/vkCreateRenderPass2.html
CreateRenderPass2(device core1_0.Device, allocator *driver.AllocationCallbacks, options RenderPassCreateInfo2) (core1_0.RenderPass, common.VkResult, error)
}
Extension contains all the commands for the khr_create_renderpass2 extension
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_create_renderpass2.html
type RenderPassCreateInfo2 ¶
type RenderPassCreateInfo2 struct {
// Flags is reserved for future use
Flags core1_0.RenderPassCreateFlags
// Attachments is a slice of AttachmentDescription2 structures describing the attachments
// used by the RenderPass
Attachments []AttachmentDescription2
// Subpasses is a slice of SubpassDescription2 structures describing each subpass
Subpasses []SubpassDescription2
// Dependencies is a slice of SubpassDependency2 structures describing dependencies
// between pairs of subpasses
Dependencies []SubpassDependency2
// more efficient to render concurrently
CorrelatedViewMasks []uint32
common.NextOptions
}
RenderPassCreateInfo2 specifies parameters of a newly-created RenderPass
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkRenderPassCreateInfo2.html
type SubpassBeginInfo ¶
type SubpassBeginInfo struct {
// Contents specifies how the commands in the next subpass will be provided
Contents core1_0.SubpassContents
common.NextOptions
}
SubpassBeginInfo specifies subpass begin information
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassBeginInfoKHR.html
type SubpassDependency2 ¶
type SubpassDependency2 struct {
// SrcSubpass is the subpass index of the first subpass in the dependency, or
// core1_0.SubpassExternal
SrcSubpass int
// DstSubpass is the subpass index of the second subpass in the dependency, or
// core1_0.SubpassExternal
DstSubpass int
// SrcStageMask specifies the source stage mask
SrcStageMask core1_0.PipelineStageFlags
// DstStageMask specifies the destination stage mask
DstStageMask core1_0.PipelineStageFlags
// SrcAccessMask specifies a source access mask
SrcAccessMask core1_0.AccessFlags
// DstAccessMask specifies a source access mask
DstAccessMask core1_0.AccessFlags
// DependencyFlags is a set of dependency flags
DependencyFlags core1_0.DependencyFlags
// ViewOffset controls which views in the source subpass the views in the destination
// subpass depend on
ViewOffset int
common.NextOptions
}
SubpassDependency2 specifies a subpass dependency
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassDependency2.html
type SubpassDescription2 ¶
type SubpassDescription2 struct {
// Flags specifies usage of the subpass
Flags core1_0.SubpassDescriptionFlags
// PipelineBindPoint specifies the Pipeline type supported for this subpass
PipelineBindPoint core1_0.PipelineBindPoint
// ViewMask describes which views rendering is broadcast to in this subpass, when
// multiview is enabled
ViewMask uint32
// InputAttachments is a slice of AttachmentReference2 structures defining the input
// attachments for this subpass and their layouts
InputAttachments []AttachmentReference2
// ColorAttachments is a slice of AttachmentReference2 structures defining the color
// attachments for this subpass and their layouts
ColorAttachments []AttachmentReference2
// ResolveAttachments is a slice of AttachmentReference2 structures defining the resolve
// attachments for this subpass and their layouts
ResolveAttachments []AttachmentReference2
// DepthStencilAttachment specifies the depth/stencil attachment for this subpass and
// its layout
DepthStencilAttachment *AttachmentReference2
// PreserveAttachments is a slice of RenderPass attachment indices identifying attachments
// that are not used by this subpass, but whose contents must be preserved throughout the
// subpass
PreserveAttachments []int
common.NextOptions
}
SubpassDescription2 specifies a subpass description
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassDescription2.html
type SubpassEndInfo ¶
type SubpassEndInfo struct {
common.NextOptions
}
SubpassEndInfo specifies subpass end information
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassEndInfo.html
type VulkanExtension ¶
type VulkanExtension struct {
// contains filtered or unexported fields
}
VulkanExtension is an implementation of the Extension interface that actually communicates with Vulkan. This is the default implementation. See the interface for more documentation.
func CreateExtensionFromDevice ¶
func CreateExtensionFromDevice(device core1_0.Device) *VulkanExtension
CreateExtensionFromDevice produces an Extension object from a Device with khr_create_renderpass2 loaded
func CreateExtensionFromDriver ¶
func CreateExtensionFromDriver(driver khr_create_renderpass2_driver.Driver) *VulkanExtension
CreateExtensionFromDriver generates an Extension from a driver.Driver object- this is usually used in tests to build an Extension from mock drivers
func (*VulkanExtension) CmdBeginRenderPass2 ¶
func (e *VulkanExtension) CmdBeginRenderPass2(commandBuffer core1_0.CommandBuffer, renderPassBegin core1_0.RenderPassBeginInfo, subpassBegin SubpassBeginInfo) error
func (*VulkanExtension) CmdEndRenderPass2 ¶
func (e *VulkanExtension) CmdEndRenderPass2(commandBuffer core1_0.CommandBuffer, subpassEnd SubpassEndInfo) error
func (*VulkanExtension) CmdNextSubpass2 ¶
func (e *VulkanExtension) CmdNextSubpass2(commandBuffer core1_0.CommandBuffer, subpassBegin SubpassBeginInfo, subpassEnd SubpassEndInfo) error
func (*VulkanExtension) CreateRenderPass2 ¶
func (e *VulkanExtension) CreateRenderPass2(device core1_0.Device, allocator *driver.AllocationCallbacks, options RenderPassCreateInfo2) (core1_0.RenderPass, common.VkResult, error)