Skip to content
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion daslib/vulkan_window.das
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def public recreate_swapchain(var sc : Swapchain; device : Device; phys : VkPhys
vkDeviceWaitIdle(boost_value_to_vk(device))
let keep_format = sc.format // preserve the format across resize (the render pass was built for it)
delete sc // release the old swapchain before making a new one (the surface is app-owned)
sc <- create_swapchain(device, phys, surface, width, height, keep_format) // nolint:PERF030 - deleted just above
sc <- create_swapchain(device, phys, surface, width, height, keep_format)
build_swapchain_framebuffers(device, sc, render_pass)
}

Expand Down
4 changes: 2 additions & 2 deletions tutorials/02_mandelbrot/window/show_mandelbrot_blit.das
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
let ok = present_frame(device, queue, swap, pool, sync) $(cmd; target; _idx) {
Expand Down Expand Up @@ -148,7 +148,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/03_sdf/window/show_sdf.das
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
let ok = present_frame(device, queue, swap, pool, sync) $(cmd; target; _idx) {
Expand Down Expand Up @@ -133,7 +133,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/04_cube/window/show_cube.das
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
// 20-second lemniscate orbit -- one full pass per 20s of wall clock.
Expand Down Expand Up @@ -128,7 +128,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/05_instancing/window/show_instancing.das
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
// 25-second camera orbit -- one full circle per 25s of wall clock.
Expand Down Expand Up @@ -126,7 +126,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/06_skybox/window/show_skybox.das
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
// 30-second camera orbit -- one full circle per 30s of wall clock.
Expand Down Expand Up @@ -126,7 +126,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/07_particles/window/show_particles.das
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
let dt = min(0.05f, t - last_t) // cap dt so a long stall doesn't fling particles
Expand Down Expand Up @@ -131,7 +131,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/08_shadow/window/show_shadow.das
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
// 24-second camera orbit; sun rotates at its own rate inside update_shadow_uniforms.
Expand Down Expand Up @@ -124,7 +124,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/09_msaa/window/show_msaa.das
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
// 24-second orbit (camera_t in [0, 1))
Expand Down Expand Up @@ -153,7 +153,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/10_deferred/window/show_deferred.das
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
let raw_cam = t * 0.042f
Expand Down Expand Up @@ -148,7 +148,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/11_hdr/window/show_hdr.das
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
require_srgb_swap(swap) // recreation can fall back to a different surface format
}
let t = float(glfwGetTime())
Expand Down Expand Up @@ -141,7 +141,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/12_gpu_driven/window/show_gpu_driven.das
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
let wall_x = 5.0f * sin(t * 1.05f) // sweep the wall across the field (~6 s round trip)
Expand Down Expand Up @@ -121,7 +121,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/14_teapot/window/show_teapot.das
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let t = float(glfwGetTime())
update_teapot_uniforms(res, device, t, false)
Expand Down Expand Up @@ -131,7 +131,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
4 changes: 2 additions & 2 deletions tutorials/15_raytracing/window/show_raytracing.das
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (fbw != swap.width || fbh != swap.height) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
let angle = float(glfwGetTime()) * 0.4
let ok = present_frame(device, queue, swap, pool, sync) $(cmd; target; _idx) {
Expand Down Expand Up @@ -142,7 +142,7 @@ def main { // nolint:STYLE038 - flat viewer lifecycle scaffold
if (!ok) {
vkDeviceWaitIdle(boost_value_to_vk(device))
delete swap
swap <- create_swapchain(device, phys, surface, fbw, fbh) // nolint:PERF030 - deleted just above
swap <- create_swapchain(device, phys, surface, fbw, fbh)
}
}
vkDeviceWaitIdle(boost_value_to_vk(device))
Expand Down
Loading