fixes
This commit is contained in:
parent
3f734bb8da
commit
209b78bc1a
5
vulkan.d
5
vulkan.d
@ -290,6 +290,7 @@ struct Vulkan
|
||||
SLList!(SI) cleanup_list;
|
||||
|
||||
PlatformHandles platform_handles;
|
||||
u32 window_h, window_w;
|
||||
|
||||
VkDebugUtilsMessengerEXT dbg_msg;
|
||||
VkInstance instance;
|
||||
@ -2492,8 +2493,8 @@ CreateSwapchain(Vulkan* vk)
|
||||
imageFormat: vk.surface_format.format,
|
||||
imageColorSpace: vk.surface_format.colorSpace,
|
||||
imageExtent: {
|
||||
width: clamp(cast(u32)vk.window.w, cap.minImageExtent.width, cap.maxImageExtent.width),
|
||||
height: clamp(cast(u32)vk.window.h, cap.minImageExtent.height, cap.maxImageExtent.height),
|
||||
width: clamp(cast(u32)vk.window_w, cap.minImageExtent.width, cap.maxImageExtent.width),
|
||||
height: clamp(cast(u32)vk.window_h, cap.minImageExtent.height, cap.maxImageExtent.height),
|
||||
},
|
||||
preTransform: cap.currentTransform,
|
||||
presentMode: vk.present_mode,
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import std.stdio;
|
||||
import core.stdc.string : memset;
|
||||
|
||||
@nogc:
|
||||
|
||||
alias i8 = byte;
|
||||
alias i16 = short;
|
||||
alias i32 = int;
|
||||
@ -151,6 +153,20 @@ Push(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil)
|
||||
}
|
||||
}
|
||||
|
||||
PushFront(T)(SLList!(T)*list, Node!(T)* node, Node!(T)* nil)
|
||||
{
|
||||
if (CheckNil(nil, list.first))
|
||||
{
|
||||
list.first = list.last = node;
|
||||
node.next = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
node.next = list.first;
|
||||
list.first = node;
|
||||
}
|
||||
}
|
||||
|
||||
pragma(inline): bool
|
||||
CheckNil(T)(Node!(T)* nil, Node!(T)* node)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user