Skip to content

Commit

Permalink
Test for and require VK_EXT_scalar_block_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Sep 5, 2023
1 parent 4d0b7cb commit e74180b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/org/lwjgl/demo/vulkan/raytracing/VoxelChunks.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import static org.lwjgl.util.vma.Vma.*;
import static org.lwjgl.vulkan.EXTDebugUtils.*;
import static org.lwjgl.vulkan.EXTDescriptorIndexing.VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME;
import static org.lwjgl.vulkan.EXTScalarBlockLayout.VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME;
import static org.lwjgl.vulkan.KHRAccelerationStructure.*;
import static org.lwjgl.vulkan.KHRBufferDeviceAddress.*;
import static org.lwjgl.vulkan.KHRDeferredHostOperations.VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME;
Expand Down Expand Up @@ -570,6 +571,10 @@ private static VkDevice createDevice(List<String> requiredExtensions) {
.calloc(stack)
.sType$Default()
.bufferDeviceAddress(true))
.pNext(VkPhysicalDeviceScalarBlockLayoutFeaturesEXT
.calloc(stack)
.sType$Default()
.scalarBlockLayout(true))
.pQueueCreateInfos(VkDeviceQueueCreateInfo
.calloc(1, stack)
.sType$Default()
Expand Down Expand Up @@ -2043,7 +2048,8 @@ private static void init() throws IOException {
VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME,
VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME,
VK_KHR_SPIRV_1_4_EXTENSION_NAME,
VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME));
VK_KHR_SHADER_FLOAT_CONTROLS_EXTENSION_NAME,
VK_EXT_SCALAR_BLOCK_LAYOUT_EXTENSION_NAME));
vmaAllocator = createVmaAllocator();
queue = retrieveQueue();
swapchain = createSwapchain();
Expand Down

0 comments on commit e74180b

Please sign in to comment.