From 3818112a73fa4bfc714abf691b98428cd520ced2 Mon Sep 17 00:00:00 2001 From: katalash <44953920+katalash@users.noreply.github.com> Date: Tue, 17 Oct 2023 18:16:55 -0700 Subject: [PATCH] Bump dependencies (#731) --- SoapstoneLib/SoapstoneLib/SoapstoneLib.csproj | 6 ++-- SoulsFormats/SoulsFormats/SoulsFormats.csproj | 4 +-- StudioCore/StudioCore.csproj | 8 ++--- .../Veldrid.SPIRV.VariantCompiler.csproj | 2 +- Veldrid/CommandList.cs | 16 ++++----- Veldrid/GraphicsDevice.cs | 36 +++++++++---------- Veldrid/ResourceSet.cs | 2 +- Veldrid/Swapchain.cs | 4 +-- Veldrid/Veldrid.csproj | 4 +-- Veldrid/VkSwapchainFramebuffer.cs | 4 +-- Veldrid/VulkanUtil.cs | 6 ++-- 11 files changed, 46 insertions(+), 46 deletions(-) diff --git a/SoapstoneLib/SoapstoneLib/SoapstoneLib.csproj b/SoapstoneLib/SoapstoneLib/SoapstoneLib.csproj index fae04c9f9..513c3a7b5 100644 --- a/SoapstoneLib/SoapstoneLib/SoapstoneLib.csproj +++ b/SoapstoneLib/SoapstoneLib/SoapstoneLib.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/SoulsFormats/SoulsFormats/SoulsFormats.csproj b/SoulsFormats/SoulsFormats/SoulsFormats.csproj index a4c01e02f..4f040ffa4 100644 --- a/SoulsFormats/SoulsFormats/SoulsFormats.csproj +++ b/SoulsFormats/SoulsFormats/SoulsFormats.csproj @@ -20,8 +20,8 @@ - - + + diff --git a/StudioCore/StudioCore.csproj b/StudioCore/StudioCore.csproj index f19e78245..195035c9b 100644 --- a/StudioCore/StudioCore.csproj +++ b/StudioCore/StudioCore.csproj @@ -424,17 +424,17 @@ - + - + - - + + diff --git a/Veldrid.SPIRV.VariantCompiler/Veldrid.SPIRV.VariantCompiler.csproj b/Veldrid.SPIRV.VariantCompiler/Veldrid.SPIRV.VariantCompiler.csproj index c3af8bc27..cd6c2c95a 100644 --- a/Veldrid.SPIRV.VariantCompiler/Veldrid.SPIRV.VariantCompiler.csproj +++ b/Veldrid.SPIRV.VariantCompiler/Veldrid.SPIRV.VariantCompiler.csproj @@ -9,7 +9,7 @@ - + diff --git a/Veldrid/CommandList.cs b/Veldrid/CommandList.cs index 8047a6fb7..9246ae7f6 100644 --- a/Veldrid/CommandList.cs +++ b/Veldrid/CommandList.cs @@ -846,7 +846,7 @@ public void Draw(uint vertexCount, uint instanceCount, uint vertexStart, uint in private void DrawCore(uint vertexCount, uint instanceCount, uint vertexStart, uint instanceStart) { PreDrawCommand(); - vkCmdDraw(_cb, (int)vertexCount, (int)instanceCount, vertexStart, instanceStart); + vkCmdDraw(_cb, vertexCount, instanceCount, vertexStart, instanceStart); } /// @@ -886,7 +886,7 @@ public void DrawIndexed(uint indexCount, uint instanceCount, uint indexStart, in private void DrawIndexedCore(uint indexCount, uint instanceCount, uint indexStart, int vertexOffset, uint instanceStart) { PreDrawCommand(); - vkCmdDrawIndexed(_cb, (int)indexCount, (int)instanceCount, indexStart, vertexOffset, instanceStart); + vkCmdDrawIndexed(_cb, indexCount, instanceCount, indexStart, vertexOffset, instanceStart); } /// @@ -920,7 +920,7 @@ public void DrawIndirect(DeviceBuffer indirectBuffer, uint offset, uint drawCoun private void DrawIndirectCore(DeviceBuffer indirectBuffer, uint offset, uint drawCount, uint stride) { PreDrawCommand(); - vkCmdDrawIndirect(_cb, indirectBuffer.Buffer, offset, (int)drawCount, stride); + vkCmdDrawIndirect(_cb, indirectBuffer.Buffer, offset, drawCount, stride); } /// @@ -955,7 +955,7 @@ public void DrawIndexedIndirect(DeviceBuffer indirectBuffer, uint offset, uint d private void DrawIndexedIndirectCore(DeviceBuffer indirectBuffer, uint offset, uint drawCount, uint stride) { PreDrawCommand(); - vkCmdDrawIndexedIndirect(_cb, indirectBuffer.Buffer, offset, (int)drawCount, stride); + vkCmdDrawIndexedIndirect(_cb, indirectBuffer.Buffer, offset, drawCount, stride); } [Conditional("VALIDATE_USAGE")] @@ -1492,8 +1492,8 @@ private void GenerateMipmapsCore(Texture texture) VkImage deviceImage = texture.OptimalDeviceImage; - int blitCount = (int)texture.MipLevels - 1; - VkImageBlit* regions = stackalloc VkImageBlit[blitCount]; + uint blitCount = texture.MipLevels - 1; + VkImageBlit* regions = stackalloc VkImageBlit[(int)blitCount]; for (uint level = 1; level < texture.MipLevels; level++) { @@ -1776,9 +1776,9 @@ private void FlushNewResourceSets( int setCount = resourceSets.Length; VkDescriptorSet* descriptorSets = stackalloc VkDescriptorSet[setCount]; uint* dynamicOffsets = stackalloc uint[pipeline.DynamicOffsetsCount]; - int currentBatchCount = 0; + uint currentBatchCount = 0; uint currentBatchFirstSet = 0; - int currentBatchDynamicOffsetCount = 0; + uint currentBatchDynamicOffsetCount = 0; for (uint currentSlot = 0; currentSlot < resourceSets.Length; currentSlot++) { diff --git a/Veldrid/GraphicsDevice.cs b/Veldrid/GraphicsDevice.cs index 32d87b9c6..b506293e9 100644 --- a/Veldrid/GraphicsDevice.cs +++ b/Veldrid/GraphicsDevice.cs @@ -138,8 +138,8 @@ public void Reset(GraphicsDevice device) VkFence* fences = stackalloc VkFence[WaitFences.Count]; for (int i = 0; i < WaitFences.Count; i++) fences[i] = WaitFences[i]; - vkWaitForFences(device._device, WaitFences.Count, fences, VkBool32.True, UInt64.MaxValue); - vkResetFences(device._device, WaitFences.Count, fences); + vkWaitForFences(device._device, (uint)WaitFences.Count, fences, VkBool32.True, UInt64.MaxValue); + vkResetFences(device._device, (uint)WaitFences.Count, fences); foreach (var fence in WaitFences) device._availableSubmissionFences.Enqueue(fence); WaitFences.Clear(); @@ -205,10 +205,10 @@ internal GraphicsDevice(GraphicsDeviceOptions options, SwapchainDescription? scD var allocatorInfo = new VmaAllocatorCreateInfo { - PhysicalDevice = _physicalDevice, - Device = _device, - Instance = _instance, - VulkanApiVersion = Vortice.Vulkan.VkVersion.Version_1_3 + physicalDevice = _physicalDevice, + device = _device, + instance = _instance, + vulkanApiVersion = VkVersion.Version_1_3 }; var result = Vma.vmaCreateAllocator(&allocatorInfo, out _vmaAllocator); CheckResult(result); @@ -524,7 +524,7 @@ public bool WaitForFences(Fence[] fences, bool waitAll, ulong nanosecondTimeout) fencesPtr[i] = fences[i].DeviceFence; } - VkResult result = vkWaitForFences(_device, fenceCount, fencesPtr, waitAll, nanosecondTimeout); + VkResult result = vkWaitForFences(_device, (uint)fenceCount, fencesPtr, waitAll, nanosecondTimeout); return result == VkResult.Success; } @@ -1741,7 +1741,7 @@ private static uint DebugCallback(VkDebugUtilsMessageSeverityFlagsEXT severity, private void CreatePhysicalDevice() { - int deviceCount = 0; + uint deviceCount = 0; vkEnumeratePhysicalDevices(_instance, &deviceCount, null); if (deviceCount == 0) { @@ -1830,22 +1830,22 @@ private void CreatePhysicalDevice() private void CreateLogicalDevice(VkSurfaceKHR surface, bool preferStandardClipY, VulkanDeviceOptions options) { // Queue selection logic is largely taken from granite - int count = 0; + uint count = 0; vkGetPhysicalDeviceQueueFamilyProperties2(_physicalDevice, &count, null); - VkQueueFamilyProperties2* props = stackalloc VkQueueFamilyProperties2[count]; + VkQueueFamilyProperties2* props = stackalloc VkQueueFamilyProperties2[(int)count]; for (uint i = 0; i < count; i++) { props[i] = new VkQueueFamilyProperties2(); } vkGetPhysicalDeviceQueueFamilyProperties2(_physicalDevice, &count, props); - int queueFamilyCount = count; + uint queueFamilyCount = count; _queueFamilyIndices = new uint[(int)QueueType.QueueTypeCount]; _queueIndices = new uint[(int)QueueType.QueueTypeCount]; _queues = new VkQueue[(int)QueueType.QueueTypeCount]; - var offsets = stackalloc uint[queueFamilyCount]; - var priorities = stackalloc float[queueFamilyCount * (int)QueueType.QueueTypeCount]; + var offsets = stackalloc uint[(int)queueFamilyCount]; + var priorities = stackalloc float[(int)queueFamilyCount * (int)QueueType.QueueTypeCount]; bool FindQueue(VkQueueFlags required, VkQueueFlags ignored, float priority, ref uint family, ref uint index) { for (uint i = 0; i < queueFamilyCount; i++) @@ -1905,7 +1905,7 @@ ref _queueFamilyIndices[(int)QueueType.Transfer], ref _queueIndices[(int)QueueTy _queueIndices[(int)QueueType.Transfer] = _queueIndices[(int)QueueType.Compute]; } - var queueCreateInfos = stackalloc VkDeviceQueueCreateInfo[queueFamilyCount]; + var queueCreateInfos = stackalloc VkDeviceQueueCreateInfo[(int)queueFamilyCount]; uint queueCreateInfosCount = 0; for (uint i = 0; i < queueFamilyCount; i++) @@ -1964,11 +1964,11 @@ ref _queueFamilyIndices[(int)QueueType.Transfer], ref _queueIndices[(int)QueueTy deviceFeatures11.pNext = &deviceFeatures12; deviceFeatures12.pNext = &deviceFeatures13; - int propertyCount = 0; - VkResult result = vkEnumerateDeviceExtensionProperties(_physicalDevice, (sbyte*)null, &propertyCount, null); + uint propertyCount = 0; + VkResult result = vkEnumerateDeviceExtensionProperties(_physicalDevice, null, &propertyCount, null); CheckResult(result); VkExtensionProperties* properties = stackalloc VkExtensionProperties[(int)propertyCount]; - result = vkEnumerateDeviceExtensionProperties(_physicalDevice, (sbyte*)null, &propertyCount, properties); + result = vkEnumerateDeviceExtensionProperties(_physicalDevice, null, &propertyCount, properties); CheckResult(result); HashSet requiredInstanceExtensions = new HashSet(options.DeviceExtensions ?? Array.Empty()); @@ -2207,7 +2207,7 @@ private static bool CheckIsSupported() } vkLoadInstanceOnly(testInstance); - int physicalDeviceCount = 0; + uint physicalDeviceCount = 0; result = vkEnumeratePhysicalDevices(testInstance, &physicalDeviceCount, null); if (result != VkResult.Success || physicalDeviceCount == 0) { diff --git a/Veldrid/ResourceSet.cs b/Veldrid/ResourceSet.cs index 205551232..1861d8b6b 100644 --- a/Veldrid/ResourceSet.cs +++ b/Veldrid/ResourceSet.cs @@ -37,7 +37,7 @@ internal ResourceSet(GraphicsDevice gd, ref ResourceSetDescription description) var vkLayout = description.Layout; BindableResource[] boundResources = description.BoundResources; - int descriptorWriteCount = vkLayout.Description.Elements.Length; + uint descriptorWriteCount = (uint)vkLayout.Description.Elements.Length; uint desccount = 0; foreach (var e in vkLayout.Description.Elements) diff --git a/Veldrid/Swapchain.cs b/Veldrid/Swapchain.cs index 40e0b2c8b..4e544b0fe 100644 --- a/Veldrid/Swapchain.cs +++ b/Veldrid/Swapchain.cs @@ -172,7 +172,7 @@ private bool CreateSwapchain(uint width, uint height) } _currentImageIndex = 0; - int surfaceFormatCount = 0; + uint surfaceFormatCount = 0; result = vkGetPhysicalDeviceSurfaceFormatsKHR(_gd.PhysicalDevice, _surface, &surfaceFormatCount, null); CheckResult(result); VkSurfaceFormatKHR[] formats = new VkSurfaceFormatKHR[surfaceFormatCount]; @@ -210,7 +210,7 @@ private bool CreateSwapchain(uint width, uint height) } } - int presentModeCount = 0; + uint presentModeCount = 0; result = vkGetPhysicalDeviceSurfacePresentModesKHR(_gd.PhysicalDevice, _surface, &presentModeCount, null); CheckResult(result); VkPresentModeKHR[] presentModes = new VkPresentModeKHR[presentModeCount]; diff --git a/Veldrid/Veldrid.csproj b/Veldrid/Veldrid.csproj index c625c7664..efaa09ad3 100644 --- a/Veldrid/Veldrid.csproj +++ b/Veldrid/Veldrid.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/Veldrid/VkSwapchainFramebuffer.cs b/Veldrid/VkSwapchainFramebuffer.cs index d52dacdc8..30765f3ae 100644 --- a/Veldrid/VkSwapchainFramebuffer.cs +++ b/Veldrid/VkSwapchainFramebuffer.cs @@ -85,7 +85,7 @@ internal void SetNewSwapchain( _desiredHeight = height; // Get the images - int scImageCount = 0; + uint scImageCount = 0; VkResult result = vkGetSwapchainImagesKHR(_gd.Device, deviceSwapchain, &scImageCount, null); CheckResult(result); if (_scImages == null) @@ -93,7 +93,7 @@ internal void SetNewSwapchain( _scImages = new VkImage[(int)scImageCount]; } fixed (VkImage* pscImages = _scImages) - result = vkGetSwapchainImagesKHR(_gd.Device, deviceSwapchain, &scImageCount, pscImages); + result = vkGetSwapchainImagesKHR(_gd.Device, deviceSwapchain, &scImageCount, pscImages); CheckResult(result); _scImageFormat = surfaceFormat.format; diff --git a/Veldrid/VulkanUtil.cs b/Veldrid/VulkanUtil.cs index 5553e0639..15f4ce1ab 100644 --- a/Veldrid/VulkanUtil.cs +++ b/Veldrid/VulkanUtil.cs @@ -35,7 +35,7 @@ public static uint FindMemoryType(VkPhysicalDeviceMemoryProperties memProperties public static string[] EnumerateInstanceLayers() { - int propCount = 0; + uint propCount = 0; VkResult result = vkEnumerateInstanceLayerProperties(&propCount, null); CheckResult(result); if (propCount == 0) @@ -68,7 +68,7 @@ private static string[] EnumerateInstanceExtensions() return Array.Empty(); } - int propCount = 0; + uint propCount = 0; VkResult result = vkEnumerateInstanceExtensionProperties(null, &propCount, null); if (result != VkResult.Success) { @@ -102,7 +102,7 @@ private static bool TryLoadVulkan() { try { - int propCount; + uint propCount; vkEnumerateInstanceExtensionProperties(null, &propCount, null); return true; }