mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-29 19:36:25 +02:00
misc: Code cleanups.
This commit is contained in:
parent
67ab54e2bb
commit
6911e288bc
9 changed files with 69 additions and 68 deletions
|
@ -104,25 +104,27 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
|
||||
|
||||
public VulkanRenderer(Vk api, Func<Instance, Vk, SurfaceKHR> surfaceFunc, Func<string[]> requiredExtensionsFunc, string preferredGpuId)
|
||||
public VulkanRenderer(Vk api, Func<Instance, Vk, SurfaceKHR> getSurface, Func<string[]> requiredExtensionsFunc, string preferredGpuId)
|
||||
{
|
||||
_getSurface = surfaceFunc;
|
||||
_getSurface = getSurface;
|
||||
_getRequiredExtensions = requiredExtensionsFunc;
|
||||
_preferredGpuId = preferredGpuId;
|
||||
Api = api;
|
||||
Shaders = new HashSet<ShaderCollection>();
|
||||
Textures = new HashSet<ITexture>();
|
||||
Samplers = new HashSet<SamplerHolder>();
|
||||
Shaders = [];
|
||||
Textures = [];
|
||||
Samplers = [];
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
// Any device running on MacOS is using MoltenVK, even Intel and AMD vendors.
|
||||
if (IsMoltenVk = OperatingSystem.IsMacOS())
|
||||
MVKInitialization.Initialize();
|
||||
|
||||
// Any device running on MacOS is using MoltenVK, even Intel and AMD vendors.
|
||||
IsMoltenVk = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static VulkanRenderer Create(
|
||||
string preferredGpuId,
|
||||
Func<Instance, Vk, SurfaceKHR> getSurface,
|
||||
Func<string[]> getRequiredExtensions
|
||||
) => new(Vk.GetApi(), getSurface, getRequiredExtensions, preferredGpuId);
|
||||
|
||||
private unsafe void LoadFeatures(uint maxQueueCount, uint queueFamilyIndex)
|
||||
{
|
||||
FormatCapabilities = new FormatCapabilities(Api, _physicalDevice.PhysicalDevice);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue