| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_spirv_1_4 and VK_KHR_acceleration_structure
- Contact
Other Extension Metadata
- Last Modified Date
- 2020-11-12
- Interactions and External Dependencies
- This extension requires SPV_KHR_ray_tracing
- This extension provides API support for GLSL_EXT_ray_tracing
- This extension interacts with
Vulkan 1.2
and
VK_KHR_vulkan_memory_model, adding the shader-call-related relation of invocations, shader-call-order partial order of dynamic instances of instructions, and the ShaderCallKHR scope. - This extension interacts with
VK_KHR_pipeline_library, enabling pipeline libraries to be used with ray tracing pipelines and enabling usage ofRayTracingPipelineInterfaceCreateInfoKHR.
- 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
- Ray tracing commands which initiate 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
cmdTraceRaysIndirectKHRcmdTraceRaysKHRcreateRayTracingPipelinesKHRgetRayTracingCaptureReplayShaderGroupHandlesKHRgetRayTracingShaderGroupHandlesKHRgetRayTracingShaderGroupStackSizeKHR
New Structures
RayTracingPipelineInterfaceCreateInfoKHRRayTracingShaderGroupCreateInfoKHRStridedDeviceAddressRegionKHRTraceRaysIndirectCommandKHRExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
New Enum Constants
KHR_RAY_TRACING_PIPELINE_SPEC_VERSIONSHADER_UNUSED_KHRExtending
BufferUsageFlagBits:Extending
DynamicState:Extending
PipelineBindPoint:Extending
PipelineCreateFlagBits:PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
Extending
PipelineStageFlagBits:Extending
ShaderStageFlagBits:Extending
StructureType:
New or Modified Built-In Variables
- LaunchSizeKHR
- WorldRayOriginKHR
- WorldRayDirectionKHR
- ObjectRayOriginKHR
- ObjectRayDirectionKHR
- RayTminKHR
- RayTmaxKHR
- InstanceCustomIndexKHR
- InstanceId
- ObjectToWorldKHR
- WorldToObjectKHR
- HitKindKHR
- IncomingRayFlagsKHR
- RayGeometryIndexKHR
- (modified)
PrimitiveId
New SPIR-V Capabilities
Issues
- 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
RayGeometryIndexKHRbuilt-in
- removed vkCompileDeferredNV compilation functionality and replaced with deferred host operations interactions for ray tracing
- added
PhysicalDeviceRayTracingPipelineFeaturesKHRstructure extended
PhysicalDeviceRayTracingPipelinePropertiesKHRstructure- renamed
maxRecursionDepthtomaxRayRecursionDepthand it has a minimum of 1 instead of 31 - require
shaderGroupHandleSizeto be 32 bytes - added
maxRayDispatchInvocationCount,shaderGroupHandleAlignmentandmaxRayHitAttributeSize
- renamed
- 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
- Can you give a more detailed comparison of differences and similarities between VK_NV_ray_tracing and VK_KHR_ray_tracing_pipeline?
DISCUSSION:
The following is a more detailed comparison of which commands, structures, and enums are aliased, changed, or removed.
Aliased functionality — enums, structures, and commands that are considered equivalent:
Changed enums, structures, and commands:
RayTracingShaderGroupCreateInfoNV→RayTracingShaderGroupCreateInfoKHR(addedpShaderGroupCaptureReplayHandle)RayTracingPipelineCreateInfoNV→RayTracingPipelineCreateInfoKHR(changed type ofpGroups, addedlibraries,pLibraryInterface, andpDynamicState)PhysicalDeviceRayTracingPropertiesNV→ VkPhysicalDeviceRayTracingPropertiesKHR (renamedmaxTriangleCounttomaxPrimitiveCount, addedshaderGroupHandleCaptureReplaySize)cmdTraceRaysNV→cmdTraceRaysKHR(params to struct)createRayTracingPipelinesNV→createRayTracingPipelinesKHR(different struct, changed functionality)
Added enums, structures and commands:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR,PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR,PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRtoPipelineCreateFlagBitsPhysicalDeviceRayTracingPipelineFeaturesKHRstructureDeviceOrHostAddressKHRandDeviceOrHostAddressConstKHRunionsPipelineLibraryCreateInfoKHRstructRayTracingPipelineInterfaceCreateInfoKHRstructStridedDeviceAddressRegionKHRstructcmdTraceRaysIndirectKHRcommand andTraceRaysIndirectCommandKHRstructgetRayTracingCaptureReplayShaderGroupHandlesKHR(shader group capture/replay)cmdSetRayTracingPipelineStackSizeKHRandgetRayTracingShaderGroupStackSizeKHRcommands for stack size control
Functionality removed:
PIPELINE_CREATE_DEFER_COMPILE_BIT_NVcompileDeferredNVcommand (replaced withVK_KHR_deferred_host_operations)
- What are the changes between the public provisional (VK_KHR_ray_tracing v8) release and the internal provisional (VK_KHR_ray_tracing v9) release?
- Require Vulkan 1.1 and SPIR-V 1.4
- Added interactions with Vulkan 1.2 and
VK_KHR_vulkan_memory_model added creation time capture and replay flags
- replace
VkStridedBufferRegionKHRwithStridedDeviceAddressRegionKHRand changecmdTraceRaysKHR,cmdTraceRaysIndirectKHR, to take these for the shader binding table and use device addresses instead of buffers. - require the shader binding table buffers to have the
VK_BUFFER_USAGE_RAY_TRACING_BIT_KHRset - make
VK_KHR_pipeline_libraryan interaction instead of required extension - rename the
librariesmember ofRayTracingPipelineCreateInfoKHRtopLibraryInfoand make it a pointer - make
VK_KHR_deferred_host_operationsan interaction instead of a required extension (later went back on this) added explicit stack size management for ray tracing pipelines
- removed the
maxCallableSizemember ofRayTracingPipelineInterfaceCreateInfoKHR - added the
pDynamicStatemember toRayTracingPipelineCreateInfoKHR - added
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHRdynamic state for ray tracing pipelines - added
getRayTracingShaderGroupStackSizeKHRandcmdSetRayTracingPipelineStackSizeKHRcommands - added
ShaderGroupShaderKHRenum
- removed the
- Added
maxRayDispatchInvocationCountlimit toPhysicalDeviceRayTracingPipelinePropertiesKHR - Added
shaderGroupHandleAlignmentproperty toPhysicalDeviceRayTracingPipelinePropertiesKHR - Added
maxRayHitAttributeSizeproperty toPhysicalDeviceRayTracingPipelinePropertiesKHR Clarify deferred host ops for pipeline creation
DeferredOperationKHRis now a top-level parameter forcreateRayTracingPipelinesKHR- removed
VkDeferredOperationInfoKHRstructure - change deferred host creation/return parameter behavior such that the implementation can modify such parameters until the deferred host operation completes
VK_KHR_deferred_host_operationsis required again
- 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:
VK_KHR_acceleration_structure(for acceleration structure operations)VK_KHR_ray_tracing_pipeline(for ray tracing pipeline and shader stages)VK_KHR_ray_query(for ray queries in existing shader stages)
Require
Volatilefor the following builtins in the ray generation, closest hit, miss, intersection, and callable shader stages:SubgroupSize,SubgroupLocalInvocationId,SubgroupEqMask,SubgroupGeMask,SubgroupGtMask,SubgroupLeMask,SubgroupLtMaskSMIDNV,WarpIDNV
clarify buffer usage flags for ray tracing
BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRis added as an alias ofBUFFER_USAGE_RAY_TRACING_BIT_NVand is required on shader binding table buffersBUFFER_USAGE_STORAGE_BUFFER_BITis used inVK_KHR_acceleration_structureforscratchData
- rename
maxRecursionDepthtomaxRayPipelineRecursionDepth(pipeline creation) andmaxRayRecursionDepth(limit) to reduce confusion - Add queryable
maxRayHitAttributeSizelimit and rename members ofRayTracingPipelineInterfaceCreateInfoKHRtomaxPipelineRayPayloadSizeandmaxPipelineRayHitAttributeSizefor clarity - Update SPIRV capabilities to use
RayTracingKHR - extension is no longer provisional
- define synchronization requirements for indirect trace rays and indirect buffer
- 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.
- Why is
VK_KHR_pipeline_libraryan interaction instead of a required dependency, particularly when the “Feature Requirements” section says it is required to be supported anyhow?
RESOLVED: If VK_KHR_pipeline_library were a required extension
dependency, then every application would need to enable the extension
whether or not they actually want to use the pipeline library
functionality. Developers found this to be annoying and unfriendly
behavior. We do wish to require all implementations to support it
though, and thus it is listed in the feature requirements section.
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 queryable maxRayHitAttributeSize and rename members of VkRayTracingPipelineInterfaceCreateInfoKHR (#2102,!3966)
- update to use
RayTracingKHRSPIR-V capability - add VUs for matching hit group type against geometry type (#2245,!3994)
- require
RayTMaxKHRbe 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
ShaderRecordBufferKHRvariables (#2230,!4083) - clarify valid bits for
InstanceCustomIndexKHR(GLSL/GLSL#19,!4128) - allow at most one
IncomingRayPayloadKHR,IncomingCallableDataKHR, andHitAttributeKHR(!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
- cmdTraceRaysKHR :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
- getRayTracingShaderGroupHandlesKHR :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- getRayTracingCaptureReplayShaderGroupHandlesKHR :: forall io. MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- createRayTracingPipelinesKHR :: forall io. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Result, "pipelines" ::: Vector Pipeline)
- withRayTracingPipelinesKHR :: forall io r. MonadIO io => Device -> DeferredOperationKHR -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoKHR) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
- cmdTraceRaysIndirectKHR :: forall io. MonadIO io => CommandBuffer -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) -> ("indirectDeviceAddress" ::: DeviceAddress) -> io ()
- getRayTracingShaderGroupStackSizeKHR :: forall io. MonadIO io => Device -> Pipeline -> ("group" ::: Word32) -> ShaderGroupShaderKHR -> io DeviceSize
- cmdSetRayTracingPipelineStackSizeKHR :: forall io. MonadIO io => CommandBuffer -> ("pipelineStackSize" ::: Word32) -> io ()
- data RayTracingShaderGroupCreateInfoKHR = RayTracingShaderGroupCreateInfoKHR {}
- data RayTracingPipelineCreateInfoKHR (es :: [Type]) = RayTracingPipelineCreateInfoKHR {
- next :: Chain es
- flags :: PipelineCreateFlags
- stages :: Vector (SomeStruct PipelineShaderStageCreateInfo)
- groups :: Vector RayTracingShaderGroupCreateInfoKHR
- maxPipelineRayRecursionDepth :: Word32
- libraryInfo :: Maybe PipelineLibraryCreateInfoKHR
- libraryInterface :: Maybe RayTracingPipelineInterfaceCreateInfoKHR
- dynamicState :: Maybe PipelineDynamicStateCreateInfo
- layout :: PipelineLayout
- basePipelineHandle :: Pipeline
- basePipelineIndex :: Int32
- data PhysicalDeviceRayTracingPipelineFeaturesKHR = PhysicalDeviceRayTracingPipelineFeaturesKHR {}
- data PhysicalDeviceRayTracingPipelinePropertiesKHR = PhysicalDeviceRayTracingPipelinePropertiesKHR {}
- data StridedDeviceAddressRegionKHR = StridedDeviceAddressRegionKHR {}
- data TraceRaysIndirectCommandKHR = TraceRaysIndirectCommandKHR {}
- data RayTracingPipelineInterfaceCreateInfoKHR = RayTracingPipelineInterfaceCreateInfoKHR {}
- newtype RayTracingShaderGroupTypeKHR where
- RayTracingShaderGroupTypeKHR Int32
- pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- newtype ShaderGroupShaderKHR where
- type KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1
- pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall a. Integral a => a
- type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline"
- pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- newtype DeferredOperationKHR = DeferredOperationKHR Word64
- data PipelineLibraryCreateInfoKHR = PipelineLibraryCreateInfoKHR {}
- type SHADER_UNUSED_KHR = 4294967295
- pattern SHADER_UNUSED_KHR :: Word32
Documentation
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("width" ::: Word32) |
|
| -> ("height" ::: Word32) |
|
| -> ("depth" ::: Word32) |
|
| -> 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
- If a
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
ImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
ImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT - If a
DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERdescriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must containFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT - If a
ImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - If the
VK_EXT_filter_cubic
extension is not enabled and any
ImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, it must not have aImageViewTypeofIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE, orIMAGE_VIEW_TYPE_CUBE_ARRAY - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - If the
cubicRangeClamp
feature is not enabled, then any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must not have aSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM - Any
ImageViewbeing sampled with aSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOMas a result of this command must sample withFILTER_CUBIC_EXT - If the
selectableCubicWeights
feature is not enabled, then any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must haveSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal toCUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
ImageViewbeing written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - For any
ImageViewbeing read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For any
BufferViewbeing written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
BufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is
statically used by
a bound shader,
a descriptor set must have been bound to n at the same pipeline
bind point, with a
PipelineLayoutthat is compatible for set n, with thePipelineLayoutorDescriptorSetLayoutarray that was used to create the currentPipelineorShaderEXT, as described in ??? - For each push constant that is
statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayoutthat is compatible for push constants, with thePipelineLayoutorDescriptorSetLayoutandPushConstantRangearrays used to create the currentPipelineorShaderEXT, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayoutthat is compatible for push constants, with thePipelineLayoutorDescriptorSetLayoutandPushConstantRangearrays used to create the currentPipelineorShaderEXT, as described in ??? - Descriptors in each bound
descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound to the pipeline bind point used by this command and the boundPipelinewas not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If the descriptors used by the
Pipelinebound to the pipeline bind point were specified viacmdBindDescriptorSets, the boundPipelinemust have been created withoutPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound descriptor
buffers, specified via
cmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by thePipelinebound to the pipeline bind point used by this command and the boundPipelinewas created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound descriptor
buffers, specified via
cmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command - If the descriptors used by the
Pipelinebound to the pipeline bind point were specified viacmdSetDescriptorBufferOffsetsEXT, the boundPipelinemust have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If a descriptor is dynamically
used with a
Pipelinecreated withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If a descriptor is dynamically
used with a
ShaderEXTcreated with aDescriptorSetLayoutthat was created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If the shaderObject feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command
- If the
shaderObject
is enabled, either a valid pipeline must be bound to the pipeline
bind point used by this command, or a valid combination of valid and
NULL_HANDLEshader objects must be bound to every supported shader stage corresponding to the pipeline bind point used by this command - If a pipeline is bound to the
pipeline bind point used by this command, there must not have been
any calls to dynamic state setting commands for any state not
specified as dynamic in the
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the
robustBufferAccess
feature is not enabled, and any
ShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the
robustBufferAccess
feature is not enabled, and any
ShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBufferis an unprotected command buffer and protectedNoFault is not supported, any resource accessed by bound shaders must not be a protected resource - If
a bound shader
accesses a
SamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If
a bound shader
accesses a
SamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
ImageViewis accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in ??? - If a
ImageViewis accessed as a result of this command, then the numeric type of the image view’sformatand theSampledTypeoperand of theOpTypeImagemust match - If a
ImageViewcreated with a format other thanFORMAT_A8_UNORM_KHRis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
ImageViewcreated with the formatFORMAT_A8_UNORM_KHRis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components - If a
BufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
ImageViewwith aFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
ImageViewwith aFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
BufferViewwith aFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
BufferViewwith aFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If the
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aImageViewas a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM - If
OpImageBoxFilterQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM - If
OpImageBlockMatchSSDQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If any
command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from anImageViewas a result of this command, then the image view’s format must be a single-component format. - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - Any shader invocation executed by this command must terminate
- Any shader group handle referenced by this call must have been queried from the currently bound ray tracing pipeline
- This
command must not cause a shader call instruction to be executed
from a shader invocation with a
recursion depth
greater than the value of
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline -
commandBuffermust not be a protected command buffer - The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember - If the
buffer from which
pRayGenShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pRayGenShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - If the buffer
from which
pMissShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pMissShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pMissShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pMissShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pMissShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the buffer
from which
pHitShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The buffer
from which the
pHitShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pHitShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pHitShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pHitShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the
buffer from which
pCallableShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pCallableShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pCallableShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pCallableShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pCallableShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddressmust not be zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddressmust not be zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTable->deviceAddressmust not be set to zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an any-hit shader must not be set to zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a closest hit shader must not be set to zero - If the currently bound ray
tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an intersection shader must not be set to zero - Any non-zero
hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any non-zero
hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR -
widthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[0] -
heightmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
depthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
width×height×depthmust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pRaygenShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pMissShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pHitShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pCallableShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_ray_tracing_pipeline,
CommandBuffer, StridedDeviceAddressRegionKHR
getRayTracingShaderGroupHandlesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Pipeline |
|
| -> ("firstGroup" ::: Word32) |
|
| -> ("groupCount" ::: Word32) |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> io () |
vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles
Description
If pipeline was created with
PIPELINE_CREATE_LIBRARY_BIT_KHR
and the
pipelineLibraryGroupHandles
feature is enabled applications can query group handles from that
pipeline, even if the pipeline is a library and is never bound to a
command buffer. These group handles remain bitwise identical for any
pipeline which references the pipeline library. Group indices are
assigned as-if the pipeline was created without
PIPELINE_CREATE_LIBRARY_BIT_KHR.
Valid Usage
-
firstGroupmust be less than the number of shader groups inpipeline - The sum
of
firstGroupandgroupCountmust be less than or equal to the number of shader groups inpipeline -
dataSizemust be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleSize×groupCount - If the
pipelineLibraryGroupHandles
feature is not enabled,
pipelinemust not have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
pDatamust be a valid pointer to an array ofdataSizebytes -
dataSizemust be greater than0 -
pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_ray_tracing_pipeline,
VK_NV_ray_tracing,
Device, Pipeline
getRayTracingCaptureReplayShaderGroupHandlesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Pipeline |
|
| -> ("firstGroup" ::: Word32) |
|
| -> ("groupCount" ::: Word32) |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> io () |
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR - Query opaque capture replay data for pipeline shader group handles
Description
Once queried, this opaque data can be provided at pipeline creation
time (in a subsequent execution), using
RayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandle,
as described in
Ray Tracing Capture Replay.
If pipeline was created with
PIPELINE_CREATE_LIBRARY_BIT_KHR
and the
pipelineLibraryGroupHandles
feature is enabled applications can query capture replay group handles
from that pipeline. The capture replay handle remains bitwise identical
for any pipeline which references the pipeline library. Group indices
are assigned as-if the pipeline was created without
PIPELINE_CREATE_LIBRARY_BIT_KHR.
Valid Usage
-
firstGroupmust be less than the number of shader groups inpipeline -
The sum of
firstGroupandgroupCountmust be less than or equal to the number of shader groups inpipeline -
dataSizemust be at leastPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleCaptureReplaySize×groupCount -
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplaymust be enabled to call this function -
pipelinemust have been created with aflagsthat includedPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR -
If the
pipelineLibraryGroupHandles
feature is not enabled,
pipelinemust not have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
pDatamust be a valid pointer to an array ofdataSizebytes -
dataSizemust be greater than0 -
pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
createRayTracingPipelinesKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> DeferredOperationKHR |
|
| -> PipelineCache |
|
| -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoKHR)) |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> 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 reuse the shader
group handles provided in
RayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandle
when
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplay
is enabled.
Valid Usage
- If the
flagsmember of any element ofpCreateInfoscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, and thebasePipelineIndexmember of that same element is not-1,basePipelineIndexmust be less than the index intopCreateInfosthat corresponds to that element
- If the
flagsmember of any element ofpCreateInfoscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, the base pipeline must have been created with thePIPELINE_CREATE_ALLOW_DERIVATIVES_BITflag set -
flagsmust not contain thePIPELINE_CREATE_DISPATCH_BASEflag - If
pipelineCachewas created withPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access topipelineCachemust be externally synchronized - If
deferredOperationis notNULL_HANDLE, it must be a validDeferredOperationKHRobject - Any
previous deferred operation that was associated with
deferredOperationmust be complete - The rayTracingPipeline feature must be enabled
- If
deferredOperationis notNULL_HANDLE, theflagsmember of elements ofpCreateInfosmust not includePIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validDeferredOperationKHRhandle - If
pipelineCacheis notNULL_HANDLE,pipelineCachemust be a validPipelineCachehandle -
pCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidRayTracingPipelineCreateInfoKHRstructures - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pPipelinesmust be a valid pointer to an array ofcreateInfoCountPipelinehandles -
createInfoCountmust be greater than0 - If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice - If
pipelineCacheis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_KHR_ray_tracing_pipeline,
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 |
|
| -> ("raygenShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("missShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("hitShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("callableShaderBindingTable" ::: StridedDeviceAddressRegionKHR) |
|
| -> ("indirectDeviceAddress" ::: DeviceAddress) |
|
| -> 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
- If a
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
ImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
ImageViewis accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT - If a
DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERdescriptor is accessed using atomic operations as a result of this command, then the storage texel buffer’s format features must containFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT - If a
ImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - If the
VK_EXT_filter_cubic
extension is not enabled and any
ImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, it must not have aImageViewTypeofIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE, orIMAGE_VIEW_TYPE_CUBE_ARRAY - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - If the
cubicRangeClamp
feature is not enabled, then any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must not have aSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM - Any
ImageViewbeing sampled with aSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOMas a result of this command must sample withFILTER_CUBIC_EXT - If the
selectableCubicWeights
feature is not enabled, then any
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must haveSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal toCUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
ImageViewbeing written as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - For any
ImageViewbeing read as a storage image where the image format field of theOpTypeImageisUnknown, the view’s format features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For any
BufferViewbeing written as a storage texel buffer where the image format field of theOpTypeImageisUnknown, the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
BufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is
statically used by
a bound shader,
a descriptor set must have been bound to n at the same pipeline
bind point, with a
PipelineLayoutthat is compatible for set n, with thePipelineLayoutorDescriptorSetLayoutarray that was used to create the currentPipelineorShaderEXT, as described in ??? - For each push constant
that is statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayoutthat is compatible for push constants, with thePipelineLayoutorDescriptorSetLayoutandPushConstantRangearrays used to create the currentPipelineorShaderEXT, as described in ??? - If the
maintenance4
feature is not enabled, then for each push constant that is
statically used by
a bound shader,
a push constant value must have been set for the same pipeline
bind point, with a
PipelineLayoutthat is compatible for push constants, with thePipelineLayoutorDescriptorSetLayoutandPushConstantRangearrays used to create the currentPipelineorShaderEXT, as described in ??? - Descriptors in each
bound descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound to the pipeline bind point used by this command and the boundPipelinewas not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If the descriptors used
by the
Pipelinebound to the pipeline bind point were specified viacmdBindDescriptorSets, the boundPipelinemust have been created withoutPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound
descriptor buffers, specified via
cmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by thePipelinebound to the pipeline bind point used by this command and the boundPipelinewas created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound
descriptor buffers, specified via
cmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command - If the descriptors used
by the
Pipelinebound to the pipeline bind point were specified viacmdSetDescriptorBufferOffsetsEXT, the boundPipelinemust have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If a descriptor is
dynamically used with a
Pipelinecreated withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If a descriptor is
dynamically used with a
ShaderEXTcreated with aDescriptorSetLayoutthat was created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If the shaderObject feature is not enabled, a valid pipeline must be bound to the pipeline bind point used by this command
- If the
shaderObject
is enabled, either a valid pipeline must be bound to the pipeline
bind point used by this command, or a valid combination of valid and
NULL_HANDLEshader objects must be bound to every supported shader stage corresponding to the pipeline bind point used by this command - If a pipeline is bound
to the pipeline bind point used by this command, there must not
have been any calls to dynamic state setting commands for any state
not specified as dynamic in the
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
Pipelineobject bound to the pipeline bind point used by this command or anyShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If any stage
of the
Pipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforuniformBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the
robustBufferAccess
feature is not enabled, and any
ShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If any stage
of the
Pipelineobject bound to the pipeline bind point used by this command accesses a storage buffer, and that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXTorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXTforstorageBuffers, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the
robustBufferAccess
feature is not enabled, and any
ShaderEXTbound to a stage corresponding to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBufferis an unprotected command buffer and protectedNoFault is not supported, any resource accessed by bound shaders must not be a protected resource - If
a bound shader
accesses a
SamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If
a bound shader
accesses a
SamplerorImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
ImageViewis accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in ??? - If a
ImageViewis accessed as a result of this command, then the numeric type of the image view’sformatand theSampledTypeoperand of theOpTypeImagemust match - If a
ImageViewcreated with a format other thanFORMAT_A8_UNORM_KHRis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
ImageViewcreated with the formatFORMAT_A8_UNORM_KHRis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components - If a
BufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
ImageViewwith aFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
ImageViewwith aFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
BufferViewwith aFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
BufferViewwith aFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If
the
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aImageViewas a sample weight image as a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM - If
OpImageBoxFilterQCOMis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM - If
OpImageBlockMatchSSDQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMis used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If
any command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aSampleras a result of this command, then the sampler must not have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from anImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMinstruction is used to read from anImageViewas a result of this command, then the image view’s format must be a single-component format. - If a
OpImageBlockMatchWindow*QCOMorOpImageBlockMatchGather*QCOMread from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - Any shader invocation executed by this command must terminate
- Any shader group handle referenced by this call must have been queried from the currently bound ray tracing pipeline
-
This command must not cause a shader call instruction to be
executed from a shader invocation with a
recursion depth
greater than the value of
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline -
commandBuffermust not be a protected command buffer - The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember - If
the buffer from which
pRayGenShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pRayGenShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pRayGenShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment - If
the buffer from which
pMissShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pMissShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pMissShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pMissShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pMissShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the
buffer from which
pHitShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which the
pHitShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pHitShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pHitShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pHitShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride -
If the buffer from which
pCallableShaderBindingTable->deviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
The buffer from which the
pCallableShaderBindingTable->deviceAddressis queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag -
pCallableShaderBindingTable->deviceAddressmust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment -
pCallableShaderBindingTable->stridemust be a multiple ofPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignment -
pCallableShaderBindingTable->stridemust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddressmust not be zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddressmust not be zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTable->deviceAddressmust not be set to zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an any-hit shader must not be set to zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute a closest hit shader must not be set to zero - If the currently bound
ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddressaccessed as a result of this command in order to execute an intersection shader must not be set to zero - Any
non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any
non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddressaccessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR - If the
buffer from which
indirectDeviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - The
buffer from which
indirectDeviceAddresswas queried must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
indirectDeviceAddressmust be a multiple of4 - All
device addresses between
indirectDeviceAddressandindirectDeviceAddress+sizeof(TraceRaysIndirectCommandKHR) - 1 must be in the buffer device address range of the same buffer - The rayTracingPipelineTraceRaysIndirect feature must be enabled
-
If the bound ray tracing pipeline was created with
PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NVPhysicalDeviceRayTracingMotionBlurFeaturesNV::rayTracingMotionBlurPipelineTraceRaysIndirectfeature must be enabled
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pRaygenShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pMissShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pHitShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
pCallableShaderBindingTablemust be a valid pointer to a validStridedDeviceAddressRegionKHRstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | Action |
See Also
VK_KHR_ray_tracing_pipeline,
CommandBuffer,
DeviceAddress,
StridedDeviceAddressRegionKHR
getRayTracingShaderGroupStackSizeKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Pipeline |
|
| -> ("group" ::: Word32) |
|
| -> ShaderGroupShaderKHR |
|
| -> 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
- The value
of
groupmust be less than the number of shader groups inpipeline - The
shader identified by
groupShaderingroupmust not beSHADER_UNUSED_KHR
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pipelinemust be a validPipelinehandle -
groupShadermust be a validShaderGroupShaderKHRvalue -
pipelinemust have been created, allocated, or retrieved fromdevice
See Also
VK_KHR_ray_tracing_pipeline,
Device, Pipeline,
ShaderGroupShaderKHR
cmdSetRayTracingPipelineStackSizeKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("pipelineStackSize" ::: Word32) |
|
| -> io () |
vkCmdSetRayTracingPipelineStackSizeKHR - Set the stack size dynamically for a ray tracing pipeline
Description
This command sets the stack size for subsequent ray tracing commands
when the ray tracing pipeline is created with
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
set in
PipelineDynamicStateCreateInfo::pDynamicStates.
Otherwise, the stack size is computed as described in
Ray Tracing Pipeline Stack.
Valid Usage
-
pipelineStackSizemust be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | Compute | State |
See Also
data RayTracingShaderGroupCreateInfoKHR Source #
VkRayTracingShaderGroupCreateInfoKHR - Structure specifying shaders in a shader group
Description
If the pipeline is created with
PIPELINE_CREATE_LIBRARY_BIT_KHR
and the
pipelineLibraryGroupHandles
feature is enabled, pShaderGroupCaptureReplayHandle is inherited by
all pipelines which link against this pipeline and remains bitwise
identical for any pipeline which references this pipeline library.
Valid Usage
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRthengeneralShadermust be a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_RAYGEN_BIT_KHR,SHADER_STAGE_MISS_BIT_KHR, orSHADER_STAGE_CALLABLE_BIT_KHR
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRthenclosestHitShader,anyHitShader, andintersectionShadermust beSHADER_UNUSED_KHR - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHRthenintersectionShadermust be a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_INTERSECTION_BIT_KHR - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRthenintersectionShadermust beSHADER_UNUSED_KHR -
closestHitShadermust be eitherSHADER_UNUSED_KHRor a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_CLOSEST_HIT_BIT_KHR -
anyHitShadermust be eitherSHADER_UNUSED_KHRor a valid index intoRayTracingPipelineCreateInfoKHR::pStagesreferring to a shader ofSHADER_STAGE_ANY_HIT_BIT_KHR -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayMixedisFALSEthenpShaderGroupCaptureReplayHandlemust not be provided if it has not been provided on a previous call to ray tracing pipeline creation -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayMixedisFALSEthen the caller must guarantee that no ray tracing pipeline creation commands withpShaderGroupCaptureReplayHandleprovided execute simultaneously with ray tracing pipeline creation commands withoutpShaderGroupCaptureReplayHandleprovided
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR
-
pNextmust beNULL -
typemust be a validRayTracingShaderGroupTypeKHRvalue
See Also
VK_KHR_ray_tracing_pipeline,
RayTracingPipelineCreateInfoKHR, RayTracingShaderGroupTypeKHR,
StructureType
Constructors
| RayTracingShaderGroupCreateInfoKHR | |
Fields
| |
Instances
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.
If a
PipelineCreateFlags2CreateInfoKHR
structure is present in the pNext chain,
PipelineCreateFlags2CreateInfoKHR::flags
from that structure is used instead of flags from this structure.
Valid Usage
- If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineIndexis -1,basePipelineHandlemust be a valid ray tracingPipelinehandle
- If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag, andbasePipelineHandleisNULL_HANDLE,basePipelineIndexmust be a valid index into the calling command’spCreateInfosparameter - If
flagscontains thePIPELINE_CREATE_DERIVATIVE_BITflag,basePipelineIndexmust be -1 orbasePipelineHandlemust beNULL_HANDLE - If a push
constant block is declared in a shader, a push constant range in
layoutmust match both the shader stage and range - If a
resource variables
is declared in a shader, a descriptor slot in
layoutmust match the shader stage - If a
resource variables
is declared in a shader, and the descriptor type is not
DESCRIPTOR_TYPE_MUTABLE_EXT, a descriptor slot inlayoutmust match the descriptor type - If a
resource variables
is declared in a shader as an array, a descriptor slot in
layoutmust match the descriptor count - The shader
code for the entry points identified by
pStages, and the rest of the state identified by this structure must adhere to the pipeline linking rules described in the Shader Interfaces chapter - The number of
resources in
layoutaccessible to each shader stage that is used by the pipeline must be less than or equal toPhysicalDeviceLimits::maxPerStageResources -
flagsmust not includePIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV -
If the
pipelineCreationCacheControl
feature is not enabled,
flagsmust not includePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BITorPIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT - If
flagsdoes not includePIPELINE_CREATE_LIBRARY_BIT_KHR, thestagemember of at least one element ofpStages, including those implicitly added bypLibraryInfo, must beSHADER_STAGE_RAYGEN_BIT_KHR -
maxPipelineRayRecursionDepthmust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayRecursionDepth - If
flagsincludesPIPELINE_CREATE_LIBRARY_BIT_KHR,pLibraryInterfacemust not beNULL - If
pLibraryInfois notNULLand itslibraryCountmember is greater than0,pLibraryInterfacemust not beNULL - Each
element of
pLibraryInfo->pLibrariesmust have been created with the value ofmaxPipelineRayRecursionDepthequal to that in this pipeline - If
pLibraryInfois notNULL, each element of itspLibrariesmember must have been created with alayoutthat is compatible with thelayoutin this pipeline - If
pLibraryInfois notNULL, each element of itspLibrariesmember must have been created with values of themaxPipelineRayPayloadSizeandmaxPipelineRayHitAttributeSizemembers ofpLibraryInterfaceequal to those in this pipeline - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRbit set - If the
VK_KHR_pipeline_libraryextension is not enabled,pLibraryInfoandpLibraryInterfacemust beNULL - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, for any element ofpGroupswith atypeofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRorRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, theanyHitShaderof that element must not beSHADER_UNUSED_KHR - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, for any element ofpGroupswith atypeofRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRorRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, theclosestHitShaderof that element must not beSHADER_UNUSED_KHR -
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR -
If the
rayTraversalPrimitiveCulling
feature is not enabled,
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR -
flagsmust not include bothPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRandPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR, rayTracingPipelineShaderGroupHandleCaptureReplay must be enabled -
If
PhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayisTRUEand thepShaderGroupCaptureReplayHandlemember of any element ofpGroupsis notNULL,flagsmust includePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR - If
pLibraryInfoisNULLor itslibraryCountis0,stageCountmust not be0 - If
flagsdoes not includePIPELINE_CREATE_LIBRARY_BIT_KHRand eitherpLibraryInfoisNULLor itslibraryCountis0,groupCountmust not be0 - Any
element of the
pDynamicStatesmember ofpDynamicStatemust beDYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR -
If
PipelineCreationFeedbackCreateInfo::pipelineStageCreationFeedbackCountis not0, it must be equal tostageCount - The
stagevalue in allpStageselements must be one ofSHADER_STAGE_RAYGEN_BIT_KHR,SHADER_STAGE_ANY_HIT_BIT_KHR,SHADER_STAGE_CLOSEST_HIT_BIT_KHR,SHADER_STAGE_MISS_BIT_KHR,SHADER_STAGE_INTERSECTION_BIT_KHR, orSHADER_STAGE_CALLABLE_BIT_KHR - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXTbit set - If
flagsincludesPIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV, each element ofpLibraryInfo->pLibrariesmust have been created with thePIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NVbit set
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofPipelineCreateFlags2CreateInfoKHR,PipelineCreationFeedbackCreateInfo, orPipelineRobustnessCreateInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique -
flagsmust be a valid combination ofPipelineCreateFlagBitsvalues - If
stageCountis not0,pStagesmust be a valid pointer to an array ofstageCountvalidPipelineShaderStageCreateInfostructures - If
groupCountis not0,pGroupsmust be a valid pointer to an array ofgroupCountvalidRayTracingShaderGroupCreateInfoKHRstructures - If
pLibraryInfois notNULL,pLibraryInfomust be a valid pointer to a validPipelineLibraryCreateInfoKHRstructure -
If
pLibraryInterfaceis notNULL,pLibraryInterfacemust be a valid pointer to a validRayTracingPipelineInterfaceCreateInfoKHRstructure - If
pDynamicStateis notNULL,pDynamicStatemust be a valid pointer to a validPipelineDynamicStateCreateInfostructure -
layoutmust be a validPipelineLayouthandle - Both of
basePipelineHandle, andlayoutthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_KHR_ray_tracing_pipeline,
Pipeline,
PipelineCreateFlags,
PipelineDynamicStateCreateInfo,
PipelineLayout,
PipelineLibraryCreateInfoKHR,
PipelineShaderStageCreateInfo,
RayTracingPipelineInterfaceCreateInfoKHR,
RayTracingShaderGroupCreateInfoKHR,
StructureType,
createRayTracingPipelinesKHR
Constructors
| RayTracingPipelineCreateInfoKHR | |
Fields
| |
Instances
data PhysicalDeviceRayTracingPipelineFeaturesKHR Source #
VkPhysicalDeviceRayTracingPipelineFeaturesKHR - Structure describing the ray tracing features that can be supported by an implementation
Members
This structure describes the following features:
Description
sTypeis aStructureTypevalue identifying this structure.
pNextisNULLor a pointer to a structure extending this structure.-
rayTracingPipelineindicates whether the implementation supports the ray tracing pipeline functionality. See Ray Tracing. -
rayTracingPipelineShaderGroupHandleCaptureReplayindicates whether the implementation supports saving and reusing shader group handles, e.g. for trace capture and replay. -
rayTracingPipelineShaderGroupHandleCaptureReplayMixedindicates whether the implementation supports reuse of shader group handles being arbitrarily mixed with creation of non-reused shader group handles. If this isFALSE, all reused shader group handles must be specified before any non-reused handles may be created. -
rayTracingPipelineTraceRaysIndirectindicates whether the implementation supports indirect ray tracing commands, e.g.cmdTraceRaysIndirectKHR. -
rayTraversalPrimitiveCullingindicates whether the implementation supports primitive culling during ray traversal.
If the PhysicalDeviceRayTracingPipelineFeaturesKHR 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. PhysicalDeviceRayTracingPipelineFeaturesKHR can also be
used in the pNext chain of DeviceCreateInfo to
selectively enable these features.
Valid Usage
-
If
rayTracingPipelineShaderGroupHandleCaptureReplayMixedisTRUE,rayTracingPipelineShaderGroupHandleCaptureReplaymust also beTRUE
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPipelineFeaturesKHR | |
Instances
data PhysicalDeviceRayTracingPipelinePropertiesKHR Source #
VkPhysicalDeviceRayTracingPipelinePropertiesKHR - Properties of the physical device for ray tracing
Description
If the PhysicalDeviceRayTracingPipelinePropertiesKHR structure is
included in the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Limits specified by this structure must match those specified with the
same name in
PhysicalDeviceRayTracingPropertiesNV.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPipelinePropertiesKHR | |
Fields
| |
Instances
data StridedDeviceAddressRegionKHR Source #
VkStridedDeviceAddressRegionKHR - Structure specifying a region of device addresses with a stride
Valid Usage
- If
sizeis not zero, all addresses betweendeviceAddressanddeviceAddress+size- 1 must be in the buffer device address range of the same buffer
- If
sizeis not zero,stridemust be less than or equal to the size of the buffer from whichdeviceAddresswas queried
See Also
VK_KHR_ray_tracing_pipeline,
DeviceAddress,
DeviceSize, cmdTraceRaysIndirectKHR,
cmdTraceRaysKHR
Constructors
| StridedDeviceAddressRegionKHR | |
Fields
| |
Instances
data TraceRaysIndirectCommandKHR Source #
VkTraceRaysIndirectCommandKHR - Structure specifying the parameters of an indirect ray tracing command
Description
The members of TraceRaysIndirectCommandKHR have the same meaning as
the similarly named parameters of cmdTraceRaysKHR.
Valid Usage
-
widthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[0]
-
heightmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[1] -
depthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×PhysicalDeviceLimits::maxComputeWorkGroupSize[2] -
width×height×depthmust be less than or equal toPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
See Also
Constructors
| TraceRaysIndirectCommandKHR | |
Instances
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
VK_KHR_ray_tracing_pipeline,
RayTracingPipelineCreateInfoKHR,
StructureType
Constructors
| RayTracingPipelineInterfaceCreateInfoKHR | |
Fields
| |
Instances
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
VK_KHR_ray_tracing_pipeline,
VK_NV_ray_tracing,
RayTracingShaderGroupCreateInfoKHR,
RayTracingShaderGroupCreateInfoNV
Constructors
| RayTracingShaderGroupTypeKHR Int32 |
Bundled Patterns
| pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR |
|
| pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR |
|
| pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR |
|
Instances
newtype ShaderGroupShaderKHR Source #
VkShaderGroupShaderKHR - Shader group shaders
See Also
VK_KHR_ray_tracing_pipeline,
getRayTracingShaderGroupStackSizeKHR
Constructors
| ShaderGroupShaderKHR Int32 |
Bundled Patterns
| pattern SHADER_GROUP_SHADER_GENERAL_KHR :: ShaderGroupShaderKHR |
|
| pattern SHADER_GROUP_SHADER_CLOSEST_HIT_KHR :: ShaderGroupShaderKHR |
|
| pattern SHADER_GROUP_SHADER_ANY_HIT_KHR :: ShaderGroupShaderKHR |
|
| pattern SHADER_GROUP_SHADER_INTERSECTION_KHR :: ShaderGroupShaderKHR |
|
Instances
type KHR_RAY_TRACING_PIPELINE_SPEC_VERSION = 1 Source #
pattern KHR_RAY_TRACING_PIPELINE_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME = "VK_KHR_ray_tracing_pipeline" Source #
pattern KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
newtype DeferredOperationKHR Source #
VkDeferredOperationKHR - A deferred operation
Description
This handle refers to a tracking structure which manages the execution state for a deferred command.
See Also
VK_KHR_deferred_host_operations,
buildAccelerationStructuresKHR,
buildMicromapsEXT,
copyAccelerationStructureKHR,
copyAccelerationStructureToMemoryKHR,
copyMemoryToAccelerationStructureKHR,
copyMemoryToMicromapEXT,
copyMicromapEXT,
copyMicromapToMemoryEXT,
createDeferredOperationKHR,
createRayTracingPipelinesKHR,
deferredOperationJoinKHR,
destroyDeferredOperationKHR,
getDeferredOperationMaxConcurrencyKHR,
getDeferredOperationResultKHR
Constructors
| DeferredOperationKHR Word64 |
Instances
data PipelineLibraryCreateInfoKHR Source #
VkPipelineLibraryCreateInfoKHR - Structure specifying pipeline libraries to use when creating a pipeline
Valid Usage
- Each element
of
pLibrariesmust have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
- If any
library in
pLibrarieswas created with a shader stage withPipelineShaderStageModuleIdentifierCreateInfoEXTandidentifierSizenot equal to 0, the pipeline must be created with thePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BITflag set - If any
element of
pLibrarieswas created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, all elements must have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If
pipelineis being created withPIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element ofpLibrariesmust have been created withPIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT - If
pipelineis being created withoutPIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT, every element ofpLibrariesmust have been created withoutPIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT - If
pipelineis being created withPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element ofpLibrariesmust have been created withPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT - If
pipelineis being created withoutPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT, every element ofpLibrariesmust have been created withoutPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR
- If
libraryCountis not0,pLibrariesmust be a valid pointer to an array oflibraryCountvalidPipelinehandles
See Also
VK_KHR_pipeline_library,
ExecutionGraphPipelineCreateInfoAMDX,
Pipeline,
RayTracingPipelineCreateInfoKHR,
StructureType
Constructors
| PipelineLibraryCreateInfoKHR | |
Instances
| Show PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods showsPrec :: Int -> PipelineLibraryCreateInfoKHR -> ShowS # show :: PipelineLibraryCreateInfoKHR -> String # showList :: [PipelineLibraryCreateInfoKHR] -> ShowS # | |
| FromCStruct PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library | |
| ToCStruct PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods withCStruct :: PipelineLibraryCreateInfoKHR -> (Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr PipelineLibraryCreateInfoKHR -> PipelineLibraryCreateInfoKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr PipelineLibraryCreateInfoKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr PipelineLibraryCreateInfoKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero PipelineLibraryCreateInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_pipeline_library Methods | |
type SHADER_UNUSED_KHR = 4294967295 Source #
pattern SHADER_UNUSED_KHR :: Word32 Source #
VK_SHADER_UNUSED_KHR - Sentinel for an unused shader index