| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_ray_tracing
Description
Name
VK_NV_ray_tracing - device extension
VK_NV_ray_tracing
- Name String
VK_NV_ray_tracing
- Extension Type
- Device extension
- Registered Extension Number
- 166
- Revision
- 3
- Ratification Status
- Not ratified
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 and
VK_KHR_get_memory_requirements2 or Vulkan Version 1.1
- API Interactions
- Interacts with VK_VERSION_1_1
- Interacts with VK_EXT_debug_report
- Interacts with VK_KHR_get_memory_requirements2
- SPIR-V Dependencies
- Deprecation State
- Deprecated by VK_KHR_ray_tracing_pipeline extension
- Contact
Other Extension Metadata
- Last Modified Date
- 2018-11-20
- Interactions and External Dependencies
- This extension provides API support for GL_NV_ray_tracing
- Contributors
- Eric Werness, NVIDIA
- Ashwin Lele, NVIDIA
- Robert Stepinski, NVIDIA
- Nuno Subtil, NVIDIA
- Christoph Kubisch, NVIDIA
- Martin Stich, NVIDIA
- Daniel Koch, NVIDIA
- Jeff Bolz, NVIDIA
- Joshua Barczak, Intel
- Tobias Hector, AMD
- Henrik Rydgard, NVIDIA
- Pascal Gautron, NVIDIA
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:
- Acceleration structure objects and build commands
- A new pipeline type with new shader domains
- An indirection table to link shader groups with acceleration structure items
This extension adds support for the following SPIR-V extension in Vulkan:
SPV_NV_ray_tracing
New Object Types
New Commands
cmdBuildAccelerationStructureNVcmdCopyAccelerationStructureNVcmdTraceRaysNVcmdWriteAccelerationStructuresPropertiesNVcompileDeferredNVcreateAccelerationStructureNVcreateRayTracingPipelinesNVdestroyAccelerationStructureNVgetAccelerationStructureHandleNVgetAccelerationStructureMemoryRequirementsNVgetRayTracingShaderGroupHandlesNV
New Structures
AccelerationStructureCreateInfoNVAccelerationStructureInfoNVAccelerationStructureInstanceNVAccelerationStructureMemoryRequirementsInfoNVBindAccelerationStructureMemoryInfoNVGeometryAABBNVGeometryDataNVGeometryNVGeometryTrianglesNVRayTracingPipelineCreateInfoNVRayTracingShaderGroupCreateInfoNVTransformMatrixNVExtending
PhysicalDeviceProperties2:Extending
WriteDescriptorSet:
If VK_KHR_get_memory_requirements2 or Vulkan Version 1.1 is supported:
New Enums
AccelerationStructureTypeNVBuildAccelerationStructureFlagBitsNVCopyAccelerationStructureModeNVGeometryFlagBitsNVGeometryInstanceFlagBitsNVGeometryTypeNVRayTracingShaderGroupTypeNV
New Bitmasks
New Enum Constants
NV_RAY_TRACING_SPEC_VERSIONSHADER_UNUSED_NVExtending
AccelerationStructureTypeKHR:Extending
AccessFlagBits:Extending
BufferUsageFlagBits:Extending
BuildAccelerationStructureFlagBitsKHR:Extending
CopyAccelerationStructureModeKHR:Extending
DescriptorType:Extending
GeometryFlagBitsKHR:Extending
GeometryInstanceFlagBitsKHR:Extending
GeometryTypeKHR:Extending
IndexType:Extending
ObjectType:Extending
PipelineBindPoint:Extending
PipelineCreateFlagBits:Extending
PipelineStageFlagBits:Extending
QueryType:Extending
RayTracingShaderGroupTypeKHR:Extending
ShaderStageFlagBits:Extending
StructureType:STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV
If VK_EXT_debug_report is supported:
New or Modified Built-In Variables
- LaunchSizeNV
- WorldRayOriginNV
- WorldRayDirectionNV
- ObjectRayOriginNV
- ObjectRayDirectionNV
- RayTminNV
- RayTmaxNV
- InstanceCustomIndexNV
- InstanceId
- ObjectToWorldNV
- WorldToObjectNV
- HitTNV
- HitKindNV
- IncomingRayFlagsNV
- (modified)
PrimitiveId
New SPIR-V Capabilities
Issues
1) Are there issues?
RESOLVED: Yes.
Sample Code
Example ray generation GLSL shader
#version 450 core
#extension GL_NV_ray_tracing : require
layout(set = 0, binding = 0, rgba8) uniform image2D image;
layout(set = 0, binding = 1) uniform accelerationStructureNV as;
layout(location = 0) rayPayloadNV float payload;
void main()
{
vec4 col = vec4(0, 0, 0, 1);
vec3 origin = vec3(float(gl_LaunchIDNV.x)/float(gl_LaunchSizeNV.x), float(gl_LaunchIDNV.y)/float(gl_LaunchSizeNV.y), 1.0);
vec3 dir = vec3(0.0, 0.0, -1.0);
traceNV(as, 0, 0xff, 0, 1, 0, origin, 0.0, dir, 1000.0, 0);
col.y = payload;
imageStore(image, ivec2(gl_LaunchIDNV.xy), col);
}Version History
Revision 1, 2018-09-11 (Robert Stepinski, Nuno Subtil, Eric Werness)
- Internal revisions
Revision 2, 2018-10-19 (Eric Werness)
- rename to VK_NV_ray_tracing, add support for callables.
- too many updates to list
Revision 3, 2018-11-20 (Daniel Koch)
- update to use InstanceId instead of InstanceIndex as implemented.
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- compileDeferredNV :: MonadIO io => Device -> Pipeline -> ("shader" ::: Word32) -> io ()
- createAccelerationStructureNV :: forall (a :: [Type]) io. (Extendss AccelerationStructureCreateInfoNV a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoNV a -> ("allocator" ::: Maybe AllocationCallbacks) -> io AccelerationStructureNV
- withAccelerationStructureNV :: forall (a :: [Type]) io r. (Extendss AccelerationStructureCreateInfoNV a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoNV a -> Maybe AllocationCallbacks -> (io AccelerationStructureNV -> (AccelerationStructureNV -> io ()) -> r) -> r
- destroyAccelerationStructureNV :: MonadIO io => Device -> AccelerationStructureNV -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getAccelerationStructureMemoryRequirementsNV :: forall (a :: [Type]) io. (Extendss MemoryRequirements2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> AccelerationStructureMemoryRequirementsInfoNV -> io (MemoryRequirements2KHR a)
- bindAccelerationStructureMemoryNV :: MonadIO io => Device -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) -> io ()
- cmdCopyAccelerationStructureNV :: MonadIO io => CommandBuffer -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> CopyAccelerationStructureModeKHR -> io ()
- cmdWriteAccelerationStructuresPropertiesNV :: MonadIO io => CommandBuffer -> ("accelerationStructures" ::: Vector AccelerationStructureNV) -> QueryType -> QueryPool -> ("firstQuery" ::: Word32) -> io ()
- cmdBuildAccelerationStructureNV :: MonadIO io => CommandBuffer -> AccelerationStructureInfoNV -> ("instanceData" ::: Buffer) -> ("instanceOffset" ::: DeviceSize) -> ("update" ::: Bool) -> ("dst" ::: AccelerationStructureNV) -> ("src" ::: AccelerationStructureNV) -> ("scratch" ::: Buffer) -> ("scratchOffset" ::: DeviceSize) -> io ()
- cmdTraceRaysNV :: MonadIO io => CommandBuffer -> ("raygenShaderBindingTableBuffer" ::: Buffer) -> ("raygenShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingTableBuffer" ::: Buffer) -> ("missShaderBindingOffset" ::: DeviceSize) -> ("missShaderBindingStride" ::: DeviceSize) -> ("hitShaderBindingTableBuffer" ::: Buffer) -> ("hitShaderBindingOffset" ::: DeviceSize) -> ("hitShaderBindingStride" ::: DeviceSize) -> ("callableShaderBindingTableBuffer" ::: Buffer) -> ("callableShaderBindingOffset" ::: DeviceSize) -> ("callableShaderBindingStride" ::: DeviceSize) -> ("width" ::: Word32) -> ("height" ::: Word32) -> ("depth" ::: Word32) -> io ()
- getAccelerationStructureHandleNV :: MonadIO io => Device -> AccelerationStructureNV -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- createRayTracingPipelinesNV :: MonadIO io => Device -> PipelineCache -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)) -> ("allocator" ::: Maybe AllocationCallbacks) -> io (Result, "pipelines" ::: Vector Pipeline)
- withRayTracingPipelinesNV :: MonadIO io => Device -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoNV) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r
- pattern SHADER_UNUSED_NV :: Word32
- pattern SHADER_STAGE_RAYGEN_BIT_NV :: ShaderStageFlagBits
- pattern SHADER_STAGE_ANY_HIT_BIT_NV :: ShaderStageFlagBits
- pattern SHADER_STAGE_CLOSEST_HIT_BIT_NV :: ShaderStageFlagBits
- pattern SHADER_STAGE_MISS_BIT_NV :: ShaderStageFlagBits
- pattern SHADER_STAGE_INTERSECTION_BIT_NV :: ShaderStageFlagBits
- pattern SHADER_STAGE_CALLABLE_BIT_NV :: ShaderStageFlagBits
- pattern PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV :: PipelineStageFlagBits
- pattern BUFFER_USAGE_RAY_TRACING_BIT_NV :: BufferUsageFlagBits
- pattern PIPELINE_BIND_POINT_RAY_TRACING_NV :: PipelineBindPoint
- pattern ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV :: AccessFlagBits
- pattern ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV :: AccessFlagBits
- pattern INDEX_TYPE_NONE_NV :: IndexType
- pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR
- pattern GEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_AABBS_NV :: GeometryTypeKHR
- pattern ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV :: AccelerationStructureTypeKHR
- pattern ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV :: AccelerationStructureTypeKHR
- pattern GEOMETRY_OPAQUE_BIT_NV :: GeometryFlagBitsKHR
- pattern GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV :: GeometryFlagBitsKHR
- pattern GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV :: GeometryInstanceFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV :: CopyAccelerationStructureModeKHR
- getRayTracingShaderGroupHandlesNV :: MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- data RayTracingShaderGroupCreateInfoNV = RayTracingShaderGroupCreateInfoNV {}
- data RayTracingPipelineCreateInfoNV (es :: [Type]) = RayTracingPipelineCreateInfoNV {}
- data GeometryTrianglesNV = GeometryTrianglesNV {}
- data GeometryAABBNV = GeometryAABBNV {}
- data GeometryDataNV = GeometryDataNV {}
- data GeometryNV = GeometryNV {}
- data AccelerationStructureInfoNV = AccelerationStructureInfoNV {}
- data AccelerationStructureCreateInfoNV (es :: [Type]) = AccelerationStructureCreateInfoNV {}
- data BindAccelerationStructureMemoryInfoNV = BindAccelerationStructureMemoryInfoNV {}
- data WriteDescriptorSetAccelerationStructureNV = WriteDescriptorSetAccelerationStructureNV {}
- data AccelerationStructureMemoryRequirementsInfoNV = AccelerationStructureMemoryRequirementsInfoNV {}
- data PhysicalDeviceRayTracingPropertiesNV = PhysicalDeviceRayTracingPropertiesNV {}
- newtype AccelerationStructureMemoryRequirementsTypeNV where
- AccelerationStructureMemoryRequirementsTypeNV Int32
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV :: AccelerationStructureMemoryRequirementsTypeNV
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
- pattern ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV :: AccelerationStructureMemoryRequirementsTypeNV
- type GeometryFlagsNV = GeometryFlagsKHR
- type GeometryInstanceFlagsNV = GeometryInstanceFlagsKHR
- type BuildAccelerationStructureFlagsNV = BuildAccelerationStructureFlagsKHR
- type GeometryFlagBitsNV = GeometryFlagBitsKHR
- type GeometryInstanceFlagBitsNV = GeometryInstanceFlagBitsKHR
- type BuildAccelerationStructureFlagBitsNV = BuildAccelerationStructureFlagBitsKHR
- type CopyAccelerationStructureModeNV = CopyAccelerationStructureModeKHR
- type AccelerationStructureTypeNV = AccelerationStructureTypeKHR
- type GeometryTypeNV = GeometryTypeKHR
- type RayTracingShaderGroupTypeNV = RayTracingShaderGroupTypeKHR
- type AabbPositionsNV = AabbPositionsKHR
- type TransformMatrixNV = TransformMatrixKHR
- type AccelerationStructureInstanceNV = AccelerationStructureInstanceKHR
- type NV_RAY_TRACING_SPEC_VERSION = 3
- pattern NV_RAY_TRACING_SPEC_VERSION :: Integral a => a
- type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"
- pattern NV_RAY_TRACING_EXTENSION_NAME :: (Eq a, IsString a) => a
- newtype AccelerationStructureNV = AccelerationStructureNV Word64
- data AabbPositionsKHR = AabbPositionsKHR {}
- data TransformMatrixKHR = TransformMatrixKHR {
- matrixRow0 :: (Float, Float, Float, Float)
- matrixRow1 :: (Float, Float, Float, Float)
- matrixRow2 :: (Float, Float, Float, Float)
- data AccelerationStructureInstanceKHR = AccelerationStructureInstanceKHR {}
- getRayTracingShaderGroupHandlesKHR :: MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io ()
- newtype DebugReportObjectTypeEXT where
- DebugReportObjectTypeEXT Int32
- pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CUDA_FUNCTION_NV_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CUDA_MODULE_NV_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_CU_MODULE_NVX_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT :: DebugReportObjectTypeEXT
- pattern DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT :: DebugReportObjectTypeEXT
- newtype GeometryInstanceFlagBitsKHR where
- GeometryInstanceFlagBitsKHR Flags
- pattern GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXT :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_OPACITY_MICROMAP_2_STATE_BIT_EXT :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- pattern GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHR :: GeometryInstanceFlagBitsKHR
- type GeometryInstanceFlagsKHR = GeometryInstanceFlagBitsKHR
- newtype GeometryFlagBitsKHR where
- type GeometryFlagsKHR = GeometryFlagBitsKHR
- newtype BuildAccelerationStructureFlagBitsKHR where
- BuildAccelerationStructureFlagBitsKHR Flags
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR
- type BuildAccelerationStructureFlagsKHR = BuildAccelerationStructureFlagBitsKHR
- newtype CopyAccelerationStructureModeKHR where
- CopyAccelerationStructureModeKHR Int32
- pattern COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR :: CopyAccelerationStructureModeKHR
- pattern COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR :: CopyAccelerationStructureModeKHR
- newtype AccelerationStructureTypeKHR where
- newtype GeometryTypeKHR where
- GeometryTypeKHR Int32
- pattern GEOMETRY_TYPE_AABBS_KHR :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_SPHERES_NV :: GeometryTypeKHR
- pattern GEOMETRY_TYPE_TRIANGLES_KHR :: GeometryTypeKHR
- newtype RayTracingShaderGroupTypeKHR where
- RayTracingShaderGroupTypeKHR Int32
- pattern RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR :: RayTracingShaderGroupTypeKHR
- type MemoryRequirements2KHR = MemoryRequirements2
- pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagBitsKHR
- type SHADER_UNUSED_KHR = 4294967295
- pattern SHADER_UNUSED_KHR :: Word32
Documentation
Arguments
| :: MonadIO io | |
| => Device |
|
| -> Pipeline |
|
| -> ("shader" ::: Word32) |
|
| -> io () |
vkCompileDeferredNV - Deferred compilation of shaders
Return Codes
See Also
createAccelerationStructureNV Source #
Arguments
| :: forall (a :: [Type]) io. (Extendss AccelerationStructureCreateInfoNV a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> AccelerationStructureCreateInfoNV a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io AccelerationStructureNV |
vkCreateAccelerationStructureNV - Create a new acceleration structure object
Description
Similarly to other objects in Vulkan, the acceleration structure
creation merely creates an object with a specific “shape” as specified
by the information in AccelerationStructureInfoNV and compactedSize
in pCreateInfo.
Once memory has been bound to the acceleration structure using
bindAccelerationStructureMemoryNV, that memory is populated by calls
to cmdBuildAccelerationStructureNV and
cmdCopyAccelerationStructureNV.
Acceleration structure creation uses the count and type information from the geometries, but does not use the data references in the structures.
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pCreateInfomust be a valid pointer to a validAccelerationStructureCreateInfoNVstructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pAccelerationStructuremust be a valid pointer to aAccelerationStructureNVhandle - The device
must have been created with at least
1queue
Return Codes
See Also
VK_NV_ray_tracing,
AccelerationStructureCreateInfoNV,
AccelerationStructureNV,
AllocationCallbacks,
Device
withAccelerationStructureNV :: forall (a :: [Type]) io r. (Extendss AccelerationStructureCreateInfoNV a, PokeChain a, MonadIO io) => Device -> AccelerationStructureCreateInfoNV a -> Maybe AllocationCallbacks -> (io AccelerationStructureNV -> (AccelerationStructureNV -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createAccelerationStructureNV and destroyAccelerationStructureNV
To ensure that destroyAccelerationStructureNV 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.
destroyAccelerationStructureNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> AccelerationStructureNV |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyAccelerationStructureNV - Destroy an acceleration structure object
Valid Usage
-
If
AllocationCallbackswere provided whenaccelerationStructurewas created, a compatible set of callbacks must be provided here -
If no
AllocationCallbackswere provided whenaccelerationStructurewas created,pAllocatormust beNULL
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
If
accelerationStructureis notNULL_HANDLE,accelerationStructuremust be a validAccelerationStructureNVhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
If
accelerationStructureis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
accelerationStructuremust be externally synchronized
See Also
VK_NV_ray_tracing,
AccelerationStructureNV,
AllocationCallbacks,
Device
getAccelerationStructureMemoryRequirementsNV Source #
Arguments
| :: forall (a :: [Type]) io. (Extendss MemoryRequirements2KHR a, PokeChain a, PeekChain a, MonadIO io) | |
| => Device |
|
| -> AccelerationStructureMemoryRequirementsInfoNV |
|
| -> io (MemoryRequirements2KHR a) |
vkGetAccelerationStructureMemoryRequirementsNV - Get acceleration structure memory requirements
Valid Usage (Implicit)
See Also
VK_NV_ray_tracing,
AccelerationStructureMemoryRequirementsInfoNV,
Device,
MemoryRequirements2
bindAccelerationStructureMemoryNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> ("bindInfos" ::: Vector BindAccelerationStructureMemoryInfoNV) |
|
| -> io () |
vkBindAccelerationStructureMemoryNV - Bind acceleration structure memory
Return Codes
See Also
VK_NV_ray_tracing,
BindAccelerationStructureMemoryInfoNV, Device
cmdCopyAccelerationStructureNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("dst" ::: AccelerationStructureNV) |
|
| -> ("src" ::: AccelerationStructureNV) |
|
| -> CopyAccelerationStructureModeKHR |
|
| -> io () |
vkCmdCopyAccelerationStructureNV - Copy an acceleration structure
Description
Accesses to src and dst must be
synchronized
with the
PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage
or the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage,
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
or
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR
as appropriate.
Valid Usage
-
modemust beCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRorCOPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR
- The source
acceleration structure
srcmust have been constructed prior to the execution of this command - If
modeisCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR,srcmust have been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRin the build - The
bufferused to createsrcmust be bound to device memory - The
bufferused to createdstmust be bound to device memory - The range of
memory backing
dstthat is accessed by this command must not overlap the memory backingsrcthat is accessed by this command -
dstmust be bound completely and contiguously to a singleDeviceMemoryobject viabindAccelerationStructureMemoryNV
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
dstmust be a validAccelerationStructureNVhandle -
srcmust be a validAccelerationStructureNVhandle -
modemust be a validCopyAccelerationStructureModeKHRvalue -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
- Each of
commandBuffer,dst, andsrcmust have been created, allocated, or retrieved from the sameDevice
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 | VK_QUEUE_COMPUTE_BIT | Action |
Conditional Rendering
vkCmdCopyAccelerationStructureNV is not affected by conditional rendering
See Also
VK_NV_ray_tracing,
AccelerationStructureNV,
CommandBuffer,
CopyAccelerationStructureModeKHR
cmdWriteAccelerationStructuresPropertiesNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("accelerationStructures" ::: Vector AccelerationStructureNV) |
|
| -> QueryType |
|
| -> QueryPool |
|
| -> ("firstQuery" ::: Word32) |
|
| -> io () |
vkCmdWriteAccelerationStructuresPropertiesNV - Write acceleration structure result parameters to query results.
Description
Accesses to any of the acceleration structures listed in
pAccelerationStructures must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR.
Valid Usage
-
The queries identified by
queryPoolandfirstQuerymust be unavailable -
accelerationStructuremust be bound completely and contiguously to a singleDeviceMemoryobject viabindAccelerationStructureMemoryNV -
All acceleration structures in
pAccelerationStructuresmust have been built prior to the execution of this command -
All acceleration structures in
pAccelerationStructuresmust have been built withBUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRifqueryTypeisQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV -
queryTypemust beQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalidAccelerationStructureNVhandles -
queryTypemust be a validQueryTypevalue -
queryPoolmust be a validQueryPoolhandle -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
-
accelerationStructureCountmust be greater than0 -
Each of
commandBuffer,queryPool, and the elements ofpAccelerationStructuresmust have been created, allocated, or retrieved from the sameDevice
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 | VK_QUEUE_COMPUTE_BIT | Action |
Conditional Rendering
vkCmdWriteAccelerationStructuresPropertiesNV is not affected by conditional rendering
See Also
VK_NV_ray_tracing,
AccelerationStructureNV,
CommandBuffer,
QueryPool,
QueryType
cmdBuildAccelerationStructureNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> AccelerationStructureInfoNV |
|
| -> ("instanceData" ::: Buffer) |
|
| -> ("instanceOffset" ::: DeviceSize) |
|
| -> ("update" ::: Bool) |
|
| -> ("dst" ::: AccelerationStructureNV) |
|
| -> ("src" ::: AccelerationStructureNV) |
|
| -> ("scratch" ::: Buffer) |
|
| -> ("scratchOffset" ::: DeviceSize) |
|
| -> io () |
vkCmdBuildAccelerationStructureNV - Build an acceleration structure
Description
Accesses to dst, src, and scratch must be
synchronized
with the
PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage
and an
access type
of
ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR
or
ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR.
Valid Usage
-
geometryCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxGeometryCount
-
dstmust have been created with compatibleAccelerationStructureInfoNVwhereAccelerationStructureInfoNV::typeandAccelerationStructureInfoNV::flagsare identical,AccelerationStructureInfoNV::instanceCountandAccelerationStructureInfoNV::geometryCountfordstare greater than or equal to the build size and each geometry inAccelerationStructureInfoNV::pGeometriesfordsthas greater than or equal to the number of vertices, indices, and AABBs - If
updateisTRUE,srcmust not beNULL_HANDLE - If
updateisTRUE,srcmust have previously been constructed withBUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NVset inAccelerationStructureInfoNV::flagsin the original build - If
updateisFALSE, thesizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithAccelerationStructureMemoryRequirementsInfoNV::accelerationStructureset todstandAccelerationStructureMemoryRequirementsInfoNV::typeset toACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NVmust be less than or equal to the size ofscratchminusscratchOffset - If
updateisTRUE, thesizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithAccelerationStructureMemoryRequirementsInfoNV::accelerationStructureset todstandAccelerationStructureMemoryRequirementsInfoNV::typeset toACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NVmust be less than or equal to the size ofscratchminusscratchOffset -
scratchmust have been created with theBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag set - If
instanceDatais notNULL_HANDLE,instanceDatamust have been created with theBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag set -
Each
AccelerationStructureInstanceKHR::accelerationStructureReferencevalue ininstanceDatamust be a value obtained fromgetAccelerationStructureHandleNVfor a bottom level acceleration structure - If
updateisTRUE, then objects that were previously active must not be made inactive as per https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#acceleration-structure-inactive-prims - If
updateisTRUE, then objects that were previously inactive must not be made active as per https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#acceleration-structure-inactive-prims - If
updateisTRUE, thesrcanddstobjects must either be the same object or not have any memory aliasing -
dstmust be bound completely and contiguously to a singleDeviceMemoryobject viabindAccelerationStructureMemoryNV
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pInfomust be a valid pointer to a validAccelerationStructureInfoNVstructure - If
instanceDatais notNULL_HANDLE,instanceDatamust be a validBufferhandle -
dstmust be a validAccelerationStructureNVhandle - If
srcis notNULL_HANDLE,srcmust be a validAccelerationStructureNVhandle -
scratchmust be a validBufferhandle -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
- Each of
commandBuffer,dst,instanceData,scratch, andsrcthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
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 | VK_QUEUE_COMPUTE_BIT | Action |
Conditional Rendering
vkCmdBuildAccelerationStructureNV is not affected by conditional rendering
See Also
VK_NV_ray_tracing,
AccelerationStructureInfoNV,
AccelerationStructureNV,
Bool32, Buffer,
CommandBuffer,
DeviceSize
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("raygenShaderBindingTableBuffer" ::: Buffer) |
|
| -> ("raygenShaderBindingOffset" ::: DeviceSize) |
|
| -> ("missShaderBindingTableBuffer" ::: Buffer) |
|
| -> ("missShaderBindingOffset" ::: DeviceSize) |
|
| -> ("missShaderBindingStride" ::: DeviceSize) |
|
| -> ("hitShaderBindingTableBuffer" ::: Buffer) |
|
| -> ("hitShaderBindingOffset" ::: DeviceSize) |
|
| -> ("hitShaderBindingStride" ::: DeviceSize) |
|
| -> ("callableShaderBindingTableBuffer" ::: Buffer) |
|
| -> ("callableShaderBindingOffset" ::: DeviceSize) |
|
| -> ("callableShaderBindingStride" ::: DeviceSize) |
|
| -> ("width" ::: Word32) |
|
| -> ("height" ::: Word32) |
|
| -> ("depth" ::: Word32) |
|
| -> io () |
vkCmdTraceRaysNV - 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_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal 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 withmagFilterorminFilterequal toFILTER_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
Samplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal 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_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
Samplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aImageViewas a result of this command, then the image view’slevelCountandlayerCountmust be 1 - If a
Samplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aImageViewas a result of this command, then the image view’sviewTypemust beIMAGE_VIEW_TYPE_1DorIMAGE_VIEW_TYPE_2D - If a
Samplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aImageViewas a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name - If a
Samplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aImageViewas a result of this command, then the sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values - 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 - If a
a bound shader
was created as a
ShaderEXTwithout theSHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXTflag or as part of a pipeline without thePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTflag, and that shader statically uses a set n, a descriptor set must have been bound to n at the same pipeline bind point, with aPipelineLayoutthat is compatible for set n, with thePipelineLayoutused to create the currentPipelineor theDescriptorSetLayoutarray used to create the currentShaderEXT, as described in ??? - If a
a bound shader
was created as a
ShaderEXTwithout theSHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXTflag or as part of a pipeline without thePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTflag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants with thePipelineLayoutused to create the currentPipelineor theDescriptorSetLayoutarray used to create the currentShaderEXT - For each array of resources that is used by a bound shader, the indices used to access members of the array must be less than the descriptor count for the identified binding in the descriptor sets used by this command
- If a
a bound shader
was created as a
ShaderEXTwithout theSHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXTflag or as part of a pipeline without thePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTflag, and that shader statically uses a push constant value, that value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants with thePipelineLayoutused to create the currentPipelineor theDescriptorSetLayoutandPushConstantRangearrays used to create the currentShaderEXT - Descriptors in each bound
descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are accessed as described by descriptor validity by thePipelinebound to the pipeline bind point used by this command and the boundPipelinewas not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If an image descriptor is
accessed by a shader, the
ImageLayoutmust match the subresource accessible from theImageViewas defined by the image layout matching rules - 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 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 specified
statically in the
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - 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_ACCESSorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2foruniformBuffers, 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_ACCESSorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2forstorageBuffers, 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
ImageViewis accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in ??? - If a
ImageVieworBufferViewis accessed as a result of this command, then the numeric type of the view’sformatand theSampledTypeoperand of theOpTypeImagemust match - If a
ImageViewcreated with a format other thanFORMAT_A8_UNORMis 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_UNORMis 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
OpImageSampleWeightedQCOMis 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
OpImageSampleWeightedQCOMuses 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
OpImageSampleWeightedQCOM,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
OpImageSampleWeightedQCOM,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
- If a descriptor with type equal
to any of
DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM,DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM,DESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGE, orDESCRIPTOR_TYPE_INPUT_ATTACHMENTis accessed as a result of this command, all image subresources identified by that descriptor must be in the image layout identified when the descriptor was written - The
DeviceMemoryobject allocated from aMemoryHeapwith theMEMORY_HEAP_TILE_MEMORY_BIT_QCOMproperty that is bound to a resource accessed as a result of this command must be the active bound bound tile memory object incommandBuffer - If this command is recorded
inside a
tile shading render pass
instance, the stages corresponding to the pipeline bind point used
by this command must only include
SHADER_STAGE_VERTEX_BIT,SHADER_STAGE_FRAGMENT_BIT, and/orSHADER_STAGE_COMPUTE_BIT - If this command is recorded where
per-tile execution model
is enabled, there must be no access to any image while the image
was be transitioned to the
IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXTlayout - If a
DESCRIPTOR_TYPE_TENSOR_ARMdescriptor is accessed as a result of this command, then the underlyingTensorARMobject must have been created with theTENSOR_USAGE_SHADER_BIT_ARMusage flag set - If a
DESCRIPTOR_TYPE_TENSOR_ARMdescriptor is accessed as a result of this command, then theRankof theOpTypeTensorARMof the tensor resource variable must be equal to thedimensionCountprovided viaTensorCreateInfoARM::pDescriptionwhen creating the underlyingTensorARMobject - If a
DESCRIPTOR_TYPE_TENSOR_ARMdescriptor is accessed as a result of this command, then the element type of theOpTypeTensorARMof the tensor resource variable must be compatible with theFormatof theTensorViewARMused for the access - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, orDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses aOpTypeStructdecorated withBlockorBufferBlockusing that mapping, the calculated offset for the resource heap must be a multiple of bufferDescriptorAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, orDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeImageorOpTypeSampledImageusing that mapping, the calculated offset for the resource heap must be a multiple of imageDescriptorAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, orDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeSamplerorOpTypeSampledImageusing that mapping, the calculated offset for the sampler heap must be a multiple of samplerDescriptorAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_PUSH_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_SHADER_RECORD_INDEX_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, orDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses anOpTypeTensorARMusing that mapping, the calculated offset for the resource heap must be a multiple of tensorDescriptorAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXTorDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 4 - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXTorDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validDeviceAddressbacked by physical memory at every offset specified by each mapping - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validDeviceAddress - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a multiple of 8 - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address at the expected location in push data must be a validDeviceAddressbacked by physical memory at every offset specified by each mapping - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the value of the address pointed to by the address in push data must be a validDeviceAddress - For each descriptor heap that is statically used by a bound shader, either directly or via a descriptor mapping, a valid descriptor heap must be bound
- If a
bound shader
was created as a
ShaderEXTwith theSHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXTflag or as part of a pipeline with thePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTflag, execution of this command must not result in any descriptor read accessing data outside of the user range of the respective heap bound byvkCmdBind*HeapEXTcommands - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a uniform buffer or uniform texel buffer through a descriptor in the bound resource heap, that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESSorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2foruniformBuffers, the robustBufferAccess2 feature is not enabled, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the descriptor specified viaDeviceAddressRangeEXTwhen the descriptor was written - If any stage of the
Pipelineobject bound to the pipeline bind point used by this command accesses a storage buffer or storage texel buffer through a descriptor in the bound resource heap, that stage was created without enabling eitherPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESSorPIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2forstorageBuffers, the robustBufferAccess2 feature is not enabled, and the robustBufferAccess feature is not enabled, that stage must not access values outside of the range of the descriptor specified byDeviceAddressRangeEXTwhen the descriptor was written - If the
robustBufferAccess2
feature is not enabled, 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, uniform texel buffer, storage buffer, or storage texel buffer, that shader must not access values outside of the range of the buffer as specified byDeviceAddressRangeEXTwhen the descriptor was written - If any
bound shader
uses an embedded sampler via a
descriptor mapping,
the value of
pBindInfo->reservedRangeSizeset forcmdBindSamplerHeapEXTmust be greater than or equal to minSamplerHeapReservedRangeWithEmbedded - If a
bound shader
was created as a
ShaderEXTwith theSHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXTflag or as part of a pipeline with thePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTflag, and that shader statically uses a push constant value, that value must have been set bycmdPushDataEXT - If a
bound shader
was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_DATA_EXT,DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_DATA_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_RESOURCE_HEAP_DATA_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the access must not be out of bounds - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT,DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a resource using that mapping, the buffer from which the address in push data was queried must have been created with theBUFFER_USAGE_UNIFORM_BUFFER_BITusage flag set - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must have been queried from a buffer created with theBUFFER_USAGE_UNIFORM_BUFFER_BITusage flag set - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a uniform buffer using that mapping, the address that the uniform buffer is mapped to must be aligned to minUniformBufferOffsetAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must have been queried from a buffer created with theBUFFER_USAGE_STORAGE_BUFFER_BITusage flag set - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses a storage buffer using that mapping, the address that the storage buffer is mapped to must be aligned to minStorageBufferOffsetAlignment - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, and a shader accesses an acceleration structure using that mapping, the address that the acceleration structure is mapped to must be an acceleration structure address retrieved from aAccelerationStructureKHRobject viagetAccelerationStructureDeviceAddressKHRor handle retrieved from aAccelerationStructureNVobject viagetAccelerationStructureHandleNV - If a shader uses a sampler
descriptor to sample an image as a result of this command, and that
sampler descriptor uses a custom border color with an index defined
by
SamplerCustomBorderColorIndexCreateInfoEXT, the value ofSamplerCustomBorderColorIndexCreateInfoEXT::indexmust have been registered before this command was recorded, and still be registered during the sampling operation, with an identically defined color - If
protectedNoFault
is not supported, a pipeline is bound to the pipeline bind point
used by this command, or a shader is bound to a shader stage used by
this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_PUSH_ADDRESS_EXT,DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, orDESCRIPTOR_MAPPING_SOURCE_INDIRECT_ADDRESS_EXT, the address that the resource is mapped to must have been queried from a buffer created without theBUFFER_CREATE_PROTECTED_BITcreate flag set - If
protectedNoFault
is not supported, a pipeline is bound to the pipeline bind point
used by this command, or a shader is bound to a shader stage used by
this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_EXTorDESCRIPTOR_MAPPING_SOURCE_HEAP_WITH_INDIRECT_INDEX_ARRAY_EXT, the address of the indirect memory must have been queried from a buffer created without theBUFFER_CREATE_PROTECTED_BITcreate flag set - Any shader group handle referenced by this call must have been queried from the bound ray tracing pipeline
- If the bound ray tracing pipeline
state was created with the
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHRdynamic state enabled thencmdSetRayTracingPipelineStackSizeKHRmust have been called in the current command buffer prior to this trace command - If a pipeline is bound to the
pipeline bind point used by this command, or shader is bound to a
shader stage used by this command, and it was created with a
descriptor mapping
using
DESCRIPTOR_MAPPING_SOURCE_SHADER_RECORD_ADDRESS_EXT, the value of the address at the expected location in shader record data must be a valid address -
commandBuffermust not be a protected command buffer - This command must
not cause a pipeline trace ray instruction to be executed from a
shader invocation with a
recursion depth
greater than the value of
maxRecursionDepthused to create the bound ray tracing pipeline - If
raygenShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
raygenShaderBindingOffsetmust be less than the size ofraygenShaderBindingTableBuffer -
raygenShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment - If
missShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
missShaderBindingOffsetmust be less than the size ofmissShaderBindingTableBuffer -
missShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment - If
hitShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
hitShaderBindingOffsetmust be less than the size ofhitShaderBindingTableBuffer -
hitShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment - If
callableShaderBindingTableBufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
callableShaderBindingOffsetmust be less than the size ofcallableShaderBindingTableBuffer -
callableShaderBindingOffsetmust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignment -
missShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
hitShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
callableShaderBindingStridemust be a multiple ofPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize -
missShaderBindingStridemust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
hitShaderBindingStridemust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
callableShaderBindingStridemust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStride -
widthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[0] -
heightmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[1] -
depthmust be less than or equal toPhysicalDeviceLimits::maxComputeWorkGroupCount[2] - If
the traced geometry contains a cluster acceleration structure, then
VkRayTracingPipelineClusterAccelerationStructureCreateInfoNV::
allowClusterAccelerationStructuremust have been set for that pipeline
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
raygenShaderBindingTableBuffermust be a validBufferhandle - If
missShaderBindingTableBufferis notNULL_HANDLE,missShaderBindingTableBuffermust be a validBufferhandle - If
hitShaderBindingTableBufferis notNULL_HANDLE,hitShaderBindingTableBuffermust be a validBufferhandle -
If
callableShaderBindingTableBufferis notNULL_HANDLE,callableShaderBindingTableBuffermust be a validBufferhandle -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
- Each of
callableShaderBindingTableBuffer,commandBuffer,hitShaderBindingTableBuffer,missShaderBindingTableBuffer, andraygenShaderBindingTableBufferthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
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 | VK_QUEUE_COMPUTE_BIT | Action |
Conditional Rendering
vkCmdTraceRaysNV is not affected by conditional rendering
See Also
getAccelerationStructureHandleNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> AccelerationStructureNV |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> io () |
vkGetAccelerationStructureHandleNV - Get opaque acceleration structure handle
Return Codes
See Also
createRayTracingPipelinesNV Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> PipelineCache |
|
| -> ("createInfos" ::: Vector (SomeStruct RayTracingPipelineCreateInfoNV)) |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io (Result, "pipelines" ::: Vector Pipeline) |
vkCreateRayTracingPipelinesNV - Creates a new ray tracing pipeline object
Description
Pipelines are created and returned as described for Multiple Pipeline Creation.
Valid Usage
-
devicemust support at least one queue family with theQUEUE_COMPUTE_BITcapability
- 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_BASE_BITflag - If
pipelineCachewas created withPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access topipelineCachemust be externally synchronized - If
PipelineBinaryInfoKHR::binaryCountis not0for any element ofpCreateInfos,pipelineCachemust beNULL_HANDLE - If a
PipelineCreateFlags2CreateInfoKHRstructure with thePIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHRflag set is included in thepNextchain of any element ofpCreateInfos,pipelineCachemust beNULL_HANDLE - If
PipelineBinaryInfoKHR::binaryCountis not0for any element ofpCreateInfos,PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BITmust not be set in theflagsof that element - If
PipelineBinaryInfoKHR::binaryCountis not0for any element ofpCreateInfos,PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BITmust not be set in theflagsof that element - If
PipelineBinaryInfoKHR::binaryCountis not0for any element ofpCreateInfos,PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXTmust not be set in theflagsof that element - If any
element of
pCreateInfossetsPIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTand includes embedded sampler mappings, there must be less than (maxSamplerAllocationCount - (minSamplerHeapReservedRangeWithEmbedded
/
samplerDescriptorSize))
Samplerobjects currently created on the device - If any
element of
pCreateInfossetsPIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXTand includes embedded sampler mappings, this command must not cause the total number of unique embedded samplers in pipelines and shaders on this device to exceed maxDescriptorHeapEmbeddedSamplers - If a
PipelineCreateFlags2CreateInfoKHRstructure is included in thepNextchain of any element ofpCreateInfos,PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHRflag must not be set
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
- If
pipelineCacheis notNULL_HANDLE,pipelineCachemust be a validPipelineCachehandle -
pCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidRayTracingPipelineCreateInfoNVstructures - 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
pipelineCacheis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
See Also
VK_NV_ray_tracing,
AllocationCallbacks,
Device, Pipeline,
PipelineCache, RayTracingPipelineCreateInfoNV
withRayTracingPipelinesNV :: MonadIO io => Device -> PipelineCache -> Vector (SomeStruct RayTracingPipelineCreateInfoNV) -> Maybe AllocationCallbacks -> (io (Result, Vector Pipeline) -> ((Result, Vector Pipeline) -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createRayTracingPipelinesNV 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.
pattern SHADER_UNUSED_NV :: Word32 Source #
pattern SHADER_STAGE_RAYGEN_BIT_NV :: ShaderStageFlagBits Source #
pattern SHADER_STAGE_ANY_HIT_BIT_NV :: ShaderStageFlagBits Source #
pattern SHADER_STAGE_MISS_BIT_NV :: ShaderStageFlagBits Source #
pattern SHADER_STAGE_CALLABLE_BIT_NV :: ShaderStageFlagBits Source #
pattern INDEX_TYPE_NONE_NV :: IndexType Source #
pattern RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR Source #
pattern RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV :: RayTracingShaderGroupTypeKHR Source #
pattern GEOMETRY_TYPE_TRIANGLES_NV :: GeometryTypeKHR Source #
pattern GEOMETRY_TYPE_AABBS_NV :: GeometryTypeKHR Source #
pattern GEOMETRY_OPAQUE_BIT_NV :: GeometryFlagBitsKHR Source #
pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV :: GeometryInstanceFlagBitsKHR Source #
pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR Source #
pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR Source #
pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV :: BuildAccelerationStructureFlagBitsKHR Source #
pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV :: BuildAccelerationStructureFlagBitsKHR Source #
pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV :: BuildAccelerationStructureFlagBitsKHR Source #
getRayTracingShaderGroupHandlesNV :: MonadIO io => Device -> Pipeline -> ("firstGroup" ::: Word32) -> ("groupCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> io () Source #
data RayTracingShaderGroupCreateInfoNV Source #
VkRayTracingShaderGroupCreateInfoNV - Structure specifying shaders in a shader group
Valid Usage
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NVthengeneralShadermust be a valid index intoRayTracingPipelineCreateInfoNV::pStagesreferring to a shader ofSHADER_STAGE_RAYGEN_BIT_NV,SHADER_STAGE_MISS_BIT_NV, orSHADER_STAGE_CALLABLE_BIT_NV
- If
typeisRAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NVthenclosestHitShader,anyHitShader, andintersectionShadermust beSHADER_UNUSED_NV - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NVthenintersectionShadermust be a valid index intoRayTracingPipelineCreateInfoNV::pStagesreferring to a shader ofSHADER_STAGE_INTERSECTION_BIT_NV - If
typeisRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NVthenintersectionShadermust beSHADER_UNUSED_NV -
closestHitShadermust be eitherSHADER_UNUSED_NVor a valid index intoRayTracingPipelineCreateInfoNV::pStagesreferring to a shader ofSHADER_STAGE_CLOSEST_HIT_BIT_NV -
anyHitShadermust be eitherSHADER_UNUSED_NVor a valid index intoRayTracingPipelineCreateInfoNV::pStagesreferring to a shader ofSHADER_STAGE_ANY_HIT_BIT_NV
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV
-
pNextmust beNULL -
typemust be a validRayTracingShaderGroupTypeKHRvalue
See Also
VK_NV_ray_tracing,
RayTracingPipelineCreateInfoNV,
RayTracingShaderGroupTypeKHR,
StructureType
Constructors
| RayTracingShaderGroupCreateInfoNV | |
Fields
| |
Instances
data RayTracingPipelineCreateInfoNV (es :: [Type]) Source #
VkRayTracingPipelineCreateInfoNV - Structure specifying parameters of a newly created ray tracing pipeline
Description
The parameters basePipelineHandle and basePipelineIndex are
described in more detail in
Pipeline Derivatives.
If the pNext chain includes a
PipelineCreateFlags2CreateInfo
structure,
PipelineCreateFlags2CreateInfo::flags
from that structure is used instead of flags from this structure.
Valid Usage
- If the
pNextchain does not include aPipelineCreateFlags2CreateInfostructure,flagsmust be a valid combination ofPipelineCreateFlagBitsvalues
- 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 and
layoutis notNULL_HANDLE, a push constant range inlayoutmust match the shader stage - If a push
constant block is declared in a shader and
layoutis notNULL_HANDLE, the block must be contained inside the push constant range inlayoutthat matches the stage - If a
resource variable
is declared in a shader and
layoutis notNULL_HANDLE, the corresponding descriptor set inlayoutmust match the shader stage - If a
resource variable
is declared in a shader,
layoutis notNULL_HANDLE, and the descriptor type is notDESCRIPTOR_TYPE_MUTABLE_EXT, the corresponding descriptor set inlayoutmust match the descriptor type - If a
resource variable
is declared in a shader as an array and
layoutis notNULL_HANDLE, the corresponding descriptor binding used to createlayoutmust have adescriptorCountthat is greater than or equal to the length of the array - If a
resource variables
is declared in a shader as an array of descriptors, then the
descriptor type of that variable must not be
DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK - If
shader64BitIndexing
feature is not enabled,
flagsmust not containPIPELINE_CREATE_2_64_BIT_INDEXING_BIT_EXT -
If the
pipelineCreationCacheControl
feature is not enabled,
flagsmust not includePIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BITnorPIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT -
If the
pipelineProtectedAccess
feature is not enabled,
flagsmust not includePIPELINE_CREATE_NO_PROTECTED_ACCESS_BITnorPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT -
flagsmust not include bothPIPELINE_CREATE_NO_PROTECTED_ACCESS_BITandPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT - If
PipelineCreateFlags2CreateInfoKHR::flagsincludesPIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT,layoutmust beNULL_HANDLE - If
PipelineCreateFlags2CreateInfoKHR::flagsincludesPIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, all shader variables in the shader resource interface with aDescriptorSetandBindingdecoration must have a mapping declared inShaderDescriptorSetAndBindingMappingInfoEXT::pMappings - 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 -
flagsmust not includePIPELINE_CREATE_NO_PROTECTED_ACCESS_BITnorPIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT - The
stagemember of at least one element ofpStagesmust beSHADER_STAGE_RAYGEN_BIT_KHR -
flagsmust not includePIPELINE_CREATE_LIBRARY_BIT_KHR -
maxRecursionDepthmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxRecursionDepth -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV -
flagsmust not include bothPIPELINE_CREATE_DEFER_COMPILE_BIT_NVandPIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BITat the same time -
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 -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT -
flagsmust not includePIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV -
flagsmust not includePIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT - If
PipelineCreateFlags2CreateInfoKHR::flagsdoes not includePIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT,layoutmust not beNULL_HANDLE
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofPipelineCreateFlags2CreateInfoorPipelineCreationFeedbackCreateInfo - The
sTypevalue of each structure in thepNextchain must be unique -
pStagesmust be a valid pointer to an array ofstageCountvalidPipelineShaderStageCreateInfostructures -
pGroupsmust be a valid pointer to an array ofgroupCountvalidRayTracingShaderGroupCreateInfoNVstructures - If
layoutis notNULL_HANDLE,layoutmust be a validPipelineLayouthandle -
stageCountmust be greater than0 -
groupCountmust be greater than0 - Both of
basePipelineHandle, andlayoutthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_NV_ray_tracing,
Pipeline,
PipelineCreateFlags,
PipelineLayout,
PipelineShaderStageCreateInfo,
RayTracingShaderGroupCreateInfoNV,
StructureType,
createRayTracingPipelinesNV
Constructors
| RayTracingPipelineCreateInfoNV | |
Fields
| |
Instances
data GeometryTrianglesNV Source #
VkGeometryTrianglesNV - Structure specifying a triangle geometry in a bottom-level acceleration structure
Description
If indexType is INDEX_TYPE_NONE_NV, then this structure describes a
set of triangles determined by vertexCount. Otherwise, this structure
describes a set of indexed triangles determined by indexCount.
Valid Usage
-
vertexOffsetmust be a multiple of the component size ofvertexFormat -
vertexFormatmust be one ofFORMAT_R32G32B32_SFLOAT,FORMAT_R32G32_SFLOAT,FORMAT_R16G16B16_SFLOAT,FORMAT_R16G16_SFLOAT,FORMAT_R16G16_SNORM, orFORMAT_R16G16B16_SNORM -
vertexStridemust be less than or equal to 232-1 -
indexOffsetmust be less than the size ofindexData -
indexOffsetmust be a multiple of the element size ofindexType -
indexTypemust beINDEX_TYPE_UINT16,INDEX_TYPE_UINT32, orINDEX_TYPE_NONE_NV -
indexDatamust beNULL_HANDLEifindexTypeisINDEX_TYPE_NONE_NV -
indexDatamust be a validBufferhandle ifindexTypeis notINDEX_TYPE_NONE_NV -
indexCountmust be0ifindexTypeisINDEX_TYPE_NONE_NV -
transformOffsetmust be less than the size oftransformData -
transformOffsetmust be a multiple of16
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
-
pNextmust beNULL - If
vertexDatais notNULL_HANDLE,vertexDatamust be a validBufferhandle -
vertexFormatmust be a validFormatvalue - If
indexDatais notNULL_HANDLE,indexDatamust be a validBufferhandle -
indexTypemust be a validIndexTypevalue - If
transformDatais notNULL_HANDLE,transformDatamust be a validBufferhandle - Each of
indexData,transformData, andvertexDatathat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_NV_ray_tracing,
Buffer,
DeviceSize,
Format, GeometryDataNV,
IndexType,
StructureType
Constructors
| GeometryTrianglesNV | |
Fields
| |
Instances
data GeometryAABBNV Source #
VkGeometryAABBNV - Structure specifying axis-aligned bounding box geometry in a bottom-level acceleration structure
Description
The AABB data in memory is six 32-bit floats consisting of the minimum x, y, and z values followed by the maximum x, y, and z values.
Valid Usage
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_GEOMETRY_AABB_NV
-
pNextmust beNULL - If
aabbDatais notNULL_HANDLE,aabbDatamust be a validBufferhandle
See Also
VK_NV_ray_tracing,
Buffer,
DeviceSize, GeometryDataNV,
StructureType
Constructors
| GeometryAABBNV | |
Fields
| |
Instances
data GeometryDataNV Source #
VkGeometryDataNV - Structure specifying geometry in a bottom-level acceleration structure
Valid Usage (Implicit)
See Also
VK_NV_ray_tracing,
GeometryAABBNV, GeometryNV, GeometryTrianglesNV
Constructors
| GeometryDataNV | |
Fields
| |
Instances
data GeometryNV Source #
VkGeometryNV - Structure specifying a geometry in a bottom-level acceleration structure
Valid Usage (Implicit)
See Also
VK_NV_ray_tracing,
AccelerationStructureInfoNV, GeometryDataNV,
GeometryFlagsKHR,
GeometryTypeKHR,
StructureType
Constructors
| GeometryNV | |
Fields
| |
Instances
data AccelerationStructureInfoNV Source #
VkAccelerationStructureInfoNV - Structure specifying the parameters of acceleration structure object
Description
AccelerationStructureInfoNV contains information that is used both for
acceleration structure creation with createAccelerationStructureNV and
in combination with the actual geometric data to build the acceleration
structure with cmdBuildAccelerationStructureNV.
Valid Usage
-
geometryCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxGeometryCount
-
instanceCountmust be less than or equal toPhysicalDeviceRayTracingPropertiesNV::maxInstanceCount - The
total number of triangles in all geometries must be less than or
equal to
PhysicalDeviceRayTracingPropertiesNV::maxTriangleCount - If
typeisACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NVthengeometryCountmust be0 - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NVtheninstanceCountmust be0 - If
typeisACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NVthen thegeometryTypemember of each geometry inpGeometriesmust be the same -
typemust not beACCELERATION_STRUCTURE_TYPE_GENERIC_KHR - If
flagshas theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NVbit set, then it must not have theBUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NVbit set -
scratchmust have been created with theBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag set - If
instanceDatais notNULL_HANDLE,instanceDatamust have been created with theBUFFER_USAGE_RAY_TRACING_BIT_NVusage flag set
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV
-
pNextmust beNULL -
typemust be a validAccelerationStructureTypeNVvalue -
flagsmust be a valid combination ofBuildAccelerationStructureFlagBitsNVvalues - If
geometryCountis not0,pGeometriesmust be a valid pointer to an array ofgeometryCountvalidGeometryNVstructures
See Also
VK_NV_ray_tracing,
AccelerationStructureCreateInfoNV,
AccelerationStructureTypeKHR,
BuildAccelerationStructureFlagsKHR,
GeometryNV, StructureType,
cmdBuildAccelerationStructureNV
Constructors
| AccelerationStructureInfoNV | |
Fields
| |
Instances
| Show AccelerationStructureInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_ray_tracing Methods showsPrec :: Int -> AccelerationStructureInfoNV -> ShowS # show :: AccelerationStructureInfoNV -> String # showList :: [AccelerationStructureInfoNV] -> ShowS # | |
| FromCStruct AccelerationStructureInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_ray_tracing | |
| ToCStruct AccelerationStructureInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_ray_tracing Methods withCStruct :: AccelerationStructureInfoNV -> (Ptr AccelerationStructureInfoNV -> IO b) -> IO b Source # pokeCStruct :: Ptr AccelerationStructureInfoNV -> AccelerationStructureInfoNV -> IO b -> IO b Source # withZeroCStruct :: (Ptr AccelerationStructureInfoNV -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr AccelerationStructureInfoNV -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero AccelerationStructureInfoNV Source # | |
Defined in Vulkan.Extensions.VK_NV_ray_tracing Methods | |
data AccelerationStructureCreateInfoNV (es :: [Type]) Source #
VkAccelerationStructureCreateInfoNV - Structure specifying the parameters of a newly created acceleration structure object
Valid Usage
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV
-
pNextmust beNULLor a pointer to a valid instance ofOpaqueCaptureDescriptorDataCreateInfoEXT - The
sTypevalue of each structure in thepNextchain must be unique -
infomust be a validAccelerationStructureInfoNVstructure
See Also
VK_NV_ray_tracing,
AccelerationStructureInfoNV,
DeviceSize,
StructureType,
createAccelerationStructureNV
Constructors
| AccelerationStructureCreateInfoNV | |
Fields
| |
Instances
data BindAccelerationStructureMemoryInfoNV Source #
VkBindAccelerationStructureMemoryInfoNV - Structure specifying acceleration structure memory binding
Valid Usage
-
memoryOffsetmust be less than the size ofmemory -
memorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV -
memoryOffsetmust be an integer multiple of thealignmentmember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV - The
sizemember of theMemoryRequirementsstructure returned from a call togetAccelerationStructureMemoryRequirementsNVwithaccelerationStructureandtypeofACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NVmust be less than or equal to the size ofmemoryminusmemoryOffset
Valid Usage (Implicit)
-
pNextmust beNULL -
accelerationStructuremust be a validAccelerationStructureNVhandle -
memorymust be a validDeviceMemoryhandle -
If
deviceIndexCountis not0,pDeviceIndicesmust be a valid pointer to an array ofdeviceIndexCountuint32_tvalues - Both of
accelerationStructure, andmemorymust have been created, allocated, or retrieved from the sameDevice
See Also
VK_NV_ray_tracing,
AccelerationStructureNV,
DeviceMemory,
DeviceSize,
StructureType,
bindAccelerationStructureMemoryNV
Constructors
| BindAccelerationStructureMemoryInfoNV | |
Fields
| |
Instances
data WriteDescriptorSetAccelerationStructureNV Source #
VkWriteDescriptorSetAccelerationStructureNV - Structure specifying acceleration structure descriptor information
Valid Usage
-
Each acceleration structure in
pAccelerationStructuresmust have been created withACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHR
-
If the
nullDescriptor
feature is not enabled, each member of
pAccelerationStructuresmust not beNULL_HANDLE
Valid Usage (Implicit)
-
pAccelerationStructuresmust be a valid pointer to an array ofaccelerationStructureCountvalid orNULL_HANDLEAccelerationStructureNVhandles -
accelerationStructureCountmust be greater than0
See Also
Constructors
| WriteDescriptorSetAccelerationStructureNV | |
Fields
| |
Instances
data AccelerationStructureMemoryRequirementsInfoNV Source #
VkAccelerationStructureMemoryRequirementsInfoNV - Structure specifying acceleration to query for memory requirements
Valid Usage (Implicit)
See Also
VK_NV_ray_tracing,
AccelerationStructureMemoryRequirementsTypeNV,
AccelerationStructureNV,
StructureType,
getAccelerationStructureMemoryRequirementsNV
Constructors
| AccelerationStructureMemoryRequirementsInfoNV | |
Fields
| |
Instances
data PhysicalDeviceRayTracingPropertiesNV Source #
VkPhysicalDeviceRayTracingPropertiesNV - Properties of the physical device for ray tracing
Description
Due to the fact that the geometry, instance, and triangle counts are
specified at acceleration structure creation as 32-bit values,
maxGeometryCount, maxInstanceCount, and maxTriangleCount must
not exceed 232-1.
If the PhysicalDeviceRayTracingPropertiesNV 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
PhysicalDeviceAccelerationStructurePropertiesKHR
and
PhysicalDeviceRayTracingPipelinePropertiesKHR.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceRayTracingPropertiesNV | |
Fields
| |
Instances
newtype AccelerationStructureMemoryRequirementsTypeNV Source #
VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type
Description
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NVrequests the memory requirement for theAccelerationStructureNVbacking store.
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NVrequests the memory requirement for scratch space during the initial build.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NVrequests the memory requirement for scratch space during an update.
See Also
VK_NV_ray_tracing,
AccelerationStructureMemoryRequirementsInfoNV
Constructors
| AccelerationStructureMemoryRequirementsTypeNV Int32 |
Bundled Patterns
Instances
type GeometryFlagsNV = GeometryFlagsKHR Source #
type GeometryTypeNV = GeometryTypeKHR Source #
type AabbPositionsNV = AabbPositionsKHR Source #
type NV_RAY_TRACING_SPEC_VERSION = 3 Source #
pattern NV_RAY_TRACING_SPEC_VERSION :: Integral a => a Source #
type NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing" Source #
pattern NV_RAY_TRACING_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
newtype AccelerationStructureNV Source #
VkAccelerationStructureNV - Opaque handle to an acceleration structure object
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_NV_ray_tracing,
AccelerationStructureCaptureDescriptorDataInfoEXT,
AccelerationStructureMemoryRequirementsInfoNV,
BindAccelerationStructureMemoryInfoNV,
WriteDescriptorSetAccelerationStructureNV,
cmdBuildAccelerationStructureNV,
cmdCopyAccelerationStructureNV,
cmdWriteAccelerationStructuresPropertiesNV,
createAccelerationStructureNV,
destroyAccelerationStructureNV,
getAccelerationStructureHandleNV
Constructors
| AccelerationStructureNV Word64 |
Instances
data AabbPositionsKHR Source #
VkAabbPositionsKHR - Structure specifying two opposing corners of an axis-aligned bounding box
Valid Usage
See Also
Constructors
| AabbPositionsKHR | |
Fields | |
Instances
data TransformMatrixKHR Source #
VkTransformMatrixKHR - Structure specifying a 3x4 affine transformation matrix
Valid Usage
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureInstanceKHR,
AccelerationStructureMatrixMotionInstanceNV,
VkPartitionedAccelerationStructureWriteInstanceDataNV
Constructors
| TransformMatrixKHR | |
Fields
| |
Instances
data AccelerationStructureInstanceKHR Source #
VkAccelerationStructureInstanceKHR - Structure specifying a single acceleration structure instance for building into an acceleration structure geometry
Description
The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is for the following:
If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.
Valid Usage (Implicit)
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureMotionInstanceDataNV,
GeometryInstanceFlagsKHR, TransformMatrixKHR
Constructors
| AccelerationStructureInstanceKHR | |
Fields
| |
Instances
getRayTracingShaderGroupHandlesKHR Source #
Arguments
| :: MonadIO io | |
| => Device |
|
| -> Pipeline |
|
| -> ("firstGroup" ::: Word32) |
|
| -> ("groupCount" ::: Word32) |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> io () |
vkGetRayTracingShaderGroupHandlesKHR - Query ray tracing pipeline shader group handles
Description
On success, an array of groupCount shader handles will be written to
pData, with each element being of size
PhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleSize.
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
newtype DebugReportObjectTypeEXT Source #
VkDebugReportObjectTypeEXT - Specify the type of an object handle
Description
'
DebugReportObjectTypeEXT and Vulkan Handle Relationship
The primary expected use of ERROR_VALIDATION_FAILED_EXT is for
validation layer testing to prevent invalid commands from reaching the
ICD. It is not expected that an application would see this error code
during normal use of the validation layers. If an application returns
TRUE in
DebugUtilsMessengerCallbackDataEXT,
the validation layers will return this error code instead of passing the
command down the dispatch chain.
See Also
PFN_vkDebugReportCallbackEXT,
VK_EXT_debug_marker,
VK_EXT_debug_report,
DebugMarkerObjectNameInfoEXT,
DebugMarkerObjectTagInfoEXT,
debugReportMessageEXT
Constructors
| DebugReportObjectTypeEXT Int32 |
Bundled Patterns
Instances
newtype GeometryInstanceFlagBitsKHR Source #
VkGeometryInstanceFlagBitsKHR - Instance flag bits
Description
GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT_KHRdisables face culling for this instance.
GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING_BIT_KHRspecifies that the facing determination for geometry in this instance is inverted. Because the facing is determined in object space, an instance transform does not change the winding, but a geometry transform does.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHRcauses this instance to act as thoughGEOMETRY_OPAQUE_BIT_KHRwere specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-VNoOpaqueKHRray flag.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHRcauses this instance to act as thoughGEOMETRY_OPAQUE_BIT_KHRwere not specified on all geometries referenced by this instance. This behavior can be overridden by the SPIR-VOpaqueKHRray flag.
GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR and
GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR must not be used in the same
flag.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
GeometryInstanceFlagsKHR
Constructors
| GeometryInstanceFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype GeometryFlagBitsKHR Source #
VkGeometryFlagBitsKHR - Bitmask specifying additional parameters for a geometry
Description
GEOMETRY_OPAQUE_BIT_KHRspecifies that this geometry does not invoke the any-hit shaders even if present in a hit group.
GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHRspecifies that the implementation must only call the any-hit shader a single time for each primitive in this geometry. If this bit is absent an implementation may invoke the any-hit shader more than once for this geometry.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
GeometryFlagsKHR
Constructors
| GeometryFlagBitsKHR Flags |
Bundled Patterns
| pattern GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_KHR :: GeometryFlagBitsKHR | |
| pattern GEOMETRY_OPAQUE_BIT_KHR :: GeometryFlagBitsKHR |
Instances
newtype BuildAccelerationStructureFlagBitsKHR Source #
VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds
Description
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRspecifies that the specified acceleration structure can be updated with amodeofBUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRinAccelerationStructureBuildGeometryInfoKHRor anupdateofTRUEincmdBuildAccelerationStructureNV. For sphere and LSS primitives, only positions and radii may be updated, the provided index buffers and flags must remain unchanged from the initial build.
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRspecifies that the specified acceleration structure can act as the source for a copy acceleration structure command withmodeofCOPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRto produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHRspecifies that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHRspecifies that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHRspecifies that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXTspecifies that the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXTspecifies that the data of the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXTspecifies that the specified acceleration structure may be referenced in an instance withGEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXTset.- VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV specifies that opacity micromaps may be associated with the given cluster acceleration structure.
BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHRspecifies that the specified acceleration structure can be used when fetching the vertex and radius positions of a hit LSS or sphere primitive, or vertex positions of a hit triangle.BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NVspecifies that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR may take more
time and memory than a normal build, and so should only be used when
those features are needed.
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR are allowed to
be used together. In that case, the result of the compaction copy is
used as the source of a build with mode of
BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR to perform the compacted
update.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
BuildAccelerationStructureFlagsKHR
Constructors
| BuildAccelerationStructureFlagBitsKHR Flags |
Bundled Patterns
Instances
newtype CopyAccelerationStructureModeKHR Source #
VkCopyAccelerationStructureModeKHR - Acceleration structure copy mode
Description
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHRcreates a direct copy of the acceleration structure specified insrcinto the one specified bydst. Thedstacceleration structure must have been created with the same parameters assrc. Ifsrccontains references to other acceleration structures,dstwill reference the same acceleration structures.
COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRcreates a more compact version of an acceleration structuresrcintodst. The acceleration structuredstmust have been created with a size at least as large as that returned bycmdWriteAccelerationStructuresPropertiesNV,cmdWriteAccelerationStructuresPropertiesKHR, orwriteAccelerationStructuresPropertiesKHRafter the build of the acceleration structure specified bysrc. Ifsrccontains references to other acceleration structures,dstwill reference the same acceleration structures.COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHRserializes the acceleration structure to a semi-opaque format which can be reloaded on a compatible implementation.COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHRdeserializes the semi-opaque serialization format in the buffer to the acceleration structure.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
CopyAccelerationStructureInfoKHR,
CopyAccelerationStructureToMemoryInfoKHR,
CopyMemoryToAccelerationStructureInfoKHR,
cmdCopyAccelerationStructureNV
Constructors
| CopyAccelerationStructureModeKHR Int32 |
Bundled Patterns
Instances
newtype AccelerationStructureTypeKHR Source #
VkAccelerationStructureTypeKHR - Type of acceleration structure
Description
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_KHRis a top-level acceleration structure containing instance data referring to bottom-level acceleration structures.
ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_KHRis a bottom-level acceleration structure containing the AABBs or geometry to be intersected.ACCELERATION_STRUCTURE_TYPE_GENERIC_KHRis an acceleration structure whose type is determined at build time used for special circumstances. In these cases, the acceleration structure type is not known at creation time, but must be specified at build time as either top or bottom.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureBuildGeometryInfoKHR,
AccelerationStructureCreateInfoKHR,
AccelerationStructureInfoNV
Constructors
| AccelerationStructureTypeKHR Int32 |
Bundled Patterns
Instances
newtype GeometryTypeKHR Source #
VkGeometryTypeKHR - Enum specifying which type of geometry is provided
Description
GEOMETRY_TYPE_TRIANGLES_KHRspecifies a geometry type consisting of triangles.
GEOMETRY_TYPE_AABBS_KHRspecifies a geometry type consisting of axis-aligned bounding boxes.GEOMETRY_TYPE_INSTANCES_KHRspecifies a geometry type consisting of acceleration structure instances.GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDXspecifies a geometry type consisting of triangles from compressed data.GEOMETRY_TYPE_SPHERES_NVspecifies a geometry type consisting of spheres.GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NVspecifies a geometry type consisting of linear swept spheres.
See Also
VK_KHR_acceleration_structure,
VK_NV_ray_tracing,
AccelerationStructureGeometryKHR,
GeometryNV
Constructors
| GeometryTypeKHR Int32 |
Bundled Patterns
| pattern GEOMETRY_TYPE_AABBS_KHR :: GeometryTypeKHR | |
| pattern GEOMETRY_TYPE_DENSE_GEOMETRY_FORMAT_TRIANGLES_AMDX :: GeometryTypeKHR | |
| pattern GEOMETRY_TYPE_INSTANCES_KHR :: GeometryTypeKHR | |
| pattern GEOMETRY_TYPE_LINEAR_SWEPT_SPHERES_NV :: GeometryTypeKHR | |
| pattern GEOMETRY_TYPE_SPHERES_NV :: GeometryTypeKHR | |
| pattern GEOMETRY_TYPE_TRIANGLES_KHR :: GeometryTypeKHR |
Instances
newtype RayTracingShaderGroupTypeKHR Source #
VkRayTracingShaderGroupTypeKHR - Shader group types
Description
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRspecifies that a shader group with a singleSHADER_STAGE_RAYGEN_BIT_KHR,SHADER_STAGE_MISS_BIT_KHR, orSHADER_STAGE_CALLABLE_BIT_KHRshader in it.
RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRspecifies that a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit shaders.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHRspecifies that a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.
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
Instances
pattern GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_KHR :: GeometryInstanceFlagBitsKHR Source #
type SHADER_UNUSED_KHR = 4294967295 Source #
pattern SHADER_UNUSED_KHR :: Word32 Source #
VK_SHADER_UNUSED_KHR - Sentinel for an unused shader index