Skip to content

Commit

Permalink
Fix usage flags for buffers whose device addresses are queried
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Jul 24, 2024
1 parent 5b89c9e commit 86232f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/org/lwjgl/demo/vulkan/raytracing/SdfBricks.java
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,8 @@ private static AccelerationStructure createBottomLevelAccelerationStructure(

// Create a buffer that will hold the final BLAS
AllocationAndBuffer accelerationStructureBuffer = createBuffer(
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR |
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
null, 256, null);

// Create a BLAS object (not currently built)
Expand Down
3 changes: 2 additions & 1 deletion src/org/lwjgl/demo/vulkan/raytracing/SimpleSphere.java
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,8 @@ private static AccelerationStructure createBottomLevelAccelerationStructure(

// Create a buffer that will hold the final BLAS
AllocationAndBuffer accelerationStructureBuffer = createBuffer(
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR |
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
null, 256, null);

// Create a BLAS object (not currently built)
Expand Down
3 changes: 2 additions & 1 deletion src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,8 @@ private static AccelerationStructure createBottomLevelAccelerationStructure(

// Create a buffer that will hold the final BLAS
AllocationAndBuffer accelerationStructureBuffer = createBuffer(
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR |
VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR, buildSizesInfo.accelerationStructureSize(),
null, 256, null);

// Create a BLAS object (not currently built)
Expand Down

0 comments on commit 86232f9

Please sign in to comment.