Skip to content

Commit a98c01d

Browse files
committed
fix driver detection
1 parent 4284d95 commit a98c01d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

samples/fib.slim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var input u32 subgroup_local_id;
1010
@Builtin("SubgroupId")
1111
var uniform input u32 subgroup_id;
1212

13-
@EntryPoint("Compute") @WorkgroupSize(32, 1, 1) fn main() {
13+
@EntryPoint("Compute") @WorkgroupSize(SUBGROUP_SIZE, 1, 1) fn main() {
1414
val n = subgroup_local_id % u32 16;
1515
debug_printf("fib(%d) = %d from thread %d:%d\n", n, fib(n), subgroup_id, subgroup_local_id);
1616
return ();

src/runtime/vulkan/vk_runtime_device.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ static bool fill_device_properties(VkrDeviceCaps* caps) {
100100
append_pnext((VkBaseOutStructure*) &caps->properties.base, &caps->properties.external_memory_host);
101101
}
102102

103+
if (caps->supported_extensions[ShadySupportsKHR_driver_properties]) {
104+
caps->properties.driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES;
105+
append_pnext((VkBaseOutStructure*) &caps->properties.base, &caps->properties.driver_properties);
106+
}
107+
103108
vkGetPhysicalDeviceProperties2(caps->physical_device, &caps->properties.base);
104109

105110
if (caps->supported_extensions[ShadySupportsEXT_subgroup_size_control] || caps->properties.base.properties.apiVersion >= VK_MAKE_VERSION(1, 3, 0)) {
@@ -110,11 +115,6 @@ static bool fill_device_properties(VkrDeviceCaps* caps) {
110115
caps->subgroup_size.min = caps->properties.subgroup.subgroupSize;
111116
}
112117
debug_print("Subgroup size range for device '%s' is [%d; %d]\n", caps->properties.base.properties.deviceName, caps->subgroup_size.min, caps->subgroup_size.max);
113-
114-
if (caps->supported_extensions[ShadySupportsKHR_driver_properties]) {
115-
caps->properties.driver_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES;
116-
append_pnext((VkBaseOutStructure*) &caps->properties.base, &caps->properties.driver_properties);
117-
}
118118
return true;
119119
}
120120

0 commit comments

Comments
 (0)