mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 00:23:36 +00:00
Use RobustBufferAccess on NVIDIA gpus
Avoids the SMO waterfall triangle on older NVIDIA gpus.
This commit is contained in:
parent
db5a1a6aa6
commit
c98b61ade8
3 changed files with 21 additions and 9 deletions
|
@ -8,4 +8,19 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
Qualcomm,
|
||||
Unknown
|
||||
}
|
||||
|
||||
static class VendorUtils
|
||||
{
|
||||
public static Vendor FromId(uint id)
|
||||
{
|
||||
return id switch
|
||||
{
|
||||
0x1002 => Vendor.Amd,
|
||||
0x10DE => Vendor.Nvidia,
|
||||
0x8086 => Vendor.Intel,
|
||||
0x5143 => Vendor.Qualcomm,
|
||||
_ => Vendor.Unknown
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,14 +477,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
_ => $"0x{properties.VendorID:X}"
|
||||
};
|
||||
|
||||
Vendor = properties.VendorID switch
|
||||
{
|
||||
0x1002 => Vendor.Amd,
|
||||
0x10DE => Vendor.Nvidia,
|
||||
0x8086 => Vendor.Intel,
|
||||
0x5143 => Vendor.Qualcomm,
|
||||
_ => Vendor.Unknown
|
||||
};
|
||||
Vendor = VendorUtils.FromId(properties.VendorID);
|
||||
|
||||
IsAmdWindows = Vendor == Vendor.Amd && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
IsIntelWindows = Vendor == Vendor.Intel && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
|
|
|
@ -300,6 +300,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
PQueuePriorities = queuePriorities
|
||||
};
|
||||
|
||||
api.GetPhysicalDeviceProperties(physicalDevice, out var properties);
|
||||
bool useRobustBufferAccess = VendorUtils.FromId(properties.VendorID) == Vendor.Nvidia;
|
||||
|
||||
var supportedFeatures = api.GetPhysicalDeviceFeature(physicalDevice);
|
||||
|
||||
var features = new PhysicalDeviceFeatures()
|
||||
|
@ -321,7 +324,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
// ShaderStorageImageReadWithoutFormat = true,
|
||||
// ShaderStorageImageWriteWithoutFormat = true,
|
||||
TessellationShader = true,
|
||||
VertexPipelineStoresAndAtomics = true
|
||||
VertexPipelineStoresAndAtomics = true,
|
||||
RobustBufferAccess = useRobustBufferAccess
|
||||
};
|
||||
|
||||
void* pExtendedFeatures = null;
|
||||
|
|
Loading…
Reference in a new issue