Class KHRRayTracingPipeline
To enable ray tracing, this extension adds a few different categories of new functionality:
- A new ray tracing pipeline type with new shader domains: ray generation, intersection, any-hit, closest hit, miss, and callable
- A shader binding indirection table to link shader groups with acceleration structure items
- Ray tracing commands which initiate the ray pipeline traversal and invocation of the various new shader domains depending on which traversal conditions are met
This extension adds support for the following SPIR-V extension in Vulkan:
SPV_KHR_ray_tracing
Sample Code
Example ray generation GLSL shader
#version 450 core
#extension GL_EXT_ray_tracing : require
layout(set = 0, binding = 0, rgba8) uniform image2D image;
layout(set = 0, binding = 1) uniform accelerationStructureEXT as;
layout(location = 0) rayPayloadEXT float payload;
void main()
{
vec4 col = vec4(0, 0, 0, 1);
vec3 origin = vec3(float(gl_LaunchIDEXT.x)/float(gl_LaunchSizeEXT.x), float(gl_LaunchIDEXT.y)/float(gl_LaunchSizeEXT.y), 1.0);
vec3 dir = vec3(0.0, 0.0, -1.0);
traceRayEXT(as, 0, 0xff, 0, 1, 0, origin, 0.0, dir, 1000.0, 0);
col.y = payload;
imageStore(image, ivec2(gl_LaunchIDEXT.xy), col);
}
- Name String
VK_KHR_ray_tracing_pipeline- Extension Type
- Device extension
- Registered Extension Number
- 348
- Revision
- 1
- Extension and Version Dependencies
VK_KHR_spirv_1_4andVK_KHR_acceleration_structure- API Interactions
- Interacts with VK_KHR_ray_query
- SPIR-V Dependencies
- Contact
- Daniel Koch dgkoch
Other Extension Metadata
- Last Modified Date
- 2020-11-12
- Interactions and External Dependencies
- This extension provides API support for
GLSL_EXT_ray_tracing - This extension interacts with Vulkan 1.2 and
VK_KHR_vulkan_memory_model, adding the shader-call-related relation of invocations, shader-call-order partial order of dynamic instances of instructions, and theShaderCallKHRscope. - This extension interacts with
VK_KHR_pipeline_library, enabling pipeline libraries to be used with ray tracing pipelines and enabling usage ofVkRayTracingPipelineInterfaceCreateInfoKHR.
- This extension provides API support for
- Contributors
- Matthäus Chajdas, AMD
- Greg Grebe, AMD
- Nicolai Hähnle, AMD
- Tobias Hector, AMD
- Dave Oldcorn, AMD
- Skyler Saleh, AMD
- Mathieu Robart, Arm
- Marius Bjorge, Arm
- Tom Olson, Arm
- Sebastian Tafuri, EA
- Henrik Rydgard, Embark
- Juan Cañada, Epic Games
- Patrick Kelly, Epic Games
- Yuriy O’Donnell, Epic Games
- Michael Doggett, Facebook/Oculus
- Andrew Garrard, Imagination
- Don Scorgie, Imagination
- Dae Kim, Imagination
- Joshua Barczak, Intel
- Slawek Grajewski, Intel
- Jeff Bolz, NVIDIA
- Pascal Gautron, NVIDIA
- Daniel Koch, NVIDIA
- Christoph Kubisch, NVIDIA
- Ashwin Lele, NVIDIA
- Robert Stepinski, NVIDIA
- Martin Stich, NVIDIA
- Nuno Subtil, NVIDIA
- Eric Werness, NVIDIA
- Jon Leech, Khronos
- Jeroen van Schijndel, OTOY
- Juul Joosten, OTOY
- Alex Bourd, Qualcomm
- Roman Larionov, Qualcomm
- David McAllister, Qualcomm
- Spencer Fricke, Samsung
- Lewis Gordon, Samsung
- Ralph Potter, Samsung
- Jasper Bekkers, Traverse Research
- Jesse Barker, Unity
- Baldur Karlsson, Valve
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intExtendsVkBufferUsageFlagBits.static final intExtendsVkDynamicState.static final StringThe extension name.static final intThe extension specification version.static final intExtendsVkPipelineBindPoint.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineCreateFlagBits.static final intExtendsVkPipelineStageFlagBits.static final intVkRayTracingShaderGroupTypeKHR - Shader group typesstatic final intVkRayTracingShaderGroupTypeKHR - Shader group typesstatic final intVkRayTracingShaderGroupTypeKHR - Shader group typesstatic final intVkShaderGroupShaderKHR - Shader group shadersstatic final intVkShaderGroupShaderKHR - Shader group shadersstatic final intVkShaderGroupShaderKHR - Shader group shadersstatic final intVkShaderGroupShaderKHR - Shader group shadersstatic final intExtendsVkShaderStageFlagBits.static final intExtendsVkShaderStageFlagBits.static final intExtendsVkShaderStageFlagBits.static final intExtendsVkShaderStageFlagBits.static final intExtendsVkShaderStageFlagBits.static final intExtendsVkShaderStageFlagBits.static final intVK_SHADER_UNUSED_KHRstatic final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdTraceRaysIndirectKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pRaygenShaderBindingTable, long pMissShaderBindingTable, long pHitShaderBindingTable, long pCallableShaderBindingTable, long indirectDeviceAddress) Unsafe version of:CmdTraceRaysIndirectKHRstatic voidnvkCmdTraceRaysKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pRaygenShaderBindingTable, long pMissShaderBindingTable, long pHitShaderBindingTable, long pCallableShaderBindingTable, int width, int height, int depth) Unsafe version of:CmdTraceRaysKHRstatic intnvkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines) Unsafe version of:CreateRayTracingPipelinesKHRstatic intnvkGetRayTracingCaptureReplayShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, long dataSize, long pData) Unsafe version of:GetRayTracingCaptureReplayShaderGroupHandlesKHRstatic intnvkGetRayTracingShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, long dataSize, long pData) Unsafe version of:GetRayTracingShaderGroupHandlesKHRstatic voidvkCmdSetRayTracingPipelineStackSizeKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int pipelineStackSize) Set the stack size dynamically for a ray tracing pipeline.static voidvkCmdTraceRaysIndirectKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkStridedDeviceAddressRegionKHR pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR pCallableShaderBindingTable, long indirectDeviceAddress) Initialize an indirect ray tracing dispatch.static voidvkCmdTraceRaysKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkStridedDeviceAddressRegionKHR pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR pCallableShaderBindingTable, int width, int height, int depth) Initialize a ray tracing dispatch.static intvkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, VkRayTracingPipelineCreateInfoKHR.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelines) Array version of:CreateRayTracingPipelinesKHRstatic intvkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, VkRayTracingPipelineCreateInfoKHR.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pPipelines) Creates a new ray tracing pipeline object.static intvkGetRayTracingCaptureReplayShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, ByteBuffer pData) Query opaque capture replay data for pipeline shader group handles.static intvkGetRayTracingShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, ByteBuffer pData) Query ray tracing pipeline shader group handles.static longvkGetRayTracingShaderGroupStackSizeKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int group, int groupShader) Query ray tracing pipeline shader group shader stack size.
-
Field Details
-
VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSION
public static final int VK_KHR_RAY_TRACING_PIPELINE_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_KHR_RAY_TRACING_PIPELINE_EXTENSION_NAME
The extension name.- See Also:
-
VK_SHADER_UNUSED_KHR
public static final int VK_SHADER_UNUSED_KHRVK_SHADER_UNUSED_KHR- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHR
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
- See Also:
-
VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
- See Also:
-
VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
- See Also:
-
VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHRExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHRSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_PROPERTIES_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_KHRSTRUCTURE_TYPE_RAY_TRACING_PIPELINE_INTERFACE_CREATE_INFO_KHR
- See Also:
-
VK_SHADER_STAGE_RAYGEN_BIT_KHR
public static final int VK_SHADER_STAGE_RAYGEN_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_SHADER_STAGE_ANY_HIT_BIT_KHR
public static final int VK_SHADER_STAGE_ANY_HIT_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR
public static final int VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_SHADER_STAGE_MISS_BIT_KHR
public static final int VK_SHADER_STAGE_MISS_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_SHADER_STAGE_INTERSECTION_BIT_KHR
public static final int VK_SHADER_STAGE_INTERSECTION_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_SHADER_STAGE_CALLABLE_BIT_KHR
public static final int VK_SHADER_STAGE_CALLABLE_BIT_KHRExtendsVkShaderStageFlagBits.Enum values:
- See Also:
-
VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR
public static final int VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHRExtendsVkPipelineStageFlagBits.- See Also:
-
VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR
public static final int VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRExtendsVkBufferUsageFlagBits.- See Also:
-
VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR
public static final int VK_PIPELINE_BIND_POINT_RAY_TRACING_KHRExtendsVkPipelineBindPoint.- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
public static final int VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHRExtendsVkPipelineCreateFlagBits.Enum values:
PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHRPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR
- See Also:
-
VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHR
public static final int VK_DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHRExtendsVkDynamicState.- See Also:
-
VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR
public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHRVkRayTracingShaderGroupTypeKHR - Shader group typesDescription
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.
Note
For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.
See Also
VkRayTracingShaderGroupCreateInfoKHR,VkRayTracingShaderGroupCreateInfoNV- See Also:
-
VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR
public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHRVkRayTracingShaderGroupTypeKHR - Shader group typesDescription
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.
Note
For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.
See Also
VkRayTracingShaderGroupCreateInfoKHR,VkRayTracingShaderGroupCreateInfoNV- See Also:
-
VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHRVkRayTracingShaderGroupTypeKHR - Shader group typesDescription
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.
Note
For current group types, the hit group type could be inferred from the presence or absence of the intersection shader, but we provide the type explicitly for future hit groups that do not have that property.
See Also
VkRayTracingShaderGroupCreateInfoKHR,VkRayTracingShaderGroupCreateInfoNV- See Also:
-
VK_SHADER_GROUP_SHADER_GENERAL_KHR
public static final int VK_SHADER_GROUP_SHADER_GENERAL_KHRVkShaderGroupShaderKHR - Shader group shadersDescription
SHADER_GROUP_SHADER_GENERAL_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::generalShaderSHADER_GROUP_SHADER_CLOSEST_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::closestHitShaderSHADER_GROUP_SHADER_ANY_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::anyHitShaderSHADER_GROUP_SHADER_INTERSECTION_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::intersectionShader
See Also
- See Also:
-
VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR
public static final int VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHRVkShaderGroupShaderKHR - Shader group shadersDescription
SHADER_GROUP_SHADER_GENERAL_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::generalShaderSHADER_GROUP_SHADER_CLOSEST_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::closestHitShaderSHADER_GROUP_SHADER_ANY_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::anyHitShaderSHADER_GROUP_SHADER_INTERSECTION_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::intersectionShader
See Also
- See Also:
-
VK_SHADER_GROUP_SHADER_ANY_HIT_KHR
public static final int VK_SHADER_GROUP_SHADER_ANY_HIT_KHRVkShaderGroupShaderKHR - Shader group shadersDescription
SHADER_GROUP_SHADER_GENERAL_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::generalShaderSHADER_GROUP_SHADER_CLOSEST_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::closestHitShaderSHADER_GROUP_SHADER_ANY_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::anyHitShaderSHADER_GROUP_SHADER_INTERSECTION_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::intersectionShader
See Also
- See Also:
-
VK_SHADER_GROUP_SHADER_INTERSECTION_KHR
public static final int VK_SHADER_GROUP_SHADER_INTERSECTION_KHRVkShaderGroupShaderKHR - Shader group shadersDescription
SHADER_GROUP_SHADER_GENERAL_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::generalShaderSHADER_GROUP_SHADER_CLOSEST_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::closestHitShaderSHADER_GROUP_SHADER_ANY_HIT_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::anyHitShaderSHADER_GROUP_SHADER_INTERSECTION_KHRuses the shader specified in the group withVkRayTracingShaderGroupCreateInfoKHR::intersectionShader
See Also
- See Also:
-
-
Method Details
-
nvkCmdTraceRaysKHR
public static void nvkCmdTraceRaysKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pRaygenShaderBindingTable, long pMissShaderBindingTable, long pHitShaderBindingTable, long pCallableShaderBindingTable, int width, int height, int depth) Unsafe version of:CmdTraceRaysKHR -
vkCmdTraceRaysKHR
public static void vkCmdTraceRaysKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkStridedDeviceAddressRegionKHR pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR pCallableShaderBindingTable, int width, int height, int depth) Initialize a ray tracing dispatch.C Specification
To dispatch ray tracing use:
void vkCmdTraceRaysKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth);Description
When the command is executed, a ray generation group of
width × height × depthrays is assembled.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas a result of this command, then the image view’slevelCountandlayerCountmust be 1 - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas a result of this command, then the image view’sviewTypemust beIMAGE_VIEW_TYPE_1DorIMAGE_VIEW_TYPE_2D - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas 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
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas 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
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis 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_cubicextension is not enabled and anyVkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, it must not have aVkImageViewTypeofIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE, orIMAGE_VIEW_TYPE_CUBE_ARRAY - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byGetPhysicalDeviceImageFormatProperties2 - If the
cubicRangeClampfeature is not enabled, then anyVkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must not have aVkSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM - Any
VkImageViewbeing sampled with aVkSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOMas a result of this command must sample withFILTER_CUBIC_EXT - If the
selectableCubicWeightsfeature is not enabled, then anyVkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must haveVkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal toCUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
VkImageViewbeing 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
VkImageViewbeing 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
VkBufferViewbeing 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
VkBufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by a bound shader, a descriptor set must have been bound to n at the same pipeline bind point, with a
VkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutarray used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - For each push constant that is statically used by a bound shader, a push constant value must have been set for the same pipeline bind point, with a
VkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutarray used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - 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 the
maintenance4feature is not enabled, then for each push constant that is statically used by a bound shader, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutandVkPushConstantRangearrays used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
CmdBindDescriptorSets, must be valid as described by descriptor validity if they are statically used by theVkPipelinebound to the pipeline bind point used by this command and the boundVkPipelinewas not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If the descriptors used by the
VkPipelinebound to the pipeline bind point were specified viaCmdBindDescriptorSets, the boundVkPipelinemust 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 theVkPipelinebound to the pipeline bind point used by this command and the boundVkPipelinewas created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound descriptor buffers, specified via
CmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by anyVkShaderEXTbound to a stage corresponding to the pipeline bind point used by this command - If the descriptors used by the
VkPipelinebound to the pipeline bind point were specified viaCmdSetDescriptorBufferOffsetsEXT, the boundVkPipelinemust have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If a descriptor is dynamically used with a
VkPipelinecreated withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If a descriptor is dynamically used with a
VkShaderEXTcreated with aVkDescriptorSetLayoutthat was created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If the
shaderObjectfeature 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
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
shaderObjectfeature is enabled, either a valid pipeline must be bound to the pipeline bind point used by this command, or a valid combination of valid andNULL_HANDLEshader objects must be bound to every supported shader stage corresponding to the pipeline bind point used by this command - If any stage of the
VkPipelineobject 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 therobustBufferAccessfeature 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
robustBufferAccessfeature is not enabled, and anyVkShaderEXTbound 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
VkPipelineobject 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 therobustBufferAccessfeature 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
robustBufferAccessfeature is not enabled, and anyVkShaderEXTbound 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 andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource - If a bound shader accesses a
VkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If a bound shader accesses a
VkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types - If a
VkImageViewis accessed as a result of this command, then the numeric type of the image view’sformatand theSampledTypeoperand of theOpTypeImagemust match - If a
VkImageViewcreated 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
VkImageViewcreated with the formatFORMAT_A8_UNORMis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components - If a
VkBufferViewis 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
VkImageViewwith aVkFormatthat 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
VkImageViewwith aVkFormatthat 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
VkBufferViewwith aVkFormatthat 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
VkBufferViewwith aVkFormatthat 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
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aVkImageViewas 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 aVkImageViewas 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 anVkImageViewas 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 anVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aVkSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If any command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aVkSampleras 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 anVkImageViewas 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 anVkImageViewas 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, the image subresource identified by that descriptor must be in the image layout identified when the descriptor was written - 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
- This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value of
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline commandBuffermust not be a protected command buffer
- The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember
- If the buffer from which
pRayGenShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pRayGenShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pRayGenShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment- If the buffer from which
pMissShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pMissShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pMissShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpMissShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpMissShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the buffer from which
pHitShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pHitShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pHitShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpHitShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpHitShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the buffer from which
pCallableShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pCallableShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pCallableShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpCallableShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpCallableShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute an any-hit shader must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute a closest hit shader must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute an intersection shader must not be zero - Any non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddress accessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddress accessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
widthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[0]heightmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[1]depthmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2] ×VkPhysicalDeviceLimits::maxComputeWorkGroupSize[2]width × height × depthmust be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxRayDispatchInvocationCount
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepRaygenShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepMissShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepHitShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepCallableShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Outside Outside Compute Action See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pRaygenShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the ray generation shader stage.pMissShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the miss shader stage.pHitShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the hit shader stage.pCallableShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the callable shader stage.width- the width of the ray trace query dimensions.height- height of the ray trace query dimensions.depth- depth of the ray trace query dimensions.
- If a
-
nvkCreateRayTracingPipelinesKHR
public static int nvkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines) Unsafe version of:CreateRayTracingPipelinesKHR- Parameters:
createInfoCount- the length of thepCreateInfosandpPipelinesarrays.
-
vkCreateRayTracingPipelinesKHR
public static int vkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, VkRayTracingPipelineCreateInfoKHR.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, LongBuffer pPipelines) Creates a new ray tracing pipeline object.C Specification
To create ray tracing pipelines, call:
VkResult vkCreateRayTracingPipelinesKHR( VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);Description
The
ERROR_INVALID_OPAQUE_CAPTURE_ADDRESSerror is returned if the implementation is unable to reuse the shader group handles provided inVkRayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandlewhenVkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplayis enabled.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_BASEflag- If
pipelineCachewas created withPIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT, host access topipelineCachemust be externally synchronized
- Any previous deferred operation that was associated with
deferredOperationmust be complete
- If
VkPipelineBinaryInfoKHR::binaryCountis not 0 for any element ofpCreateInfos,pipelineCachemust beNULL_HANDLE - If a
VkPipelineCreateFlags2CreateInfoKHRstructure with thePIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHRflag set is included in thepNextchain of any element ofpCreateInfos,pipelineCachemust beNULL_HANDLE - If
VkPipelineBinaryInfoKHR::binaryCountis not 0 for any element ofpCreateInfos,PIPELINE_CREATION_FEEDBACK_APPLICATION_PIPELINE_CACHE_HIT_BITmust not be set in theflagsof that element - If
VkPipelineBinaryInfoKHR::binaryCountis not 0 for any element ofpCreateInfos,PIPELINE_CREATION_FEEDBACK_BASE_PIPELINE_ACCELERATION_BITmust not be set in theflagsof that element - If
VkPipelineBinaryInfoKHR::binaryCountis not 0 for any element ofpCreateInfos,PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXTmust not be set in theflagsof that element - The
rayTracingPipelinefeature must be enabled - If
deferredOperationis notNULL_HANDLE, theflagsmember of elements ofpCreateInfosmust not includePIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT
Valid Usage (Implicit)
devicemust be a validVkDevicehandle- If
deferredOperationis notNULL_HANDLE,deferredOperationmust be a validVkDeferredOperationKHRhandle - If
pipelineCacheis notNULL_HANDLE,pipelineCachemust be a validVkPipelineCachehandle pCreateInfosmust be a valid pointer to an array ofcreateInfoCountvalidVkRayTracingPipelineCreateInfoKHRstructures- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pPipelinesmust be a valid pointer to an array ofcreateInfoCountVkPipelinehandlescreateInfoCountmust be greater than 0- If
deferredOperationis a valid handle, it must have been created, allocated, or retrieved fromdevice - If
pipelineCacheis a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the ray tracing pipelines.deferredOperation-NULL_HANDLEor the handle of a validVkDeferredOperationKHRrequest deferral object for this command.pipelineCache- eitherNULL_HANDLE, indicating that pipeline caching is disabled, or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.pCreateInfos- a pointer to an array ofVkRayTracingPipelineCreateInfoKHRstructures.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pPipelines- a pointer to an array in which the resulting ray tracing pipeline objects are returned.
-
nvkGetRayTracingShaderGroupHandlesKHR
public static int nvkGetRayTracingShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, long dataSize, long pData) Unsafe version of:GetRayTracingShaderGroupHandlesKHR- Parameters:
dataSize- the size in bytes of the buffer pointed to bypData.
-
vkGetRayTracingShaderGroupHandlesKHR
public static int vkGetRayTracingShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, ByteBuffer pData) Query ray tracing pipeline shader group handles.C Specification
To query the opaque handles of shaders in the ray tracing pipeline, call:
VkResult vkGetRayTracingShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);or the equivalent command
VkResult vkGetRayTracingShaderGroupHandlesNV( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);Description
On success, an array of
groupCountshader handles will be written topData, with each element being of sizeVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleSize.If
pipelinewas created withPIPELINE_CREATE_LIBRARY_BIT_KHRand 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 anypipelinewhich references the pipeline library. Group indices are assigned as-if the pipeline was created withoutPIPELINE_CREATE_LIBRARY_BIT_KHR.Valid Usage
pipelinemust be a ray tracing pipelinefirstGroupmust 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 leastVkPhysicalDeviceRayTracingPipelinePropertiesKHR::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 validVkDevicehandlepipelinemust be a validVkPipelinehandlepDatamust be a valid pointer to an array ofdataSizebytesdataSizemust be greater than 0pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the logical device containing the ray tracing pipeline.pipeline- the ray tracing pipeline object containing the shaders.firstGroup- the index of the first group to retrieve a handle for from theVkRayTracingPipelineCreateInfoKHR::pGroupsorVkRayTracingPipelineCreateInfoNV::pGroupsarray.groupCount- the number of shader handles to retrieve.pData- a pointer to an application-allocated buffer where the results will be written.
-
nvkGetRayTracingCaptureReplayShaderGroupHandlesKHR
public static int nvkGetRayTracingCaptureReplayShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, long dataSize, long pData) Unsafe version of:GetRayTracingCaptureReplayShaderGroupHandlesKHR- Parameters:
dataSize- the size in bytes of the buffer pointed to bypData.
-
vkGetRayTracingCaptureReplayShaderGroupHandlesKHR
public static int vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int firstGroup, int groupCount, ByteBuffer pData) Query opaque capture replay data for pipeline shader group handles.C Specification
To query the opaque capture data of shader groups in a ray tracing pipeline, call:
VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR( VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);Description
On success, an array of
groupCountshader handles will be written topData, with each element being of sizeVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleCaptureReplaySize.Once queried, this opaque data can be provided at pipeline creation time (in a subsequent execution), using
VkRayTracingShaderGroupCreateInfoKHR::pShaderGroupCaptureReplayHandle, as described in Ray Tracing Capture Replay.If
pipelinewas created withPIPELINE_CREATE_LIBRARY_BIT_KHRand the pipelineLibraryGroupHandles feature is enabled applications can query capture replay group handles from that pipeline. The capture replay handle remains bitwise identical for anypipelinewhich references the pipeline library. Group indices are assigned as-if the pipeline was created withoutPIPELINE_CREATE_LIBRARY_BIT_KHR.Valid Usage
pipelinemust be a ray tracing pipelinefirstGroupmust 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 leastVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleCaptureReplaySize × groupCountVkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipelineShaderGroupHandleCaptureReplaymust be enabled to call this functionpipelinemust have been created with aflagsthat includedPIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR- If the pipelineLibraryGroupHandles feature is not enabled,
pipelinemust not have been created withPIPELINE_CREATE_LIBRARY_BIT_KHR
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepipelinemust be a validVkPipelinehandlepDatamust be a valid pointer to an array ofdataSizebytesdataSizemust be greater than 0pipelinemust have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the logical device containing the ray tracing pipeline.pipeline- the ray tracing pipeline object containing the shaders.firstGroup- the index of the first group to retrieve a handle for from theVkRayTracingPipelineCreateInfoKHR::pGroupsarray.groupCount- the number of shader handles to retrieve.pData- a pointer to an application-allocated buffer where the results will be written.
-
nvkCmdTraceRaysIndirectKHR
public static void nvkCmdTraceRaysIndirectKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long pRaygenShaderBindingTable, long pMissShaderBindingTable, long pHitShaderBindingTable, long pCallableShaderBindingTable, long indirectDeviceAddress) Unsafe version of:CmdTraceRaysIndirectKHR -
vkCmdTraceRaysIndirectKHR
public static void vkCmdTraceRaysIndirectKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, VkStridedDeviceAddressRegionKHR pRaygenShaderBindingTable, VkStridedDeviceAddressRegionKHR pMissShaderBindingTable, VkStridedDeviceAddressRegionKHR pHitShaderBindingTable, VkStridedDeviceAddressRegionKHR pCallableShaderBindingTable, long indirectDeviceAddress) Initialize an indirect ray tracing dispatch.C Specification
To dispatch ray tracing, with some parameters sourced on the device, use:
void vkCmdTraceRaysIndirectKHR( VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress);Description
vkCmdTraceRaysIndirectKHRbehaves similarly toCmdTraceRaysKHRexcept that the ray trace query dimensions are read by the device fromindirectDeviceAddressduring execution.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEAR,reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE, andcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandreductionModeequal to eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas a result of this command, then the image view’slevelCountandlayerCountmust be 1 - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas a result of this command, then the image view’sviewTypemust beIMAGE_VIEW_TYPE_1DorIMAGE_VIEW_TYPE_2D - If a
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas 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
VkSamplercreated withunnormalizedCoordinatesequal toTRUEis used to sample aVkImageViewas 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
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis 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_cubicextension is not enabled and anyVkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, it must not have aVkImageViewTypeofIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE, orIMAGE_VIEW_TYPE_CUBE_ARRAY - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byGetPhysicalDeviceImageFormatProperties2 - If the
cubicRangeClampfeature is not enabled, then anyVkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must not have aVkSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOM - Any
VkImageViewbeing sampled with aVkSamplerReductionModeCreateInfo::reductionModeequal toSAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_RANGECLAMP_QCOMas a result of this command must sample withFILTER_CUBIC_EXT - If the
selectableCubicWeightsfeature is not enabled, then anyVkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must haveVkSamplerCubicWeightsCreateInfoQCOM::cubicWeightsequal toCUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For any
VkImageViewbeing 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
VkImageViewbeing 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
VkBufferViewbeing 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
VkBufferViewbeing read as a storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s buffer features must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by a bound shader, a descriptor set must have been bound to n at the same pipeline bind point, with a
VkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutarray used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - For each push constant that is statically used by a bound shader, a push constant value must have been set for the same pipeline bind point, with a
VkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutarray used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - 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 the
maintenance4feature is not enabled, then for each push constant that is statically used by a bound shader, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipelineor theVkDescriptorSetLayoutandVkPushConstantRangearrays used to create the currentVkShaderEXT, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
CmdBindDescriptorSets, must be valid as described by descriptor validity if they are statically used by theVkPipelinebound to the pipeline bind point used by this command and the boundVkPipelinewas not created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If the descriptors used by the
VkPipelinebound to the pipeline bind point were specified viaCmdBindDescriptorSets, the boundVkPipelinemust 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 theVkPipelinebound to the pipeline bind point used by this command and the boundVkPipelinewas created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - Descriptors in bound descriptor buffers, specified via
CmdSetDescriptorBufferOffsetsEXT, must be valid if they are dynamically used by anyVkShaderEXTbound to a stage corresponding to the pipeline bind point used by this command - If the descriptors used by the
VkPipelinebound to the pipeline bind point were specified viaCmdSetDescriptorBufferOffsetsEXT, the boundVkPipelinemust have been created withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT - If a descriptor is dynamically used with a
VkPipelinecreated withPIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If a descriptor is dynamically used with a
VkShaderEXTcreated with aVkDescriptorSetLayoutthat was created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor memory must be resident - If the
shaderObjectfeature 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
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
shaderObjectfeature is enabled, either a valid pipeline must be bound to the pipeline bind point used by this command, or a valid combination of valid andNULL_HANDLEshader objects must be bound to every supported shader stage corresponding to the pipeline bind point used by this command - If any stage of the
VkPipelineobject 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 therobustBufferAccessfeature 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
robustBufferAccessfeature is not enabled, and anyVkShaderEXTbound 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
VkPipelineobject 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 therobustBufferAccessfeature 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
robustBufferAccessfeature is not enabled, and anyVkShaderEXTbound 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 andprotectedNoFaultis not supported, any resource accessed by bound shaders must not be a protected resource - If a bound shader accesses a
VkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If a bound shader accesses a
VkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed as a result of this command, then the image view’sviewTypemust match theDimoperand of theOpTypeImageas described in Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types - If a
VkImageViewis accessed as a result of this command, then the numeric type of the image view’sformatand theSampledTypeoperand of theOpTypeImagemust match - If a
VkImageViewcreated 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
VkImageViewcreated with the formatFORMAT_A8_UNORMis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have four components - If a
VkBufferViewis 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
VkImageViewwith aVkFormatthat 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
VkImageViewwith aVkFormatthat 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
VkBufferViewwith aVkFormatthat 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
VkBufferViewwith aVkFormatthat 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
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If
OpImageWeightedSampleQCOMis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM - If
OpImageWeightedSampleQCOMuses aVkImageViewas 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 aVkImageViewas 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 anVkImageViewas 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 anVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM - If
OpImageBlockMatchSADQCOMor OpImageBlockMatchSSDQCOM is used to read from a reference image as result of this command, then the specified reference coordinates must not fail integer texel coordinate validation - If
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aVkSampleras a result of this command, then the sampler must have been created withSAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM - If any command other than
OpImageWeightedSampleQCOM,OpImageBoxFilterQCOM,OpImageBlockMatchWindowSSDQCOM,OpImageBlockMatchWindowSADQCOM,OpImageBlockMatchGatherSSDQCOM,OpImageBlockMatchGatherSADQCOM,OpImageBlockMatchSSDQCOM, orOpImageBlockMatchSADQCOMuses aVkSampleras 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 anVkImageViewas 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 anVkImageViewas 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, the image subresource identified by that descriptor must be in the image layout identified when the descriptor was written - 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
- This command must not cause a shader call instruction to be executed from a shader invocation with a recursion depth greater than the value of
maxPipelineRayRecursionDepthused to create the bound ray tracing pipeline commandBuffermust not be a protected command buffer
- The
sizemember ofpRayGenShaderBindingTablemust be equal to itsstridemember
- If the buffer from which
pRayGenShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pRayGenShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pRayGenShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignment- If the buffer from which
pMissShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pMissShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pMissShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpMissShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpMissShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the buffer from which
pHitShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pHitShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pHitShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpHitShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpHitShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the buffer from which
pCallableShaderBindingTable->deviceAddress was queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which the
pCallableShaderBindingTable->deviceAddress is queried must have been created with theBUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHRusage flag pCallableShaderBindingTable->deviceAddress must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupBaseAlignmentpCallableShaderBindingTable->stride must be a multiple ofVkPhysicalDeviceRayTracingPipelinePropertiesKHR::shaderGroupHandleAlignmentpCallableShaderBindingTable->stride must be less than or equal toVkPhysicalDeviceRayTracingPipelinePropertiesKHR::maxShaderGroupStride- If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR,pHitShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR, the shader group handle identified bypMissShaderBindingTable->deviceAddress must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute an any-hit shader must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute a closest hit shader must not be zero - If the bound ray tracing pipeline was created with
flagsthat includedPIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR, entries in the table identified bypHitShaderBindingTable->deviceAddress accessed as a result of this command in order to execute an intersection shader must not be zero - Any non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddress accessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_TRIANGLES_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR - Any non-zero hit shader group entries in the table identified by
pHitShaderBindingTable->deviceAddress accessed by this call from a geometry with ageometryTypeofGEOMETRY_TYPE_AABBS_KHRmust have been created withRAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR
- If the buffer from which
indirectDeviceAddresswas queried is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The buffer from which
indirectDeviceAddresswas queried must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit set indirectDeviceAddressmust be a multiple of 4- All device addresses between
indirectDeviceAddressandindirectDeviceAddress + sizeof(must be in the buffer device address range of the same bufferVkTraceRaysIndirectCommandKHR) - 1 - The
rayTracingPipelineTraceRaysIndirectfeature must be enabled - If the bound ray tracing pipeline was created with
PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NVVkPhysicalDeviceRayTracingMotionBlurFeaturesNV::rayTracingMotionBlurPipelineTraceRaysIndirectfeature must be enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepRaygenShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepMissShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepHitShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurepCallableShaderBindingTablemust be a valid pointer to a validVkStridedDeviceAddressRegionKHRstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Outside Outside Compute Action See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.pRaygenShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the ray generation shader stage.pMissShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the miss shader stage.pHitShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the hit shader stage.pCallableShaderBindingTable- aVkStridedDeviceAddressRegionKHRthat holds the shader binding table data for the callable shader stage.indirectDeviceAddress- a buffer device address which is a pointer to aVkTraceRaysIndirectCommandKHRstructure containing the trace ray parameters.
- If a
-
vkGetRayTracingShaderGroupStackSizeKHR
public static long vkGetRayTracingShaderGroupStackSizeKHR(org.lwjgl.vulkan.VkDevice device, long pipeline, int group, int groupShader) Query ray tracing pipeline shader group shader stack size.C Specification
To query the pipeline stack size of shaders in a shader group in the ray tracing pipeline, call:
VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR( VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader);Description
The return value is the ray tracing pipeline stack size in bytes for the specified shader as called from the specified shader group.
Valid Usage
pipelinemust be a ray tracing pipeline- The value of
groupmust be less than the number of shader groups inpipeline - The shader identified by
groupShaderingroupmust not beSHADER_UNUSED_KHR
Valid Usage (Implicit)
devicemust be a validVkDevicehandlepipelinemust be a validVkPipelinehandlegroupShadermust be a validVkShaderGroupShaderKHRvaluepipelinemust have been created, allocated, or retrieved fromdevice
- Parameters:
device- the logical device containing the ray tracing pipeline.pipeline- the ray tracing pipeline object containing the shaders groups.group- the index of the shader group to query.groupShader- the type of shader from the group to query.
-
vkCmdSetRayTracingPipelineStackSizeKHR
public static void vkCmdSetRayTracingPipelineStackSizeKHR(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int pipelineStackSize) Set the stack size dynamically for a ray tracing pipeline.C Specification
To dynamically set the stack size for a ray tracing pipeline, call:
void vkCmdSetRayTracingPipelineStackSizeKHR( VkCommandBuffer commandBuffer, uint32_t pipelineStackSize);Description
This command sets the stack size for subsequent ray tracing commands when the ray tracing pipeline is created with
DYNAMIC_STATE_RAY_TRACING_PIPELINE_STACK_SIZE_KHRset inVkPipelineDynamicStateCreateInfo::pDynamicStates. Otherwise, the stack size is computed as described in Ray Tracing Pipeline Stack.Valid Usage
pipelineStackSizemust be large enough for any dynamic execution through the shaders in the ray tracing pipeline used by a subsequent trace call
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type Primary Secondary Outside Outside Compute State - Parameters:
commandBuffer- the command buffer into which the command will be recorded.pipelineStackSize- the stack size to use for subsequent ray tracing trace commands.
-
vkCreateRayTracingPipelinesKHR
public static int vkCreateRayTracingPipelinesKHR(org.lwjgl.vulkan.VkDevice device, long deferredOperation, long pipelineCache, VkRayTracingPipelineCreateInfoKHR.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelines) Array version of:CreateRayTracingPipelinesKHR
-