mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2025-09-01 02:36:26 -05:00
vulkan: Pass Vk instance to VulkanRenderer (#4859)
This will allow possible multiple driver selection without any need of LD preload. (useful when testing custom version of mesa for example)
This commit is contained in:
@@ -426,7 +426,7 @@ namespace Ryujinx.Ui
|
||||
if (ConfigurationState.Instance.Graphics.GraphicsBackend == GraphicsBackend.Vulkan)
|
||||
{
|
||||
string preferredGpu = ConfigurationState.Instance.Graphics.PreferredGpu.Value;
|
||||
renderer = new VulkanRenderer(CreateVulkanSurface, VulkanHelper.GetRequiredInstanceExtensions, preferredGpu);
|
||||
renderer = new VulkanRenderer(Vk.GetApi(), CreateVulkanSurface, VulkanHelper.GetRequiredInstanceExtensions, preferredGpu);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -13,6 +13,7 @@ using Ryujinx.Ui.Common.Configuration;
|
||||
using Ryujinx.Ui.Common.Configuration.System;
|
||||
using Ryujinx.Ui.Helper;
|
||||
using Ryujinx.Ui.Widgets;
|
||||
using Silk.NET.Vulkan;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -477,7 +478,7 @@ namespace Ryujinx.Ui.Windows
|
||||
|
||||
if (Enum.Parse<GraphicsBackend>(_graphicsBackend.ActiveId) == GraphicsBackend.Vulkan)
|
||||
{
|
||||
var devices = VulkanRenderer.GetPhysicalDevices();
|
||||
var devices = VulkanRenderer.GetPhysicalDevices(Vk.GetApi());
|
||||
string preferredGpuIdFromConfig = ConfigurationState.Instance.Graphics.PreferredGpu.Value;
|
||||
string preferredGpuId = preferredGpuIdFromConfig;
|
||||
bool noGpuId = string.IsNullOrEmpty(preferredGpuIdFromConfig);
|
||||
|
Reference in New Issue
Block a user