summaryrefslogtreecommitdiff
path: root/tools/gfx/vulkan/vk-device.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-01-30 13:19:13 -0800
committerGitHub <noreply@github.com>2025-01-30 13:19:13 -0800
commitfb052bf4674b55933e6dd9f991c99000c049d216 (patch)
treecff94fc924a63fe80ae53cc3a0c15039c171bf7a /tools/gfx/vulkan/vk-device.cpp
parent7a8131d312d84f71b1c8776ad83713dea52301f4 (diff)
Support cooperative vector including Vulkan-Header (#6228)
* Support cooperative vector including Vulkan-Header Adding a Slang support for cooperative vector with vulkan-header update.
Diffstat (limited to 'tools/gfx/vulkan/vk-device.cpp')
-rw-r--r--tools/gfx/vulkan/vk-device.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp
index 3654203da..cffa094ae 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -511,6 +511,10 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
extendedFeatures.clockFeatures.pNext = deviceFeatures2.pNext;
deviceFeatures2.pNext = &extendedFeatures.clockFeatures;
+ // cooperative vector features
+ extendedFeatures.cooperativeVectorFeatures.pNext = deviceFeatures2.pNext;
+ deviceFeatures2.pNext = &extendedFeatures.cooperativeVectorFeatures;
+
// Atomic Float
// To detect atomic float we need
// https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkPhysicalDeviceShaderAtomicFloatFeaturesEXT.html
@@ -748,6 +752,16 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
deviceCreateInfo.pNext = &extendedFeatures.vulkan12Features;
}
+ if (extendedFeatures.cooperativeVectorFeatures.cooperativeVector)
+ {
+ deviceExtensions.add(VK_NV_COOPERATIVE_VECTOR_EXTENSION_NAME);
+
+ extendedFeatures.cooperativeVectorFeatures.pNext = (void*)deviceCreateInfo.pNext;
+ deviceCreateInfo.pNext = &extendedFeatures.cooperativeVectorFeatures;
+
+ m_features.add("cooperative-vector");
+ }
+
VkPhysicalDeviceProperties2 extendedProps = {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2};
VkPhysicalDeviceRayTracingPipelinePropertiesKHR rtProps = {