diff options
author | Emmanuel Hansen <emmausssss@gmail.com> | 2022-09-19 18:05:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 15:05:26 -0300 |
commit | 6f0395538b8e8af3bba7536b44780d57e51e8697 (patch) | |
tree | 4d3f4f620dd287fc1ca38ea9ea722b6e022301dd /Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs | |
parent | b9f1ff3c7748c6a2665e76d17e86c3b7228f44fe (diff) |
Avalonia - Use embedded window for avalonia (#3674)1.1.274
* wip
* use embedded window
* fix race condition on opengl Windows
* fix glx issues on prime nvidia
* fix mouse support win32
* clean up
* addressed review
* addressed review
* fix warnings
* fix sotware keyboard dialog
* Update Ryujinx.Ava/Ui/Applet/SwkbdAppletDialog.axaml.cs
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
* remove double semi
Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Diffstat (limited to 'Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs')
-rw-r--r-- | Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs b/Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs deleted file mode 100644 index a7052592..00000000 --- a/Ryujinx.Ava/Ui/Backend/Vulkan/VulkanMemoryHelper.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Silk.NET.Vulkan; - -namespace Ryujinx.Ava.Ui.Vulkan -{ - internal static class VulkanMemoryHelper - { - internal static int FindSuitableMemoryTypeIndex(VulkanPhysicalDevice physicalDevice, uint memoryTypeBits, - MemoryPropertyFlags flags) - { - physicalDevice.Api.GetPhysicalDeviceMemoryProperties(physicalDevice.InternalHandle, out var properties); - - for (var i = 0; i < properties.MemoryTypeCount; i++) - { - var type = properties.MemoryTypes[i]; - - if ((memoryTypeBits & (1 << i)) != 0 && type.PropertyFlags.HasFlag(flags)) return i; - } - - return -1; - } - - internal static unsafe void TransitionLayout(VulkanDevice device, - CommandBuffer commandBuffer, - Image image, - ImageLayout sourceLayout, - AccessFlags sourceAccessMask, - ImageLayout destinationLayout, - AccessFlags destinationAccessMask, - uint mipLevels) - { - var subresourceRange = new ImageSubresourceRange(ImageAspectFlags.ImageAspectColorBit, 0, mipLevels, 0, 1); - - var barrier = new ImageMemoryBarrier - { - SType = StructureType.ImageMemoryBarrier, - SrcAccessMask = sourceAccessMask, - DstAccessMask = destinationAccessMask, - OldLayout = sourceLayout, - NewLayout = destinationLayout, - SrcQueueFamilyIndex = Vk.QueueFamilyIgnored, - DstQueueFamilyIndex = Vk.QueueFamilyIgnored, - Image = image, - SubresourceRange = subresourceRange - }; - - device.Api.CmdPipelineBarrier( - commandBuffer, - PipelineStageFlags.PipelineStageAllCommandsBit, - PipelineStageFlags.PipelineStageAllCommandsBit, - 0, - 0, - null, - 0, - null, - 1, - barrier); - } - } -} |