vulkan-3.8.1: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Description

Name

VK_KHR_ray_tracing_pipeline - device extension

VK_KHR_ray_tracing_pipeline

Name String
VK_KHR_ray_tracing_pipeline
Extension Type
Device extension
Registered Extension Number
348
Revision
1
Extension and Version Dependencies
  • Requires Vulkan 1.1
  • Requires VK_KHR_spirv_1_4
  • Requires VK_KHR_acceleration_structure
Contact

Other Extension Metadata

Last Modified Date
2020-11-12
Interactions and External Dependencies
Contributors
  • Matthäus Chajdas, AMD
  • Greg Grebe, AMD
  • Nicolai Hähnle, AMD
  • Tobias Hector, AMD
  • Dave Oldcorn, AMD
  • Skyler Saleh, AMD
  • Mathieu Robart, Arm
  • Marius Bjorge, Arm
  • Tom Olson, Arm
  • Sebastian Tafuri, EA
  • Henrik Rydgard, Embark
  • Juan Cañada, Epic Games
  • Patrick Kelly, Epic Games
  • Yuriy O’Donnell, Epic Games
  • Michael Doggett, Facebook/Oculus
  • Andrew Garrard, Imagination
  • Don Scorgie, Imagination
  • Dae Kim, Imagination
  • Joshua Barczak, Intel
  • Slawek Grajewski, Intel
  • Jeff Bolz, NVIDIA
  • Pascal Gautron, NVIDIA
  • Daniel Koch, NVIDIA
  • Christoph Kubisch, NVIDIA
  • Ashwin Lele, NVIDIA
  • Robert Stepinski, NVIDIA
  • Martin Stich, NVIDIA
  • Nuno Subtil, NVIDIA
  • Eric Werness, NVIDIA
  • Jon Leech, Khronos
  • Jeroen van Schijndel, OTOY
  • Juul Joosten, OTOY
  • Alex Bourd, Qualcomm
  • Roman Larionov, Qualcomm
  • David McAllister, Qualcomm
  • Spencer Fricke, Samsung
  • Lewis Gordon, Samsung
  • Ralph Potter, Samsung
  • Jasper Bekkers, Traverse Research
  • Jesse Barker, Unity
  • Baldur Karlsson, Valve

Description

Rasterization has been the dominant method to produce interactive graphics, but increasing performance of graphics hardware has made ray tracing a viable option for interactive rendering. Being able to integrate ray tracing with traditional rasterization makes it easier for applications to incrementally add ray traced effects to existing applications or to do hybrid approaches with rasterization for primary visibility and ray tracing for secondary queries.

To enable ray tracing, this extension adds a few different categories of new functionality:

  • A new ray tracing pipeline type with new shader domains: ray generation, intersection, any-hit, closest hit, miss, and callable
  • A shader binding indirection table to link shader groups with acceleration structure items
  • Trace ray commands which initiates the ray pipeline traversal and invocation of the various new shader domains depending on which traversal conditions are met

This extension adds support for the following SPIR-V extension in Vulkan:

  • SPV_KHR_ray_tracing

New Commands

New Structures

New Enums

New Enum Constants

New or Modified Built-In Variables

New SPIR-V Capabilities

Issues

  1. How does this extension differ from VK_NV_ray_tracing?

DISCUSSION:

The following is a summary of the main functional differences between VK_KHR_ray_tracing_pipeline and VK_NV_ray_tracing:

  • added support for indirect ray tracing (cmdTraceRaysIndirectKHR)
  • uses SPV_KHR_ray_tracing instead of SPV_NV_ray_tracing

    • refer to KHR SPIR-V enums instead of NV SPIR-V enums (which are functionally equivalent and aliased to the same values).
    • added RayGeometryIndexKHR built-in
  • removed vkCompileDeferredNV compilation functionality and replaced with deferred host operations interactions for ray tracing
  • added PhysicalDeviceRayTracingPipelineFeaturesKHR structure
  • extended PhysicalDeviceRayTracingPipelinePropertiesKHR structure

    • renamed maxRecursionDepth to maxRayRecursionDepth and it has a minimum of 1 instead of 31
    • require shaderGroupHandleSize to be 32 bytes
    • added maxRayDispatchInvocationCount, shaderGroupHandleAlignment and maxRayHitAttributeSize
  • reworked geometry structures so they could be better shared between device, host, and indirect builds
  • changed SBT parameters to a structure and added size (StridedDeviceAddressRegionKHR)
  • add parameter for requesting memory requirements for host and/or device build
  • added pipeline library support for ray tracing
  • added watertightness guarantees
  • added no-null-shader pipeline flags (VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_*_SHADERS_BIT_KHR)
  • added memory model interactions with ray tracing and define how subgroups work and can be repacked
  1. Can you give a more detailed comparision of differences and similarities between VK_NV_ray_tracing and VK_KHR_ray_tracing_pipeline?

DISCUSSION:

The following is a more detailed comparision of which commands, structures, and enums are aliased, changed, or removed.

  1. What are the changes between the public provisional (VK_KHR_ray_tracing v8) release and the internal provisional (VK_KHR_ray_tracing v9) release?
  1. What are the changes between the internal provisional (VK_KHR_ray_tracing v9) release and the final (VK_KHR_acceleration_structure v11 / VK_KHR_ray_tracing_pipeline v1) release?
  • refactor VK_KHR_ray_tracing into 3 extensions, enabling implementation flexibility and decoupling ray query support from ray pipelines:

  • Require Volatile for the following builtins in the ray generation, closest hit, miss, intersection, and callable shader stages:

    • SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask, SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, SubgroupLtMask
    • SMIDNV, WarpIDNV
  • clarify buffer usage flags for ray tracing

  • rename maxRecursionDepth to maxRayPipelineRecursionDepth (pipeline creation) and maxRayRecursionDepth (limit) to reduce confusion
  • Add queryable maxRayHitAttributeSize limit and rename members of RayTracingPipelineInterfaceCreateInfoKHR to maxPipelineRayPayloadSize and maxPipelineRayHitAttributeSize for clarity
  • Update SPIRV capabilities to use RayTracingKHR
  • extension is no longer provisional
  • define synchronization requirements for indirect trace rays and indirect buffer
  1. This extension adds gl_InstanceID for the intersection, any-hit, and closest hit shaders, but in KHR_vulkan_glsl, gl_InstanceID is replaced with gl_InstanceIndex. Which should be used for Vulkan in this extension?

RESOLVED: This extension uses gl_InstanceID and maps it to InstanceId in SPIR-V. It is acknowledged that this is different than other shader stages in Vulkan. There are two main reasons for the difference here:

  • symmetry with gl_PrimitiveID which is also available in these shaders
  • there is no "baseInstance" relevant for these shaders, and so ID makes it more obvious that this is zero-based.

Sample Code

Example ray generation GLSL shader

#version 450 core
#extension GL_EXT_ray_tracing : require
layout(set = 0, binding = 0, rgba8) uniform image2D image;
layout(set = 0, binding = 1) uniform accelerationStructureEXT as;
layout(location = 0) rayPayloadEXT float payload;

void main()
{
   vec4 col = vec4(0, 0, 0, 1);

   vec3 origin = vec3(float(gl_LaunchIDEXT.x)/float(gl_LaunchSizeEXT.x), float(gl_LaunchIDEXT.y)/float(gl_LaunchSizeEXT.y), 1.0);
   vec3 dir = vec3(0.0, 0.0, -1.0);

   traceRayEXT(as, 0, 0xff, 0, 1, 0, origin, 0.0, dir, 1000.0, 0);

   col.y = payload;

   imageStore(image, ivec2(gl_LaunchIDEXT.xy), col);
}

Version History

  • Revision 1, 2020-11-12 (Mathieu Robart, Daniel Koch, Eric Werness, Tobias Hector)

    • Decomposition of the specification, from VK_KHR_ray_tracing to VK_KHR_ray_tracing_pipeline (#1918,!3912)
    • require certain subgroup and sm_shader_builtin shader builtins to be decorated as volatile in the ray generation, closest hit, miss, intersection, and callable stages (#1924,!3903,!3954)
    • clarify buffer usage flags for ray tracing (#2181,!3939)
    • rename maxRecursionDepth to maxRayPipelineRecursionDepth and maxRayRecursionDepth (#2203,!3937)
    • add queriable maxRayHitAttributeSize and rename members of VkRayTracingPipelineInterfaceCreateInfoKHR (#2102,!3966)
    • update to use RayTracingKHR SPIR-V capability
    • add VUs for matching hit group type against geometry type (#2245,!3994)
    • require RayTMaxKHR be volatile in intersection shaders (#2268,!4030)
    • add numerical limits for ray parameters (#2235,!3960)
    • fix SBT indexing rules for device addresses (#2308,!4079)
    • relax formula for ray intersection candidate determination (#2322,!4080)
    • add more details on ShaderRecordBufferKHR variables (#2230,!4083)
    • clarify valid bits for InstanceCustomIndexKHR (GLSL/GLSL#19,!4128)
    • allow at most one IncomingRayPayloadKHR, IncomingCallableDataKHR, and HitAttributeKHR (!4129)
    • add minimum for maxShaderGroupStride (#2353,!4131)
    • require VK_KHR_pipeline_library extension to be supported (#2348,!4135)
    • clarify meaning of 'geometry index' (#2272,!4137)
    • restrict traces to TLAS (#2239,!4141)
    • add note about maxPipelineRayPayloadSize (#2383,!4172)
    • do not require raygen shader in pipeline libraries (!4185)
    • define sync for indirect trace rays and indirect buffer (#2407,!4208)

See Also

SHADER_UNUSED_KHR, PhysicalDeviceRayTracingPipelineFeaturesKHR, PhysicalDeviceRayTracingPipelinePropertiesKHR, RayTracingPipelineCreateInfoKHR, RayTracingPipelineInterfaceCreateInfoKHR, RayTracingShaderGroupCreateInfoKHR, RayTracingShaderGroupTypeKHR, ShaderGroupShaderKHR, StridedDeviceAddressRegionKHR, TraceRaysIndirectCommandKHR, cmdSetRayTracingPipelineStackSizeKHR, cmdTraceRaysIndirectKHR, cmdTraceRaysKHR, createRayTracingPipelinesKHR, getRayTracingCaptureReplayShaderGroupHandlesKHR, getRayTracingShaderGroupHandlesKHR, getRayTracingShaderGroupStackSizeKHR

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

cmdTraceRaysKHR Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pRaygenShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage.

-> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pMissShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage.

-> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pHitShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage.

-> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pCallableShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage.

-> ("width" ::: Word32)

width is the width of the ray trace query dimensions.

-> ("height" ::: Word32)

height is height of the ray trace query dimensions.

-> ("depth" ::: Word32)

depth is depth of the ray trace query dimensions.

-> io () 

vkCmdTraceRaysKHR - Initialize a ray tracing dispatch

Description

When the command is executed, a ray generation group of width × height × depth rays is assembled.

Valid Usage

Valid Usage (Implicit)

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 Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Outside Compute

See Also

CommandBuffer, StridedDeviceAddressRegionKHR

getRayTracingShaderGroupHandlesKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device containing the ray tracing pipeline.

-> Pipeline

pipeline is the ray tracing pipeline object containing the shaders.

-> ("firstGroup" ::: Word32)

firstGroup is the index of the first group to retrieve a handle for from the RayTracingPipelineCreateInfoKHR::pGroups or RayTracingPipelineCreateInfoNV::pGroups array.

-> ("groupCount" ::: Word32)

groupCount is the number of shader handles to retrieve.

-> ("dataSize" ::: Word64)

dataSize is the size in bytes of the buffer pointed to by pData.

-> ("data" ::: Ptr ())

pData is a pointer to a user-allocated buffer where the results will be written.

-> io () 

vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles

Valid Usage

  • pipeline must be a ray tracing pipeline

Valid Usage (Implicit)

  • device must be a valid Device handle
  • pipeline must be a valid Pipeline handle
  • pData must be a valid pointer to an array of dataSize bytes
  • dataSize must be greater than 0
  • pipeline must have been created, allocated, or retrieved from device

Return Codes

Success
Failure

See Also

Device, Pipeline

getRayTracingCaptureReplayShaderGroupHandlesKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device containing the ray tracing pipeline.

-> Pipeline

pipeline is the ray tracing pipeline object containing the shaders.

-> ("firstGroup" ::: Word32)

firstGroup is the index of the first group to retrieve a handle for from the RayTracingPipelineCreateInfoKHR::pGroups array.

-> ("groupCount" ::: Word32)

groupCount is the number of shader handles to retrieve.

-> ("dataSize" ::: Word64)

dataSize is the size in bytes of the buffer pointed to by pData.

-> ("data" ::: Ptr ())

pData is a pointer to a user-allocated buffer where the results will be written.

-> io () 

vkGetRayTracingCaptureReplayShaderGroupHandlesKHR - Query ray tracing capture replay pipeline shader group handles

Valid Usage

  • pipeline must be a ray tracing pipeline

Valid Usage (Implicit)

  • device must be a valid Device handle
  • pipeline must be a valid Pipeline handle
  • pData must be a valid pointer to an array of dataSize bytes
  • dataSize must be greater than 0
  • pipeline must have been created, allocated, or retrieved from device

Return Codes

Success
Failure

See Also

Device, Pipeline

createRayTracingPipelinesKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that creates the ray tracing pipelines.

-> DeferredOperationKHR

deferredOperation is an optional DeferredOperationKHR to request deferral for this command.

-> PipelineCache

pipelineCache is either NULL_HANDLE, indicating that pipeline caching is disabled, or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.

-> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR))

pCreateInfos is a pointer to an array of RayTracingPipelineCreateInfoKHR structures.

-> ("allocator" ::: Maybe AllocationCallbacks)

pAllocator controls host memory allocation as described in the Memory Allocation chapter.

-> io (Result, "pipelines" ::: Vector Pipeline) 

vkCreateRayTracingPipelinesKHR - Creates a new ray tracing pipeline object

Description

The ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS error is returned if the implementation is unable to re-use the shader group handles provided in RayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandle when PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplay is enabled.

Valid Usage

  • If the flags member of any element of pCreateInfos contains the PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that element

Valid Usage (Implicit)

  • device must be a valid Device handle
  • If deferredOperation is not NULL_HANDLE, deferredOperation must be a valid DeferredOperationKHR handle
  • If pipelineCache is not NULL_HANDLE, pipelineCache must be a valid PipelineCache handle
  • pCreateInfos must be a valid pointer to an array of createInfoCount valid RayTracingPipelineCreateInfoKHR structures
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
  • pPipelines must be a valid pointer to an array of createInfoCount Pipeline handles
  • createInfoCount must be greater than 0
  • If deferredOperation is a valid handle, it must have been created, allocated, or retrieved from device
  • If pipelineCache is a valid handle, it must have been created, allocated, or retrieved from device

Return Codes

Success
Failure

See Also

AllocationCallbacks, DeferredOperationKHR, Device, Pipeline, PipelineCache, RayTracingPipelineCreateInfoKHR

withRayTracingPipelinesKHR :: forall io r. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoKHR) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r Source #

A convenience wrapper to make a compatible pair of calls to createRayTracingPipelinesKHR and destroyPipeline

To ensure that destroyPipeline is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

cmdTraceRaysIndirectKHR Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pRaygenShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the ray generation shader stage.

-> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pMissShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the miss shader stage.

-> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pHitShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the hit shader stage.

-> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR)

pCallableShaderBindingTable is a StridedDeviceAddressRegionKHR that holds the shader binding table data for the callable shader stage.

-> ("indirectDeviceAddress" ::: DeviceAddress)

indirectDeviceAddress is a buffer device address which points to a TraceRaysIndirectCommandKHR structure which contains the trace ray parameters.

-> io () 

vkCmdTraceRaysIndirectKHR - Initialize an indirect ray tracing dispatch

Description

cmdTraceRaysIndirectKHR behaves similarly to cmdTraceRaysKHR except that the ray trace query dimensions are read by the device from indirectDeviceAddress during execution.

Valid Usage

Valid Usage (Implicit)

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 Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Outside Compute

See Also

CommandBuffer, DeviceAddress, StridedDeviceAddressRegionKHR

getRayTracingShaderGroupStackSizeKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device containing the ray tracing pipeline.

-> Pipeline

pipeline is the ray tracing pipeline object containing the shaders groups.

-> ("group" ::: Word32)

group is the index of the shader group to query.

-> ShaderGroupShaderKHR

groupShader is the type of shader from the group to query.

-> io DeviceSize 

vkGetRayTracingShaderGroupStackSizeKHR - Query ray tracing pipeline shader group shader stack size

Description

The return value is the ray tracing pipeline stack size in bytes for the specified shader as called from the specified shader group.

Valid Usage

  • pipeline must be a ray tracing pipeline
  • The value of group must be less than the number of shader groups in pipeline
  • The shader identified by groupShader in group must not be SHADER_UNUSED_KHR

Valid Usage (Implicit)

  • device must be a valid Device handle
  • pipeline must be a valid Pipeline handle
  • groupShader must be a valid ShaderGroupShaderKHR value
  • pipeline must have been created, allocated, or retrieved from device

See Also

Device, Pipeline, ShaderGroupShaderKHR

cmdSetRayTracingPipelineStackSizeKHR Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("pipelineStackSize" ::: Word32)

pipelineStackSize is the stack size to use for subsequent ray tracing trace commands.

-> io () 

vkCmdSetRayTracingPipelineStackSizeKHR - Set the dynamic stack size for a ray tracing pipeline

Description

See Ray Tracing Pipeline Stack for more on computing pipelineStackSize.

Valid Usage

  • pipelineStackSize must be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call

Valid Usage (Implicit)

  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support compute operations
  • This command must only be called outside of a render pass instance

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 Levels Render Pass Scope Supported Queue Types Pipeline Type
Primary Secondary Outside Compute

See Also

CommandBuffer

data RayTracingShaderGroupCreateInfoKHR Source #

VkRayTracingShaderGroupCreateInfoKHR - Structure specifying shaders in a shader group

Valid Usage

Valid Usage (Implicit)

See Also

RayTracingPipelineCreateInfoKHR, RayTracingShaderGroupTypeKHR, StructureType

Constructors

RayTracingShaderGroupCreateInfoKHR 

Fields

Instances

Instances details
Show RayTracingShaderGroupCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable RayTracingShaderGroupCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct RayTracingShaderGroupCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct RayTracingShaderGroupCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero RayTracingShaderGroupCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data RayTracingPipelineCreateInfoKHR (es :: [Type]) Source #

VkRayTracingPipelineCreateInfoKHR - Structure specifying parameters of a newly created ray tracing pipeline

Description

The parameters basePipelineHandle and basePipelineIndex are described in more detail in Pipeline Derivatives.

When PIPELINE_CREATE_LIBRARY_BIT_KHR is specified, this pipeline defines a pipeline library which cannot be bound as a ray tracing pipeline directly. Instead, pipeline libraries define common shaders and shader groups which can be included in future pipeline creation.

If pipeline libraries are included in pLibraryInfo, shaders defined in those libraries are treated as if they were defined as additional entries in pStages, appended in the order they appear in the pLibraries array and in the pStages array when those libraries were defined.

When referencing shader groups in order to obtain a shader group handle, groups defined in those libraries are treated as if they were defined as additional entries in pGroups, appended in the order they appear in the pLibraries array and in the pGroups array when those libraries were defined. The shaders these groups reference are set when the pipeline library is created, referencing those specified in the pipeline library, not in the pipeline that includes it.

The default stack size for a pipeline if DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR is not provided is computed as described in Ray Tracing Pipeline Stack.

Valid Usage

Valid Usage (Implicit)

See Also

Pipeline, PipelineCreateFlags, PipelineDynamicStateCreateInfo, PipelineLayout, PipelineLibraryCreateInfoKHR, PipelineShaderStageCreateInfo, RayTracingPipelineInterfaceCreateInfoKHR, RayTracingShaderGroupCreateInfoKHR, StructureType, createRayTracingPipelinesKHR

Constructors

RayTracingPipelineCreateInfoKHR 

Fields

Instances

Instances details
Extensible RayTracingPipelineCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show (Chain es) => Show (RayTracingPipelineCreateInfoKHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

(Extendss RayTracingPipelineCreateInfoKHR es, PeekChain es) => FromCStruct (RayTracingPipelineCreateInfoKHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

(Extendss RayTracingPipelineCreateInfoKHR es, PokeChain es) => ToCStruct (RayTracingPipelineCreateInfoKHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

es ~ ('[] :: [Type]) => Zero (RayTracingPipelineCreateInfoKHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data PhysicalDeviceRayTracingPipelineFeaturesKHR Source #

VkPhysicalDeviceRayTracingPipelineFeaturesKHR - Structure describing the ray tracing features that can be supported by an implementation

Members

The members of the PhysicalDeviceRayTracingPipelineFeaturesKHR structure describe the following features:

Description

  • rayTracingPipeline indicates whether the implementation supports the ray tracing pipeline functionality. See Ray Tracing.
  • rayTracingPipelineShaderGroupHandleCaptureReplay indicates whether the implementation supports saving and reusing shader group handles, e.g. for trace capture and replay.
  • rayTracingPipelineShaderGroupHandleCaptureReplayMixed indicates whether the implementation supports reuse of shader group handles being arbitrarily mixed with creation of non-reused shader group handles. If this is FALSE, all reused shader group handles must be specified before any non-reused handles may be created.
  • rayTracingPipelineTraceRaysIndirect indicates whether the implementation supports indirect trace ray commands, e.g. cmdTraceRaysIndirectKHR.
  • rayTraversalPrimitiveCulling indicates whether the implementation supports primitive culling during ray traversal.

If the PhysicalDeviceRayTracingPipelineFeaturesKHR structure is included in the pNext chain of PhysicalDeviceFeatures2, it is filled with values indicating whether the feature is supported. PhysicalDeviceRayTracingPipelineFeaturesKHR can also be used in the pNext chain of DeviceCreateInfo to enable the features.

Valid Usage

  • If rayTracingPipelineShaderGroupHandleCaptureReplayMixed is TRUE, rayTracingPipelineShaderGroupHandleCaptureReplay must also be TRUE

Valid Usage (Implicit)

See Also

Bool32, StructureType

Instances

Instances details
Eq PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero PhysicalDeviceRayTracingPipelineFeaturesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data PhysicalDeviceRayTracingPipelinePropertiesKHR Source #

VkPhysicalDeviceRayTracingPipelinePropertiesKHR - Properties of the physical device for ray tracing

Description

If the PhysicalDeviceRayTracingPipelinePropertiesKHR structure is included in the pNext chain of PhysicalDeviceProperties2, it is filled with the implementation-dependent limits.

Limits specified by this structure must match those specified with the same name in PhysicalDeviceRayTracingPropertiesNV.

Valid Usage (Implicit)

See Also

StructureType

Constructors

PhysicalDeviceRayTracingPipelinePropertiesKHR 

Fields

Instances

Instances details
Eq PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero PhysicalDeviceRayTracingPipelinePropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data StridedDeviceAddressRegionKHR Source #

VkStridedDeviceAddressRegionKHR - Structure specifying a region of device addresses with a stride

Valid Usage

  • If deviceAddress is not zero, all addresses between deviceAddress and deviceAddress + size - 1 must be in the buffer device address range of the same buffer
  • If deviceAddress is not zero, stride must be less than the size of the buffer from which deviceAddress was queried

See Also

DeviceAddress, DeviceSize, cmdTraceRaysIndirectKHR, cmdTraceRaysKHR

Constructors

StridedDeviceAddressRegionKHR 

Fields

Instances

Instances details
Eq StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero StridedDeviceAddressRegionKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data TraceRaysIndirectCommandKHR Source #

VkTraceRaysIndirectCommandKHR - Structure specifying the parameters of an indirect trace ray command

Description

The members of TraceRaysIndirectCommandKHR have the same meaning as the similarly named parameters of cmdTraceRaysKHR.

Valid Usage

See Also

No cross-references are available

Constructors

TraceRaysIndirectCommandKHR 

Fields

Instances

Instances details
Eq TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero TraceRaysIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

data RayTracingPipelineInterfaceCreateInfoKHR Source #

VkRayTracingPipelineInterfaceCreateInfoKHR - Structure specifying additional interface information when using libraries

Description

maxPipelineRayPayloadSize is calculated as the maximum number of bytes used by any block declared in the RayPayloadKHR or IncomingRayPayloadKHR storage classes. maxPipelineRayHitAttributeSize is calculated as the maximum number of bytes used by any block declared in the HitAttributeKHR storage class. As variables in these storage classes do not have explicit offsets, the size should be calculated as if each variable has a scalar alignment equal to the largest scalar alignment of any of the block’s members.

Note

There is no explicit upper limit for maxPipelineRayPayloadSize, but in practice it should be kept as small as possible. Similar to invocation local memory, it must be allocated for each shader invocation and for devices which support many simultaneous invocations, this storage can rapidly be exhausted, resulting in failure.

Valid Usage (Implicit)

See Also

RayTracingPipelineCreateInfoKHR, StructureType

Constructors

RayTracingPipelineInterfaceCreateInfoKHR 

Fields

Instances

Instances details
Eq RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

FromCStruct RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

ToCStruct RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero RayTracingPipelineInterfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

newtype RayTracingShaderGroupTypeKHR Source #

VkRayTracingShaderGroupTypeKHR - Shader group types

Description

Note

For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.

See Also

RayTracingShaderGroupCreateInfoKHR, RayTracingShaderGroupCreateInfoNV

Bundled Patterns

pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR

RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR indicates a shader group with a single SHADER_STAGE_RAYGEN_BIT_KHR, SHADER_STAGE_MISS_BIT_KHR, or SHADER_STAGE_CALLABLE_BIT_KHR shader in it.

pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR

RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR specifies a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit shaders.

pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR

RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR specifies a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.

Instances

Instances details
Eq RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Ord RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Read RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero RayTracingShaderGroupTypeKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

newtype ShaderGroupShaderKHR Source #

VkShaderGroupShaderKHR - Shader group shaders

See Also

getRayTracingShaderGroupStackSizeKHR

Instances

Instances details
Eq ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Ord ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Read ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Show ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Storable ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

Zero ShaderGroupShaderKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_ray_tracing_pipeline

type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline" Source #

newtype DeferredOperationKHR Source #

Instances

Instances details
Eq DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Storable DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

HasObjectType DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

IsHandle DeferredOperationKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

data PipelineLibraryCreateInfoKHR Source #

VkPipelineLibraryCreateInfoKHR - Structure specifying pipeline libraries to use when creating a pipeline

Valid Usage

Valid Usage (Implicit)

  • pNext must be NULL
  • If libraryCount is not 0, pLibraries must be a valid pointer to an array of libraryCount valid Pipeline handles

See Also

Pipeline, RayTracingPipelineCreateInfoKHR, StructureType

Constructors

PipelineLibraryCreateInfoKHR 

Fields

type SHADER_UNUSED_KHR = 4294967295 Source #