Skip to content

Commit

Permalink
Fix for release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mossseank committed Oct 6, 2020
1 parent 7a2e55b commit 2a65d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions VVK/VulkanInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public VulkanInstance(Vk.Instance inst, Vk.Version version)
Vk.EXT.DebugUtilsMessageTypeFlags.ValidationEXT;
mci.UserCallback = &_DebugUtilsCallback;
mci.UserData = _debugToken;
Vk.EXT.DebugUtilsMessenger debugHandle;
Vk.EXT.DebugUtilsMessenger debugHandle = Vk.EXT.DebugUtilsMessenger.Null;
CreateDebugUtilsMessengerEXT(&mci, null, &debugHandle).Throw();
_debugHandle = debugHandle;
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public static VulkanInstance Create(string appName, Vk.Version appVersion, Vk.Ve
IEnumerable<string>? extensions = null, IEnumerable<string>? layers = null)
{
// Check instance version
Vk.Version vers;
Vk.Version vers = new();
EnumerateInstanceVersion(&vers.Value).Throw();
if (vers < apiVersion) {
throw new PlatformNotSupportedException(
Expand Down Expand Up @@ -198,7 +198,7 @@ public static VulkanInstance Create(string appName, Vk.Version appVersion, Vk.Ve
ici.EnabledLayerNames = layerNames.Data;
ici.EnabledExtensionCount = extNames.Count;
ici.EnabledExtensionNames = extNames.Data;
Vk.Instance handle;
Vk.Instance handle = Vk.Instance.Null;
CreateInstance(&ici, null, &handle).Throw();

// Return
Expand Down
2 changes: 1 addition & 1 deletion VVK/VulkanPhysicalDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public VulkanDevice CreateDevice(
}

// Create the device info
Vk.Device handle;
Vk.Device handle = Vk.Device.Null;
fixed (Vk.DeviceQueueCreateInfo* queuePtr = queueInfos) {
Vk.DeviceCreateInfo.New(out var dci);
dci.QueueCreateInfoCount = (uint)queueInfos.Length;
Expand Down

0 comments on commit 2a65d69

Please sign in to comment.