mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 23:29:51 -06:00
misc: Code cleanups.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user