mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-23 06:57:13 +02:00
some optimizations. apply current transform to native window instead of defaulting to Identity
This commit is contained in:
parent
c732a9fbb6
commit
7a2fadb499
12 changed files with 473 additions and 35 deletions
|
@ -72,6 +72,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public IWindow Window => _window;
|
||||
|
||||
public SurfaceTransformFlagsKHR CurrentTransform => _window.CurrentTransform;
|
||||
|
||||
private readonly Func<Instance, Vk, SurfaceKHR> _getSurface;
|
||||
private readonly Func<string[]> _getRequiredExtensions;
|
||||
private readonly string _preferredGpuId;
|
||||
|
|
|
@ -132,6 +132,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
var oldSwapchain = _swapchain;
|
||||
|
||||
CurrentTransform = capabilities.CurrentTransform;
|
||||
|
||||
var swapchainCreateInfo = new SwapchainCreateInfoKHR
|
||||
{
|
||||
SType = StructureType.SwapchainCreateInfoKhr,
|
||||
|
@ -143,7 +145,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
ImageUsage = ImageUsageFlags.ColorAttachmentBit | ImageUsageFlags.TransferDstBit | ImageUsageFlags.StorageBit,
|
||||
ImageSharingMode = SharingMode.Exclusive,
|
||||
ImageArrayLayers = 1,
|
||||
PreTransform = Ryujinx.Common.SystemInfo.SystemInfo.IsAndroid() ? SurfaceTransformFlagsKHR.IdentityBitKhr : capabilities.CurrentTransform,
|
||||
PreTransform = capabilities.CurrentTransform,
|
||||
CompositeAlpha = ChooseCompositeAlpha(capabilities.SupportedCompositeAlpha),
|
||||
PresentMode = ChooseSwapPresentMode(presentModes, _vsyncEnabled),
|
||||
Clipped = true,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Ryujinx.Graphics.GAL;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.Vulkan
|
||||
|
@ -7,6 +8,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
public bool ScreenCaptureRequested { get; set; }
|
||||
|
||||
public SurfaceTransformFlagsKHR CurrentTransform { get; set; }
|
||||
|
||||
public abstract void Dispose();
|
||||
public abstract void Present(ITexture texture, ImageCrop crop, Action swapBuffersCallback);
|
||||
public abstract void SetSize(int width, int height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue