Skip to content

Commit 7100dac

Browse files
committed
add position fetch extension feature
1 parent 039734a commit 7100dac

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/nbl/video/CVulkanPhysicalDevice.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,8 @@ std::unique_ptr<CVulkanPhysicalDevice> CVulkanPhysicalDevice::create(core::smart
10621062

10631063
features.rayQuery = isExtensionSupported(VK_KHR_RAY_QUERY_EXTENSION_NAME) && isExtensionSupported(VK_KHR_RAY_TRACING_MAINTENANCE_1_EXTENSION_NAME);
10641064

1065+
features.rayTracingPositionFetch = isExtensionSupported(VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME);
1066+
10651067
if (isExtensionSupported(VK_NV_REPRESENTATIVE_FRAGMENT_TEST_EXTENSION_NAME))
10661068
features.representativeFragmentTest = representativeFragmentTestFeatures.representativeFragmentTest;
10671069

@@ -1463,6 +1465,9 @@ core::smart_refctd_ptr<ILogicalDevice> CVulkanPhysicalDevice::createLogicalDevic
14631465
VkPhysicalDeviceRayQueryFeaturesKHR rayQueryFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_QUERY_FEATURES_KHR,nullptr };
14641466
REQUIRE_EXTENSION_IF(enabledFeatures.rayQuery,VK_KHR_RAY_QUERY_EXTENSION_NAME,&rayQueryFeatures); // feature dependency taken care of
14651467

1468+
VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR rayTracingPositionFetchFeatures = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_POSITION_FETCH_FEATURES_KHR,nullptr };
1469+
REQUIRE_EXTENSION_IF(enabledFeatures.rayTracingPositionFetch, VK_KHR_RAY_TRACING_POSITION_FETCH_EXTENSION_NAME, &rayTracingPositionFetchFeatures); // feature dependency taken care of
1470+
14661471
VkPhysicalDeviceShaderSMBuiltinsFeaturesNV shaderSMBuiltinsFeaturesNV = { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV,nullptr };
14671472
enableExtensionIfAvailable(VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME,&shaderSMBuiltinsFeaturesNV);
14681473

src/nbl/video/device_capabilities/device_features.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4023,8 +4023,15 @@
40234023
"VK_AMD_extension_478",
40244024
"VK_AMD_extension_479",
40254025
"VK_EXT_extension_480",
4026-
"VK_EXT_extension_481",
4027-
"TODO: implement",
4026+
"VK_EXT_extension_481"
4027+
]
4028+
},
4029+
{
4030+
"type": "bool",
4031+
"name": "rayTracingPositionFetch",
4032+
"value": false,
4033+
"comment": [
4034+
"RayTracingPositionFetchFeaturesKHR",
40284035
"VK_KHR_ray_tracing_position_fetch"
40294036
]
40304037
},

0 commit comments

Comments
 (0)