diff --git a/src/org/lwjgl/demo/vulkan/raytracing/HybridMagicaVoxel.java b/src/org/lwjgl/demo/vulkan/raytracing/HybridMagicaVoxel.java index 55e9a786..6bbdd8cc 100644 --- a/src/org/lwjgl/demo/vulkan/raytracing/HybridMagicaVoxel.java +++ b/src/org/lwjgl/demo/vulkan/raytracing/HybridMagicaVoxel.java @@ -443,14 +443,14 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR) .pNext(NULL); - VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeaturesKHR = VkPhysicalDeviceRayTracingPipelineFeaturesKHR + VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeatures = VkPhysicalDeviceRayTracingPipelineFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR) .pNext(accelerationStructureFeatures.address()); VkPhysicalDeviceBufferDeviceAddressFeaturesKHR bufferDeviceAddressFeatures = VkPhysicalDeviceBufferDeviceAddressFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR) - .pNext(rayTracingPipelineFeaturesKHR.address()); + .pNext(rayTracingPipelineFeatures.address()); VkPhysicalDeviceFeatures2 physicalDeviceFeatures2 = VkPhysicalDeviceFeatures2 .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2) @@ -459,8 +459,8 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { // If any of the above is not supported, we continue with the next physical device if (!bufferDeviceAddressFeatures.bufferDeviceAddress() || - !accelerationStructureFeatures.accelerationStructure() || - !bufferDeviceAddressFeatures.bufferDeviceAddress()) + !rayTracingPipelineFeatures.rayTracingPipeline() || + !accelerationStructureFeatures.accelerationStructure()) continue; // Check if the physical device supports the VK_FORMAT_R16G16B16_UNORM vertexFormat for acceleration structure geometry diff --git a/src/org/lwjgl/demo/vulkan/raytracing/ReflectiveMagicaVoxel.java b/src/org/lwjgl/demo/vulkan/raytracing/ReflectiveMagicaVoxel.java index 0c31ea41..ee59fc06 100644 --- a/src/org/lwjgl/demo/vulkan/raytracing/ReflectiveMagicaVoxel.java +++ b/src/org/lwjgl/demo/vulkan/raytracing/ReflectiveMagicaVoxel.java @@ -432,14 +432,14 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR) .pNext(bitStorageFeatures.address()); - VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeaturesKHR = VkPhysicalDeviceRayTracingPipelineFeaturesKHR + VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeatures = VkPhysicalDeviceRayTracingPipelineFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR) .pNext(accelerationStructureFeatures.address()); VkPhysicalDeviceBufferDeviceAddressFeaturesKHR bufferDeviceAddressFeatures = VkPhysicalDeviceBufferDeviceAddressFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR) - .pNext(rayTracingPipelineFeaturesKHR.address()); + .pNext(rayTracingPipelineFeatures.address()); VkPhysicalDeviceFeatures2 physicalDeviceFeatures2 = VkPhysicalDeviceFeatures2 .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2) @@ -448,8 +448,8 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { // If any of the above is not supported, we continue with the next physical device if (!bufferDeviceAddressFeatures.bufferDeviceAddress() || + !rayTracingPipelineFeatures.rayTracingPipeline() || !accelerationStructureFeatures.accelerationStructure() || - !bufferDeviceAddressFeatures.bufferDeviceAddress() || !bitStorageFeatures.storageBuffer16BitAccess()) continue; @@ -502,14 +502,14 @@ private static VkDevice createDevice(List requiredExtensions) { if (DEBUG) { ppEnabledLayerNames = stack.pointers(stack.UTF8("VK_LAYER_KHRONOS_validation")); } - VkPhysicalDevice16BitStorageFeaturesKHR bitStorageFeaturesKHR = VkPhysicalDevice16BitStorageFeaturesKHR + VkPhysicalDevice16BitStorageFeaturesKHR bitStorageFeatures = VkPhysicalDevice16BitStorageFeaturesKHR .callocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES) .storageBuffer16BitAccess(true); VkPhysicalDeviceBufferDeviceAddressFeaturesKHR bufferDeviceAddressFeatures = VkPhysicalDeviceBufferDeviceAddressFeaturesKHR .callocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR) - .pNext(bitStorageFeaturesKHR.address()) + .pNext(bitStorageFeatures.address()) .bufferDeviceAddress(true); VkPhysicalDeviceDescriptorIndexingFeaturesEXT indexingFeatures = VkPhysicalDeviceDescriptorIndexingFeaturesEXT .callocStack(stack) diff --git a/src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java b/src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java index 0e1d8085..093168e4 100644 --- a/src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java +++ b/src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java @@ -392,14 +392,14 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ACCELERATION_STRUCTURE_FEATURES_KHR) .pNext(NULL); - VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeaturesKHR = VkPhysicalDeviceRayTracingPipelineFeaturesKHR + VkPhysicalDeviceRayTracingPipelineFeaturesKHR rayTracingPipelineFeatures = VkPhysicalDeviceRayTracingPipelineFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PIPELINE_FEATURES_KHR) .pNext(accelerationStructureFeatures.address()); VkPhysicalDeviceBufferDeviceAddressFeaturesKHR bufferDeviceAddressFeatures = VkPhysicalDeviceBufferDeviceAddressFeaturesKHR .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BUFFER_DEVICE_ADDRESS_FEATURES_KHR) - .pNext(rayTracingPipelineFeaturesKHR.address()); + .pNext(rayTracingPipelineFeatures.address()); VkPhysicalDeviceFeatures2 physicalDeviceFeatures2 = VkPhysicalDeviceFeatures2 .mallocStack(stack) .sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2) @@ -408,8 +408,8 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() { // If any of the above is not supported, we continue with the next physical device if (!bufferDeviceAddressFeatures.bufferDeviceAddress() || - !accelerationStructureFeatures.accelerationStructure() || - !bufferDeviceAddressFeatures.bufferDeviceAddress()) + !rayTracingPipelineFeatures.rayTracingPipeline() || + !accelerationStructureFeatures.accelerationStructure()) continue; // Retrieve physical device properties (limits, offsets, alignments, ...)