Skip to content

Commit

Permalink
fix: remove one-time-submit flag for reused cmd buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Nov 10, 2021
1 parent de5a57d commit 6413a2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/org/lwjgl/demo/vulkan/raytracing/SimpleTriangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private static DeviceAndQueueFamilies selectPhysicalDevice() {
}
}

private static final List<String> enumerateSupportedInstanceLayers() {
private static List<String> enumerateSupportedInstanceLayers() {
try (MemoryStack stack = stackPush()) {
IntBuffer pPropertyCount = stack.mallocInt(1);
vkEnumerateInstanceLayerProperties(pPropertyCount, null);
Expand Down Expand Up @@ -1465,7 +1465,7 @@ private static VkCommandBuffer[] createRayTracingCommandBuffers() {
int count = swapchain.imageViews.length;
VkCommandBuffer[] buffers = new VkCommandBuffer[count];
for (int i = 0; i < count; i++) {
VkCommandBuffer cmdBuf = createCommandBuffer(commandPool, VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT);
VkCommandBuffer cmdBuf = createCommandBuffer(commandPool, 0);
try (MemoryStack stack = stackPush()) {
// insert a barrier to transition the framebuffer image from undefined to general,
// and do it somewhere between the top of the pipe and the start of the ray tracing.
Expand Down Expand Up @@ -1534,7 +1534,7 @@ private static VkCommandBuffer[] createRayTracingCommandBuffers() {
}

private static void updateRayTracingUniformBufferObject(int idx) {
projMatrix.scaling(1, -1, 1).perspective((float) toRadians(45.0f), (float) windowAndCallbacks.width / windowAndCallbacks.height, 0.1f, 100.0f, true);
projMatrix.scaling(1, -1, 1).perspective(toRadians(45.0f), (float) windowAndCallbacks.width / windowAndCallbacks.height, 0.1f, 100.0f, true);
viewMatrix.setLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
projMatrix.invert(invProjMatrix);
viewMatrix.invert(invViewMatrix);
Expand Down

0 comments on commit 6413a2f

Please sign in to comment.