public class NVRayTracing
extends java.lang.Object
To enable ray tracing, this extension adds a few different categories of new functionality:
This extension adds support for the following SPIR-V extension in Vulkan:
SPV_NV_ray_tracingExample 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);
}
VK_NV_ray_tracingVK_KHR_get_physical_device_properties2VK_KHR_get_memory_requirements2SPV_NV_ray_tracing SPIR-V extension.GL_NV_ray_tracing extension for GLSL source languages.| Modifier and Type | Field and Description |
|---|---|
static int |
VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type
|
static int |
VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type
|
static int |
VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
VkAccelerationStructureMemoryRequirementsTypeNV - Acceleration structure memory requirement type
|
static int |
VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
VkAccelerationStructureTypeNV - Type of acceleration structure
|
static int |
VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV
VkAccelerationStructureTypeNV - Type of acceleration structure
|
static int |
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV
Extends
VkAccessFlagBits. |
static int |
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
Extends
VkAccessFlagBits. |
static int |
VK_BUFFER_USAGE_RAY_TRACING_BIT_NV
Extends
VkBufferUsageFlagBits. |
static int |
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
|
static int |
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
|
static int |
VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
|
static int |
VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
|
static int |
VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV
VkBuildAccelerationStructureFlagBitsNV - Bitmask specifying additional parameters for acceleration structure builds
|
static int |
VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV
VkCopyAccelerationStructureModeNV - Acceleration structure copy mode
|
static int |
VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV
VkCopyAccelerationStructureModeNV - Acceleration structure copy mode
|
static int |
VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT
Extends
VkDebugReportObjectTypeEXT. |
static int |
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
Extends
VkDescriptorType. |
static int |
VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
VkGeometryInstanceFlagBitsNV - Instance flag bits
|
static int |
VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV
VkGeometryInstanceFlagBitsNV - Instance flag bits
|
static int |
VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV
VkGeometryInstanceFlagBitsNV - Instance flag bits
|
static int |
VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV
VkGeometryInstanceFlagBitsNV - Instance flag bits
|
static int |
VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
VkGeometryFlagBitsNV - Bitmask specifying additional parameters for a geometry
|
static int |
VK_GEOMETRY_OPAQUE_BIT_NV
VkGeometryFlagBitsNV - Bitmask specifying additional parameters for a geometry
|
static int |
VK_GEOMETRY_TYPE_AABBS_NV
VkGeometryTypeNV - Enum specifying which type of geometry is provided
|
static int |
VK_GEOMETRY_TYPE_TRIANGLES_NV
VkGeometryTypeNV - Enum specifying which type of geometry is provided
|
static int |
VK_INDEX_TYPE_NONE_NV
Extends
VkIndexType. |
static java.lang.String |
VK_NV_RAY_TRACING_EXTENSION_NAME
The extension name.
|
static int |
VK_NV_RAY_TRACING_SPEC_VERSION
The extension specification version.
|
static int |
VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV
Extends
VkObjectType. |
static int |
VK_PIPELINE_BIND_POINT_RAY_TRACING_NV
Extends
VkPipelineBindPoint. |
static int |
VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
Extends
VkPipelineCreateFlagBits. |
static int |
VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV
Extends
VkPipelineStageFlagBits. |
static int |
VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV
Extends
VkPipelineStageFlagBits. |
static int |
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
Extends
VkQueryType. |
static int |
VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV
VkRayTracingShaderGroupTypeNV - Shader group types
|
static int |
VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV
VkRayTracingShaderGroupTypeNV - Shader group types
|
static int |
VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV
VkRayTracingShaderGroupTypeNV - Shader group types
|
static int |
VK_SHADER_STAGE_ANY_HIT_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_STAGE_CALLABLE_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_STAGE_INTERSECTION_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_STAGE_MISS_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_STAGE_RAYGEN_BIT_NV
Extends
VkShaderStageFlagBits. |
static int |
VK_SHADER_UNUSED_NV
VK_SHADER_UNUSED_NV
|
static int |
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_GEOMETRY_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV
Extends
VkStructureType. |
static int |
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV
Extends
VkStructureType. |
| Modifier and Type | Method and Description |
|---|---|
static int |
nvkBindAccelerationStructureMemoryNV(org.lwjgl.vulkan.VkDevice device,
int bindInfoCount,
long pBindInfos)
Unsafe version of:
BindAccelerationStructureMemoryNV |
static void |
nvkCmdBuildAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pInfo,
long instanceData,
long instanceOffset,
int update,
long dst,
long src,
long scratch,
long scratchOffset)
Unsafe version of:
CmdBuildAccelerationStructureNV |
static void |
nvkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int accelerationStructureCount,
long pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
Unsafe version of:
CmdWriteAccelerationStructuresPropertiesNV |
static int |
nvkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long pCreateInfo,
long pAllocator,
long pAccelerationStructure)
Unsafe version of:
CreateAccelerationStructureNV |
static int |
nvkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
int createInfoCount,
long pCreateInfos,
long pAllocator,
long pPipelines)
Unsafe version of:
CreateRayTracingPipelinesNV |
static void |
nvkDestroyAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long pAllocator)
Unsafe version of:
DestroyAccelerationStructureNV |
static int |
nvkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long dataSize,
long pData)
Unsafe version of:
GetAccelerationStructureHandleNV |
static void |
nvkGetAccelerationStructureMemoryRequirementsNV(org.lwjgl.vulkan.VkDevice device,
long pInfo,
long pMemoryRequirements)
Unsafe version of:
GetAccelerationStructureMemoryRequirementsNV |
static int |
nvkGetRayTracingShaderGroupHandlesNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int firstGroup,
int groupCount,
long dataSize,
long pData)
Unsafe version of:
GetRayTracingShaderGroupHandlesNV |
static int |
vkBindAccelerationStructureMemoryNV(org.lwjgl.vulkan.VkDevice device,
VkBindAccelerationStructureMemoryInfoNV.Buffer pBindInfos)
Bind acceleration structure memory.
|
static void |
vkCmdBuildAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkAccelerationStructureInfoNV pInfo,
long instanceData,
long instanceOffset,
boolean update,
long dst,
long src,
long scratch,
long scratchOffset)
Build an acceleration structure.
|
static void |
vkCmdCopyAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long dst,
long src,
int mode)
Copy an acceleration structure.
|
static void |
vkCmdTraceRaysNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long raygenShaderBindingTableBuffer,
long raygenShaderBindingOffset,
long missShaderBindingTableBuffer,
long missShaderBindingOffset,
long missShaderBindingStride,
long hitShaderBindingTableBuffer,
long hitShaderBindingOffset,
long hitShaderBindingStride,
long callableShaderBindingTableBuffer,
long callableShaderBindingOffset,
long callableShaderBindingStride,
int width,
int height,
int depth)
Initialize a ray tracing dispatch.
|
static void |
vkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long[] pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
Array version of:
CmdWriteAccelerationStructuresPropertiesNV |
static void |
vkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
java.nio.LongBuffer pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
Write acceleration structure result parameters to query results.
|
static int |
vkCompileDeferredNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int shader)
Deferred compilation of shaders.
|
static int |
vkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureCreateInfoNV pCreateInfo,
VkAllocationCallbacks pAllocator,
long[] pAccelerationStructure)
Array version of:
CreateAccelerationStructureNV |
static int |
vkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureCreateInfoNV pCreateInfo,
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pAccelerationStructure)
Create a new acceleration structure object.
|
static int |
vkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
VkRayTracingPipelineCreateInfoNV.Buffer pCreateInfos,
VkAllocationCallbacks pAllocator,
long[] pPipelines)
Array version of:
CreateRayTracingPipelinesNV |
static int |
vkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
VkRayTracingPipelineCreateInfoNV.Buffer pCreateInfos,
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pPipelines)
Creates a new ray tracing pipeline object.
|
static void |
vkDestroyAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
VkAllocationCallbacks pAllocator)
Destroy an acceleration structure object.
|
static int |
vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
java.nio.ByteBuffer pData)
Get opaque acceleration structure handle.
|
static int |
vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long[] pData)
Array version of:
GetAccelerationStructureHandleNV |
static int |
vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
java.nio.LongBuffer pData)
Get opaque acceleration structure handle.
|
static void |
vkGetAccelerationStructureMemoryRequirementsNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureMemoryRequirementsInfoNV pInfo,
VkMemoryRequirements2KHR pMemoryRequirements)
Get acceleration structure memory requirements.
|
static int |
vkGetRayTracingShaderGroupHandlesNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int firstGroup,
int groupCount,
java.nio.ByteBuffer pData)
Query ray tracing pipeline shader group handles.
|
public static final int VK_NV_RAY_TRACING_SPEC_VERSION
public static final java.lang.String VK_NV_RAY_TRACING_EXTENSION_NAME
public static final int VK_SHADER_UNUSED_NV
public static final int VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_GEOMETRY_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV
VkStructureType.
STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NVSTRUCTURE_TYPE_GEOMETRY_NVSTRUCTURE_TYPE_GEOMETRY_TRIANGLES_NVSTRUCTURE_TYPE_GEOMETRY_AABB_NVSTRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NVSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NVSTRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NVSTRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NVSTRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NVpublic static final int VK_SHADER_STAGE_RAYGEN_BIT_NV
VkShaderStageFlagBits.
public static final int VK_SHADER_STAGE_ANY_HIT_BIT_NV
VkShaderStageFlagBits.
public static final int VK_SHADER_STAGE_CLOSEST_HIT_BIT_NV
VkShaderStageFlagBits.
public static final int VK_SHADER_STAGE_MISS_BIT_NV
VkShaderStageFlagBits.
public static final int VK_SHADER_STAGE_INTERSECTION_BIT_NV
VkShaderStageFlagBits.
public static final int VK_SHADER_STAGE_CALLABLE_BIT_NV
VkShaderStageFlagBits.
public static final int VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV
VkPipelineStageFlagBits.
public static final int VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV
VkPipelineStageFlagBits.
public static final int VK_BUFFER_USAGE_RAY_TRACING_BIT_NV
VkBufferUsageFlagBits.public static final int VK_PIPELINE_BIND_POINT_RAY_TRACING_NV
VkPipelineBindPoint.public static final int VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
VkDescriptorType.public static final int VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV
VkAccessFlagBits.
public static final int VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
VkAccessFlagBits.
public static final int VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
VkQueryType.public static final int VK_PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
VkPipelineCreateFlagBits.public static final int VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV
VkObjectType.public static final int VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT
VkDebugReportObjectTypeEXT.public static final int VK_INDEX_TYPE_NONE_NV
VkIndexType.public static final int VK_ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV is a top-level acceleration structure containing instance data referring to bottom-level level acceleration structures.ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV is a bottom-level acceleration structure containing the AABBs or geometry to be intersected.public static final int VK_ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV
ACCELERATION_STRUCTURE_TYPE_TOP_LEVEL_NV is a top-level acceleration structure containing instance data referring to bottom-level level acceleration structures.ACCELERATION_STRUCTURE_TYPE_BOTTOM_LEVEL_NV is a bottom-level acceleration structure containing the AABBs or geometry to be intersected.public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV indicates a shader group with a single SHADER_STAGE_RAYGEN_BIT_NV, SHADER_STAGE_MISS_BIT_NV, or SHADER_STAGE_CALLABLE_BIT_NV shader in it.RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV specifies a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV specifies a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.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.
public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV indicates a shader group with a single SHADER_STAGE_RAYGEN_BIT_NV, SHADER_STAGE_MISS_BIT_NV, or SHADER_STAGE_CALLABLE_BIT_NV shader in it.RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV specifies a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV specifies a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.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.
public static final int VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV
RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_NV indicates a shader group with a single SHADER_STAGE_RAYGEN_BIT_NV, SHADER_STAGE_MISS_BIT_NV, or SHADER_STAGE_CALLABLE_BIT_NV shader in it.RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_NV specifies a shader group that only hits triangles and must not contain an intersection shader, only closest hit and any-hit.RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_NV specifies a shader group that only intersects with custom geometry and must contain an intersection shader and may contain closest hit and any-hit shaders.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.
public static final int VK_GEOMETRY_TYPE_TRIANGLES_NV
GEOMETRY_TYPE_TRIANGLES_NV indicates that the triangles of VkGeometryDataNV contains valid data.GEOMETRY_TYPE_AABBS_NV indicates that the aabbs of VkGeometryDataNV contains valid data.public static final int VK_GEOMETRY_TYPE_AABBS_NV
GEOMETRY_TYPE_TRIANGLES_NV indicates that the triangles of VkGeometryDataNV contains valid data.GEOMETRY_TYPE_AABBS_NV indicates that the aabbs of VkGeometryDataNV contains valid data.public static final int VK_GEOMETRY_OPAQUE_BIT_NV
GEOMETRY_OPAQUE_BIT_NV indicates that this geometry does not invoke the any-hit shaders even if present in a hit group.GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV indicates 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.VkGeometryFlagsNV
public static final int VK_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV
GEOMETRY_OPAQUE_BIT_NV indicates that this geometry does not invoke the any-hit shaders even if present in a hit group.GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT_NV indicates 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.VkGeometryFlagsNV
public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV disables face culling for this instance.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV indicates that the front face of the triangle for culling purposes is the face that is counter clockwise in object space relative to the ray origin. Because the facing is determined in object space, an instance transform matrix does not change the winding, but a geometry transform does.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsNoOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were not specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV and GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV must not be used in the same flag.
VkGeometryInstanceFlagsNV
public static final int VK_GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV disables face culling for this instance.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV indicates that the front face of the triangle for culling purposes is the face that is counter clockwise in object space relative to the ray origin. Because the facing is determined in object space, an instance transform matrix does not change the winding, but a geometry transform does.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsNoOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were not specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV and GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV must not be used in the same flag.
VkGeometryInstanceFlagsNV
public static final int VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV disables face culling for this instance.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV indicates that the front face of the triangle for culling purposes is the face that is counter clockwise in object space relative to the ray origin. Because the facing is determined in object space, an instance transform matrix does not change the winding, but a geometry transform does.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsNoOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were not specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV and GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV must not be used in the same flag.
VkGeometryInstanceFlagsNV
public static final int VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV
GEOMETRY_INSTANCE_TRIANGLE_CULL_DISABLE_BIT_NV disables face culling for this instance.GEOMETRY_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE_BIT_NV indicates that the front face of the triangle for culling purposes is the face that is counter clockwise in object space relative to the ray origin. Because the facing is determined in object space, an instance transform matrix does not change the winding, but a geometry transform does.GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsNoOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV causes this instance to act as though GEOMETRY_OPAQUE_BIT_NV were not specified on all geometries referenced by this instance. This behavior can be overridden by the ray flag gl_RayFlagsOpaqueNV.GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_NV and GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_NV must not be used in the same flag.
VkGeometryInstanceFlagsNV
public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV indicates that the specified acceleration structure can be updated with update of TRUE in CmdBuildAccelerationStructureNV.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV indicates that the specified acceleration structure can act as the source for CmdCopyAccelerationStructureNV with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV to produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV indicates that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV indicates that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV indicates that this acceleration structure should minimize the size of the scratch memory and the final result build, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more time and memory than a normal build, and so should only be used when those features are used.
VkBuildAccelerationStructureFlagsNV
public static final int VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV indicates that the specified acceleration structure can be updated with update of TRUE in CmdBuildAccelerationStructureNV.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV indicates that the specified acceleration structure can act as the source for CmdCopyAccelerationStructureNV with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV to produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV indicates that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV indicates that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV indicates that this acceleration structure should minimize the size of the scratch memory and the final result build, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more time and memory than a normal build, and so should only be used when those features are used.
VkBuildAccelerationStructureFlagsNV
public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV indicates that the specified acceleration structure can be updated with update of TRUE in CmdBuildAccelerationStructureNV.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV indicates that the specified acceleration structure can act as the source for CmdCopyAccelerationStructureNV with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV to produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV indicates that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV indicates that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV indicates that this acceleration structure should minimize the size of the scratch memory and the final result build, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more time and memory than a normal build, and so should only be used when those features are used.
VkBuildAccelerationStructureFlagsNV
public static final int VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV indicates that the specified acceleration structure can be updated with update of TRUE in CmdBuildAccelerationStructureNV.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV indicates that the specified acceleration structure can act as the source for CmdCopyAccelerationStructureNV with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV to produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV indicates that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV indicates that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV indicates that this acceleration structure should minimize the size of the scratch memory and the final result build, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more time and memory than a normal build, and so should only be used when those features are used.
VkBuildAccelerationStructureFlagsNV
public static final int VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV
BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV indicates that the specified acceleration structure can be updated with update of TRUE in CmdBuildAccelerationStructureNV.BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV indicates that the specified acceleration structure can act as the source for CmdCopyAccelerationStructureNV with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV to produce a compacted acceleration structure.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV indicates that the given acceleration structure build should prioritize trace performance over build time.BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV indicates that the given acceleration structure build should prioritize build time over trace performance.BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV indicates that this acceleration structure should minimize the size of the scratch memory and the final result build, potentially at the expense of build time or trace performance.BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV may take more time and memory than a normal build, and so should only be used when those features are used.
VkBuildAccelerationStructureFlagsNV
public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV creates a direct copy of the acceleration structure specified in src into the one specified by dst. The dst acceleration structure must have been created with the same parameters as src.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV creates a more compact version of an acceleration structure src into dst. The acceleration structure dst must have been created with a compactedSize corresponding to the one returned by CmdWriteAccelerationStructuresPropertiesNV after the build of the acceleration structure specified by src.public static final int VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV
COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NV creates a direct copy of the acceleration structure specified in src into the one specified by dst. The dst acceleration structure must have been created with the same parameters as src.COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV creates a more compact version of an acceleration structure src into dst. The acceleration structure dst must have been created with a compactedSize corresponding to the one returned by CmdWriteAccelerationStructuresPropertiesNV after the build of the acceleration structure specified by src.public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV requests the memory requirement for the VkAccelerationStructureNV backing store.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV requests the memory requirement for scratch space during the initial build.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV requests the memory requirement for scratch space during an update.public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV requests the memory requirement for the VkAccelerationStructureNV backing store.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV requests the memory requirement for scratch space during the initial build.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV requests the memory requirement for scratch space during an update.public static final int VK_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV
ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_OBJECT_NV requests the memory requirement for the VkAccelerationStructureNV backing store.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV requests the memory requirement for scratch space during the initial build.ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV requests the memory requirement for scratch space during an update.public static int nvkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long pCreateInfo,
long pAllocator,
long pAccelerationStructure)
CreateAccelerationStructureNVpublic static int vkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureCreateInfoNV pCreateInfo,
@Nullable
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pAccelerationStructure)
To create acceleration structures, call:
VkResult vkCreateAccelerationStructureNV(
VkDevice device,
const VkAccelerationStructureCreateInfoNV* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkAccelerationStructureNV* pAccelerationStructure);
Similar to other objects in Vulkan, the acceleration structure creation merely creates an object with a specific "shape" as specified by the information in VkAccelerationStructureInfoNV and compactedSize in pCreateInfo. Populating the data in the object after allocating and binding memory is done with 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.
device must be a valid VkDevice handlepCreateInfo must be a valid pointer to a valid VkAccelerationStructureCreateInfoNV structurepAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structurepAccelerationStructure must be a valid pointer to a VkAccelerationStructureNV handledevice - the logical device that creates the buffer object.pCreateInfo - a pointer to a VkAccelerationStructureCreateInfoNV structure containing parameters affecting creation of the acceleration structure.pAllocator - controls host memory allocation as described in the Memory Allocation chapter.pAccelerationStructure - a pointer to a VkAccelerationStructureNV handle in which the resulting acceleration structure object is returned.public static void nvkDestroyAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long pAllocator)
DestroyAccelerationStructureNVpublic static void vkDestroyAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
@Nullable
VkAllocationCallbacks pAllocator)
To destroy an acceleration structure, call:
void vkDestroyAccelerationStructureNV(
VkDevice device,
VkAccelerationStructureNV accelerationStructure,
const VkAllocationCallbacks* pAllocator);
accelerationStructure must have completed executionVkAllocationCallbacks were provided when accelerationStructure was created, a compatible set of callbacks must be provided hereVkAllocationCallbacks were provided when accelerationStructure was created, pAllocator must be NULLdevice must be a valid VkDevice handleaccelerationStructure must be a valid VkAccelerationStructureNV handlepAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structureaccelerationStructure must have been created, allocated, or retrieved from devicedevice - the logical device that destroys the buffer.accelerationStructure - the acceleration structure to destroy.pAllocator - controls host memory allocation as described in the Memory Allocation chapter.public static void nvkGetAccelerationStructureMemoryRequirementsNV(org.lwjgl.vulkan.VkDevice device,
long pInfo,
long pMemoryRequirements)
GetAccelerationStructureMemoryRequirementsNVpublic static void vkGetAccelerationStructureMemoryRequirementsNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureMemoryRequirementsInfoNV pInfo,
VkMemoryRequirements2KHR pMemoryRequirements)
An acceleration structure has memory requirements for the structure object itself, scratch space for the build, and scratch space for the update.
To query the memory requirements call:
void vkGetAccelerationStructureMemoryRequirementsNV(
VkDevice device,
const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo,
VkMemoryRequirements2KHR* pMemoryRequirements);
device must be a valid VkDevice handlepInfo must be a valid pointer to a valid VkAccelerationStructureMemoryRequirementsInfoNV structurepMemoryRequirements must be a valid pointer to a VkMemoryRequirements2KHR structureVkAccelerationStructureMemoryRequirementsInfoNV, VkMemoryRequirements2KHR
device - the logical device on which the acceleration structure was created.pInfo - specifies the acceleration structure to get memory requirements for.pMemoryRequirements - returns the requested acceleration structure memory requirements.public static int nvkBindAccelerationStructureMemoryNV(org.lwjgl.vulkan.VkDevice device,
int bindInfoCount,
long pBindInfos)
BindAccelerationStructureMemoryNVbindInfoCount - the number of elements in pBindInfos.public static int vkBindAccelerationStructureMemoryNV(org.lwjgl.vulkan.VkDevice device,
VkBindAccelerationStructureMemoryInfoNV.Buffer pBindInfos)
To attach memory to one or more acceleration structures at a time, call:
VkResult vkBindAccelerationStructureMemoryNV(
VkDevice device,
uint32_t bindInfoCount,
const VkBindAccelerationStructureMemoryInfoNV* pBindInfos);
device must be a valid VkDevice handlepBindInfos must be a valid pointer to an array of bindInfoCount valid VkBindAccelerationStructureMemoryInfoNV structuresbindInfoCount must be greater than 0device - the logical device that owns the acceleration structures and memory.pBindInfos - a pointer to an array of VkBindAccelerationStructureMemoryInfoNV structures describing images and memory to bind.public static void nvkCmdBuildAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long pInfo,
long instanceData,
long instanceOffset,
int update,
long dst,
long src,
long scratch,
long scratchOffset)
CmdBuildAccelerationStructureNVpublic static void vkCmdBuildAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
VkAccelerationStructureInfoNV pInfo,
long instanceData,
long instanceOffset,
boolean update,
long dst,
long src,
long scratch,
long scratchOffset)
To build an acceleration structure call:
void vkCmdBuildAccelerationStructureNV(
VkCommandBuffer commandBuffer,
const VkAccelerationStructureInfoNV* pInfo,
VkBuffer instanceData,
VkDeviceSize instanceOffset,
VkBool32 update,
VkAccelerationStructureNV dst,
VkAccelerationStructureNV src,
VkBuffer scratch,
VkDeviceSize scratchOffset);
geometryCount must be less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::maxGeometryCountdst must have been created with compatible VkAccelerationStructureInfoNV where VkAccelerationStructureInfoNV::type and VkAccelerationStructureInfoNV::flags are identical, VkAccelerationStructureInfoNV::instanceCount and VkAccelerationStructureInfoNV::geometryCount for dst are greater than or equal to the build size and each geometry in VkAccelerationStructureInfoNV::pGeometries for dst has greater than or equal to the number of vertices, indices, and AABBs.update is TRUE, src must not be NULL_HANDLEupdate is TRUE, src must have been built before with BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV set in VkAccelerationStructureInfoNV::flagsupdate is FALSE, The size member of the VkMemoryRequirements structure returned from a call to GetAccelerationStructureMemoryRequirementsNV with VkAccelerationStructureMemoryRequirementsInfoNV::accelerationStructure set to dst and VkAccelerationStructureMemoryRequirementsInfoNV::type set to ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_BUILD_SCRATCH_NV must be less than or equal to the size of scratch minus scratchOffsetupdate is TRUE, The size member of the VkMemoryRequirements structure returned from a call to GetAccelerationStructureMemoryRequirementsNV with VkAccelerationStructureMemoryRequirementsInfoNV::accelerationStructure set to dst and VkAccelerationStructureMemoryRequirementsInfoNV::type set to ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_TYPE_UPDATE_SCRATCH_NV must be less than or equal to the size of scratch minus scratchOffsetcommandBuffer must be a valid VkCommandBuffer handlepInfo must be a valid pointer to a valid VkAccelerationStructureInfoNV structureinstanceData is not NULL_HANDLE, instanceData must be a valid VkBuffer handledst must be a valid VkAccelerationStructureNV handlesrc is not NULL_HANDLE, src must be a valid VkAccelerationStructureNV handlescratch must be a valid VkBuffer handlecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support compute operationscommandBuffer, dst, instanceData, scratch, and src that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDeviceVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
commandBuffer - the command buffer into which the command will be recorded.pInfo - contains the shared information for the acceleration structure’s structure.instanceData - the buffer containing instance data that will be used to build the acceleration structure as described in Accelerator structure instances. This parameter must be NULL for bottom level acceleration structures.instanceOffset - the offset in bytes (relative to the start of instanceData) at which the instance data is located.update - specifies whether to update the dst acceleration structure with the data in src.dst - a pointer to the target acceleration structure for the build.src - a pointer to an existing acceleration structure that is to be used to update the dst acceleration structure.scratch - the VkBuffer that will be used as scratch memory for the build.scratchOffset - the offset in bytes relative to the start of scratch that will be used as a scratch memory.public static void vkCmdCopyAccelerationStructureNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long dst,
long src,
int mode)
To copy an acceleration structure call:
void vkCmdCopyAccelerationStructureNV(
VkCommandBuffer commandBuffer,
VkAccelerationStructureNV dst,
VkAccelerationStructureNV src,
VkCopyAccelerationStructureModeNV mode);
mode must be COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NV or COPY_ACCELERATION_STRUCTURE_MODE_CLONE_NVsrc must have been built with BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV if mode is COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_NVcommandBuffer must be a valid VkCommandBuffer handledst must be a valid VkAccelerationStructureNV handlesrc must be a valid VkAccelerationStructureNV handlemode must be a valid VkCopyAccelerationStructureModeNV valuecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support compute operationscommandBuffer, dst, and src must have been created, allocated, or retrieved from the same VkDeviceVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
commandBuffer - the command buffer into which the command will be recorded.dst - a pointer to the target acceleration structure for the copy.src - a pointer to the source acceleration structure for the copy.mode - a VkCopyAccelerationStructureModeNV value specifying additional operations to perform during the copy.public static void vkCmdTraceRaysNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long raygenShaderBindingTableBuffer,
long raygenShaderBindingOffset,
long missShaderBindingTableBuffer,
long missShaderBindingOffset,
long missShaderBindingStride,
long hitShaderBindingTableBuffer,
long hitShaderBindingOffset,
long hitShaderBindingStride,
long callableShaderBindingTableBuffer,
long callableShaderBindingOffset,
long callableShaderBindingStride,
int width,
int height,
int depth)
To dispatch a ray tracing call use:
void vkCmdTraceRaysNV(
VkCommandBuffer commandBuffer,
VkBuffer raygenShaderBindingTableBuffer,
VkDeviceSize raygenShaderBindingOffset,
VkBuffer missShaderBindingTableBuffer,
VkDeviceSize missShaderBindingOffset,
VkDeviceSize missShaderBindingStride,
VkBuffer hitShaderBindingTableBuffer,
VkDeviceSize hitShaderBindingOffset,
VkDeviceSize hitShaderBindingStride,
VkBuffer callableShaderBindingTableBuffer,
VkDeviceSize callableShaderBindingOffset,
VkDeviceSize callableShaderBindingStride,
uint32_t width,
uint32_t height,
uint32_t depth);
When the command is executed, a ray generation group of width × height × depth rays is assembled.
VkImageView is sampled with FILTER_LINEAR as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITVkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BITVkImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXTVkImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by vkGetPhysicalDeviceImageFormatProperties2VkImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN_EXT or SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2VkImage created with a VkImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.VkPipeline bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout CompatibilityVkPipeline bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout CompatibilityvkCmdBindDescriptorSets, must be valid if they are statically used by the VkPipeline bound to the pipeline bind point used by this commandVkPipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set for commandBufferVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used to sample from any VkImage with a VkImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stageVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stageVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stageVkPipeline object bound 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 pointVkPipeline object bound 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 pointcommandBuffer is an unprotected command buffer, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resourcecommandBuffer is a protected command buffer, any resource written to by the VkPipeline object bound to the pipeline bind point used by this command must not be an unprotected resourcecommandBuffer is a protected command buffer, pipeline stages other than the framebuffer-space and compute stages in the VkPipeline object bound to the pipeline bind point must not write to any resourceraygenShaderBindingOffset must be less than the size of raygenShaderBindingTableBufferraygenShaderBindingOffset must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentmissShaderBindingOffset must be less than the size of missShaderBindingTableBuffermissShaderBindingOffset must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmenthitShaderBindingOffset must be less than the size of hitShaderBindingTableBufferhitShaderBindingOffset must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentcallableShaderBindingOffset must be less than the size of callableShaderBindingTableBuffercallableShaderBindingOffset must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupBaseAlignmentmissShaderBindingStride must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizehitShaderBindingStride must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizecallableShaderBindingStride must be a multiple of VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSizemissShaderBindingStride must be a less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridehitShaderBindingStride must be a less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridecallableShaderBindingStride must be a less than or equal to VkPhysicalDeviceRayTracingPropertiesNV::maxShaderGroupStridewidth must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]height must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]depth must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]commandBuffer must be a valid VkCommandBuffer handleraygenShaderBindingTableBuffer must be a valid VkBuffer handlemissShaderBindingTableBuffer is not NULL_HANDLE, missShaderBindingTableBuffer must be a valid VkBuffer handlehitShaderBindingTableBuffer is not NULL_HANDLE, hitShaderBindingTableBuffer must be a valid VkBuffer handlecallableShaderBindingTableBuffer is not NULL_HANDLE, callableShaderBindingTableBuffer must be a valid VkBuffer handlecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support compute operationscallableShaderBindingTableBuffer, commandBuffer, hitShaderBindingTableBuffer, missShaderBindingTableBuffer, and raygenShaderBindingTableBuffer that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDeviceVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
commandBuffer - the command buffer into which the command will be recorded.raygenShaderBindingTableBuffer - the buffer object that holds the shader binding table data for the ray generation shader stage.raygenShaderBindingOffset - the offset in bytes (relative to raygenShaderBindingTableBuffer) of the ray generation shader being used for the trace.missShaderBindingTableBuffer - the buffer object that holds the shader binding table data for the miss shader stage.missShaderBindingOffset - the offset in bytes (relative to missShaderBindingTableBuffer) of the miss shader being used for the trace.missShaderBindingStride - the size in bytes of each shader binding table record in missShaderBindingTableBuffer.hitShaderBindingTableBuffer - the buffer object that holds the shader binding table data for the hit shader stages.hitShaderBindingOffset - the offset in bytes (relative to hitShaderBindingTableBuffer) of the hit shader group being used for the trace.hitShaderBindingStride - the size in bytes of each shader binding table record in hitShaderBindingTableBuffer.callableShaderBindingTableBuffer - the buffer object that holds the shader binding table data for the callable shader stage.callableShaderBindingOffset - the offset in bytes (relative to callableShaderBindingTableBuffer) of the callable shader being used for the trace.callableShaderBindingStride - the size in bytes of each shader binding table record in callableShaderBindingTableBuffer.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.public static int nvkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
int createInfoCount,
long pCreateInfos,
long pAllocator,
long pPipelines)
CreateRayTracingPipelinesNVcreateInfoCount - the length of the pCreateInfos and pPipelines arrays.public static int vkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
VkRayTracingPipelineCreateInfoNV.Buffer pCreateInfos,
@Nullable
VkAllocationCallbacks pAllocator,
java.nio.LongBuffer pPipelines)
To create ray tracing pipelines, call:
VkResult vkCreateRayTracingPipelinesNV(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkRayTracingPipelineCreateInfoNV* pCreateInfos,
const VkAllocationCallbacks* pAllocator,
VkPipeline* pPipelines);
flags member of any element of pCreateInfos contains the PIPELINE_CREATE_DERIVATIVE_BIT flag, and the basePipelineIndex member of that same element is not -1, basePipelineIndex must be less than the index into pCreateInfos that corresponds to that elementflags member of any element of pCreateInfos contains the PIPELINE_CREATE_DERIVATIVE_BIT flag, the base pipeline must have been created with the PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT flag setdevice must be a valid VkDevice handlepipelineCache is not NULL_HANDLE, pipelineCache must be a valid VkPipelineCache handlepCreateInfos must be a valid pointer to an array of createInfoCount valid VkRayTracingPipelineCreateInfoNV structurespAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structurepPipelines must be a valid pointer to an array of createInfoCount VkPipeline handlescreateInfoCount must be greater than 0pipelineCache is a valid handle, it must have been created, allocated, or retrieved from devicedevice - the logical device that creates the ray tracing pipelines.pipelineCache - either NULL_HANDLE, indicating that pipeline caching is disabled, or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.pCreateInfos - a pointer to an array of VkRayTracingPipelineCreateInfoNV structures.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.public static int nvkGetRayTracingShaderGroupHandlesNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int firstGroup,
int groupCount,
long dataSize,
long pData)
GetRayTracingShaderGroupHandlesNVdataSize - the size in bytes of the buffer pointed to by pData.public static int vkGetRayTracingShaderGroupHandlesNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int firstGroup,
int groupCount,
java.nio.ByteBuffer pData)
To query the opaque handles of shaders in the ray tracing pipeline, call:
VkResult vkGetRayTracingShaderGroupHandlesNV(
VkDevice device,
VkPipeline pipeline,
uint32_t firstGroup,
uint32_t groupCount,
size_t dataSize,
void* pData);
firstGroup and groupCount must be less than the number of shader groups in pipeline.dataSize must be at least VkPhysicalDeviceRayTracingPropertiesNV::shaderGroupHandleSize × groupCountdevice must be a valid VkDevice handlepipeline must be a valid VkPipeline handlepData must be a valid pointer to an array of dataSize bytesdataSize must be greater than 0pipeline must have been created, allocated, or retrieved from devicedevice - 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 the VkRayTracingShaderGroupCreateInfoNV::pGroups array.groupCount - the number of shader handles to retrieve.pData - a pointer to a user-allocated buffer where the results will be written.public static int nvkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long dataSize,
long pData)
GetAccelerationStructureHandleNVdataSize - the size in bytes of the buffer pointed to by pData.public static int vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
java.nio.ByteBuffer pData)
To allow constructing geometry instances with device code if desired, we need to be able to query a opaque handle for an acceleration structure. This handle is a value of 8 bytes. To get this handle, call:
VkResult vkGetAccelerationStructureHandleNV(
VkDevice device,
VkAccelerationStructureNV accelerationStructure,
size_t dataSize,
void* pData);
dataSize must be large enough to contain the result of the query, as described aboveaccelerationStructure must be bound completely and contiguously to a single VkDeviceMemory object via BindAccelerationStructureMemoryNVdevice must be a valid VkDevice handleaccelerationStructure must be a valid VkAccelerationStructureNV handlepData must be a valid pointer to an array of dataSize bytesdataSize must be greater than 0accelerationStructure must have been created, allocated, or retrieved from devicedevice - the logical device that owns the acceleration structures.accelerationStructure - the acceleration structure.pData - a pointer to a user-allocated buffer where the results will be written.public static int vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
java.nio.LongBuffer pData)
To allow constructing geometry instances with device code if desired, we need to be able to query a opaque handle for an acceleration structure. This handle is a value of 8 bytes. To get this handle, call:
VkResult vkGetAccelerationStructureHandleNV(
VkDevice device,
VkAccelerationStructureNV accelerationStructure,
size_t dataSize,
void* pData);
dataSize must be large enough to contain the result of the query, as described aboveaccelerationStructure must be bound completely and contiguously to a single VkDeviceMemory object via BindAccelerationStructureMemoryNVdevice must be a valid VkDevice handleaccelerationStructure must be a valid VkAccelerationStructureNV handlepData must be a valid pointer to an array of dataSize bytesdataSize must be greater than 0accelerationStructure must have been created, allocated, or retrieved from devicedevice - the logical device that owns the acceleration structures.accelerationStructure - the acceleration structure.pData - a pointer to a user-allocated buffer where the results will be written.public static void nvkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int accelerationStructureCount,
long pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
CmdWriteAccelerationStructuresPropertiesNVaccelerationStructureCount - the count of acceleration structures for which to query the property.public static void vkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
java.nio.LongBuffer pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
To query acceleration structure size parameters call:
void vkCmdWriteAccelerationStructuresPropertiesNV(
VkCommandBuffer commandBuffer,
uint32_t accelerationStructureCount,
const VkAccelerationStructureNV* pAccelerationStructures,
VkQueryType queryType,
VkQueryPool queryPool,
uint32_t firstQuery);
queryType must be QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NVqueryPool must have been created with a queryType matching queryTypequeryPool and firstQuery must be unavailableaccelerationStructures must have been built with BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV if queryType is QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NVcommandBuffer must be a valid VkCommandBuffer handlepAccelerationStructures must be a valid pointer to an array of accelerationStructureCount valid VkAccelerationStructureNV handlesqueryType must be a valid VkQueryType valuequeryPool must be a valid VkQueryPool handlecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support compute operationsaccelerationStructureCount must be greater than 0commandBuffer, queryPool, and the elements of pAccelerationStructures must have been created, allocated, or retrieved from the same VkDeviceVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute |
commandBuffer - the command buffer into which the command will be recorded.pAccelerationStructures - a pointer to an array of existing previously built acceleration structures.queryType - a VkQueryType value specifying the type of queries managed by the pool.queryPool - the query pool that will manage the results of the query.firstQuery - the first query index within the query pool that will contain the accelerationStructureCount number of results.public static int vkCompileDeferredNV(org.lwjgl.vulkan.VkDevice device,
long pipeline,
int shader)
To compile a deferred shader in a pipeline call:
VkResult vkCompileDeferredNV(
VkDevice device,
VkPipeline pipeline,
uint32_t shader);
pipeline must have been created with PIPELINE_CREATE_DEFER_COMPILE_BIT_NVshader must not have been called as a deferred compile beforedevice must be a valid VkDevice handlepipeline must be a valid VkPipeline handlepipeline must have been created, allocated, or retrieved from devicedevice - the logical device containing the ray tracing pipeline.pipeline - the ray tracing pipeline object containing the shaders.shader - the index of the shader to compile.public static int vkCreateAccelerationStructureNV(org.lwjgl.vulkan.VkDevice device,
VkAccelerationStructureCreateInfoNV pCreateInfo,
@Nullable
VkAllocationCallbacks pAllocator,
long[] pAccelerationStructure)
CreateAccelerationStructureNVpublic static int vkCreateRayTracingPipelinesNV(org.lwjgl.vulkan.VkDevice device,
long pipelineCache,
VkRayTracingPipelineCreateInfoNV.Buffer pCreateInfos,
@Nullable
VkAllocationCallbacks pAllocator,
long[] pPipelines)
CreateRayTracingPipelinesNVpublic static int vkGetAccelerationStructureHandleNV(org.lwjgl.vulkan.VkDevice device,
long accelerationStructure,
long[] pData)
GetAccelerationStructureHandleNVpublic static void vkCmdWriteAccelerationStructuresPropertiesNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long[] pAccelerationStructures,
int queryType,
long queryPool,
int firstQuery)
CmdWriteAccelerationStructuresPropertiesNVCopyright LWJGL. All Rights Reserved. License terms.