vulkan
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_line_rasterization

Description

Name

VK_EXT_line_rasterization - device extension

VK_EXT_line_rasterization

Name String
VK_EXT_line_rasterization
Extension Type
Device extension
Registered Extension Number
260
Revision
1
Ratification Status
Not ratified
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or Vulkan Version 1.1
Deprecation State
Special Use
Contact

Other Extension Metadata

Last Modified Date
2019-05-09
IP Status
No known IP claims.
Contributors
  • Jeff Bolz, NVIDIA
  • Allen Jensen, NVIDIA
  • Faith Ekstrand, Intel

Description

This extension adds some line rasterization features that are commonly used in CAD applications and supported in other APIs like OpenGL. Bresenham-style line rasterization is supported, smooth rectangular lines (coverage to alpha) are supported, and stippled lines are supported for all three line rasterization modes.

Promotion to VK_KHR_line_rasterization

All functionality in this extension is included in VK_KHR_line_rasterization, with the suffix changed to KHR. The original enum names are still available as aliases of the KHR functionality.

New Commands

New Structures

New Enums

New Enum Constants

Issues

1) Do we need to support Bresenham-style and smooth lines with more than one rasterization sample? i.e. the equivalent of glDisable(GL_MULTISAMPLE) in OpenGL when the framebuffer has more than one sample?

RESOLVED: Yes. For simplicity, Bresenham line rasterization carries forward a few restrictions from OpenGL, such as not supporting per-sample shading, alpha to coverage, or alpha to one.

Version History

  • Revision 1, 2019-05-09 (Jeff Bolz)

    • Initial draft

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

cmdSetLineStippleEXT :: MonadIO io => CommandBuffer -> ("lineStippleFactor" ::: Word32) -> ("lineStipplePattern" ::: Word16) -> io () Source #

type EXT_LINE_RASTERIZATION_EXTENSION_NAME = "VK_EXT_line_rasterization" Source #

pattern EXT_LINE_RASTERIZATION_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

data PhysicalDeviceLineRasterizationFeaturesKHR Source #

VkPhysicalDeviceLineRasterizationFeaturesKHR - Structure describing the line rasterization features that can be supported by an implementation

Members

This structure describes the following features:

Description

If the PhysicalDeviceLineRasterizationFeaturesKHR structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. PhysicalDeviceLineRasterizationFeaturesKHR can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_KHR_line_rasterization, Bool32, StructureType

Constructors

PhysicalDeviceLineRasterizationFeaturesKHR 

Fields

Instances

Instances details
Storable PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Show PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Eq PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

FromCStruct PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

ToCStruct PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Zero PhysicalDeviceLineRasterizationFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

data PhysicalDeviceLineRasterizationPropertiesKHR Source #

VkPhysicalDeviceLineRasterizationPropertiesKHR - Structure describing line rasterization properties supported by an implementation

Description

If the PhysicalDeviceLineRasterizationPropertiesKHR structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_EXT_line_rasterization, VK_KHR_line_rasterization, StructureType

Constructors

PhysicalDeviceLineRasterizationPropertiesKHR 

Fields

Instances

Instances details
Storable PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Show PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Eq PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

FromCStruct PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

ToCStruct PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Zero PhysicalDeviceLineRasterizationPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

data PipelineRasterizationLineStateCreateInfoKHR Source #

VkPipelineRasterizationLineStateCreateInfoKHR - Structure specifying parameters of a newly created pipeline line rasterization state

Description

If stippledLineEnable is FALSE, the values of lineStippleFactor and lineStipplePattern are ignored.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_line_rasterization, VK_KHR_line_rasterization, Bool32, LineRasterizationModeKHR, StructureType

Constructors

PipelineRasterizationLineStateCreateInfoKHR 

Fields

Instances

Instances details
Storable PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Show PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Eq PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

FromCStruct PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

ToCStruct PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Zero PipelineRasterizationLineStateCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

cmdSetLineStippleKHR Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> ("lineStippleFactor" ::: Word32)

lineStippleFactor is the repeat factor used in stippled line rasterization.

-> ("lineStipplePattern" ::: Word16)

lineStipplePattern is the bit pattern used in stippled line rasterization.

-> io () 

vkCmdSetLineStippleKHR - Set line stipple dynamically for a command buffer

Description

This command sets the line stipple state for subsequent drawing commands when drawing using shader objects, or when the graphics pipeline is created with DYNAMIC_STATE_LINE_STIPPLE_EXT set in PipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, this state is specified by the PipelineRasterizationLineStateCreateInfoKHR::lineStippleFactor and PipelineRasterizationLineStateCreateInfoKHR::lineStipplePattern values used to create the currently active pipeline.

Valid Usage

  • lineStippleFactor must be in the range [1,256]

Valid Usage (Implicit)

  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support graphics operations
  • This command must only be called outside of a video coding scope

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryBoth Outside Graphics State

See Also

VK_EXT_line_rasterization, VK_KHR_line_rasterization, CommandBuffer

newtype LineRasterizationModeKHR Source #

Bundled Patterns

pattern LINE_RASTERIZATION_MODE_DEFAULT_KHR :: LineRasterizationModeKHR

LINE_RASTERIZATION_MODE_DEFAULT_KHR is equivalent to LINE_RASTERIZATION_MODE_RECTANGULAR_KHR if PhysicalDeviceLimits::strictLines is TRUE, otherwise lines are drawn as non-strictLines parallelograms. Both of these modes are defined in Basic Line Segment Rasterization.

pattern LINE_RASTERIZATION_MODE_RECTANGULAR_KHR :: LineRasterizationModeKHR

LINE_RASTERIZATION_MODE_RECTANGULAR_KHR specifies lines drawn as if they were rectangles extruded from the line

pattern LINE_RASTERIZATION_MODE_BRESENHAM_KHR :: LineRasterizationModeKHR

LINE_RASTERIZATION_MODE_BRESENHAM_KHR specifies lines drawn by determining which pixel diamonds the line intersects and exits, as defined in Bresenham Line Segment Rasterization.

pattern LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR :: LineRasterizationModeKHR

LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR specifies lines drawn if they were rectangles extruded from the line, with alpha falloff, as defined in Smooth Lines.

Instances

Instances details
Storable LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Read LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Show LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Eq LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Ord LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization

Zero LineRasterizationModeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_line_rasterization