remove dead comments
This commit is contained in:
@@ -351,11 +351,13 @@ pub fn copyBuffer(
|
|||||||
.p_command_buffers = @ptrCast(&cmdbuf),
|
.p_command_buffers = @ptrCast(&cmdbuf),
|
||||||
.p_wait_dst_stage_mask = undefined,
|
.p_wait_dst_stage_mask = undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
// creating and submitting a queue for every copy operation seems a bad idea for "streamed" data
|
// creating and submitting a queue for every copy operation seems a bad idea for "streamed" data
|
||||||
// gonna want a way to send a copy operation WITH SYNCHRONIZATION PRIMITIVES on a particular queue
|
// gonna want a way to send a copy operation WITH SYNCHRONIZATION PRIMITIVES on a particular queue
|
||||||
// see https://stackoverflow.com/a/62183243
|
// see https://stackoverflow.com/a/62183243
|
||||||
//
|
//
|
||||||
// this may be a misunderstanding on how submission works...
|
// this may be a misunderstanding on how submission works...
|
||||||
|
|
||||||
try vkd.queueSubmit(queue, 1, @ptrCast(&si), .null_handle);
|
try vkd.queueSubmit(queue, 1, @ptrCast(&si), .null_handle);
|
||||||
try vkd.queueWaitIdle(queue);
|
try vkd.queueWaitIdle(queue);
|
||||||
}
|
}
|
||||||
|
38
src/main.zig
38
src/main.zig
@@ -317,18 +317,9 @@ pub fn main() !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const frame: ChainImage = chain.get(index);
|
const frame: ChainImage = chain.get(index);
|
||||||
// const next_frame: ChainImage = chain.get((index + 1) % chain.len);
|
|
||||||
|
|
||||||
render(dev, vkd, swapchain, frame, queue) catch |err| switch (err) {
|
render(dev, vkd, swapchain, frame, queue) catch |err| switch (err) {
|
||||||
error.OutOfDateKHR => {
|
error.OutOfDateKHR => {
|
||||||
// try vkd.deviceWaitIdle(dev);
|
|
||||||
// _ = try vkd.waitForFences(
|
|
||||||
// dev,
|
|
||||||
// @intCast(chain.len),
|
|
||||||
// chain.items(.fence).ptr,
|
|
||||||
// vk.TRUE,
|
|
||||||
// std.math.maxInt(u64),
|
|
||||||
// );
|
|
||||||
try vkd.deviceWaitIdle(dev);
|
try vkd.deviceWaitIdle(dev);
|
||||||
|
|
||||||
deinit_chain(chain, dev, vkd, pool);
|
deinit_chain(chain, dev, vkd, pool);
|
||||||
@@ -360,40 +351,11 @@ pub fn main() !void {
|
|||||||
else => |errx| return errx,
|
else => |errx| return errx,
|
||||||
};
|
};
|
||||||
|
|
||||||
// var index: u32 = undefined;
|
|
||||||
// try vkd.acquireNextImageKHR(dev, swapchain, std.math.maxInt(u64), frame., fence);
|
|
||||||
|
|
||||||
// const cmdbuf = cmdbufs[swapchain.image_index];
|
|
||||||
|
|
||||||
// const state = swapchain.present(cmdbuf) catch |err| switch (err) {
|
|
||||||
// error.OutOfDateKHR => Swapchain.PresentState.suboptimal,
|
|
||||||
// else => |narrow| return narrow,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// if (state == .suboptimal or extent.width != @as(u32, @intCast(w)) or extent.height != @as(u32, @intCast(h))) {
|
|
||||||
// extent.width = @intCast(w);
|
|
||||||
// extent.height = @intCast(h);
|
|
||||||
// try swapchain.recreate(extent, format);
|
|
||||||
//
|
|
||||||
// destroyCommandBuffers(&gc, pool, ally, cmdbufs);
|
|
||||||
//
|
|
||||||
// cmdbufs = try createCommandBuffers(
|
|
||||||
// &gc,
|
|
||||||
// pool,
|
|
||||||
// ally,
|
|
||||||
// vertex_buffer,
|
|
||||||
// index_buffer,
|
|
||||||
// pipeline,
|
|
||||||
// swapchain,
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
c.glfwPollEvents();
|
c.glfwPollEvents();
|
||||||
|
|
||||||
index = @intCast((index + 1) % chain.len);
|
index = @intCast((index + 1) % chain.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
// try swapchain.waitForAllFences();
|
|
||||||
try vkd.deviceWaitIdle(dev);
|
try vkd.deviceWaitIdle(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user