mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 00:53:35 +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,
|
Qualcomm,
|
||||||
Unknown
|
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}"
|
_ => $"0x{properties.VendorID:X}"
|
||||||
};
|
};
|
||||||
|
|
||||||
Vendor = properties.VendorID switch
|
Vendor = VendorUtils.FromId(properties.VendorID);
|
||||||
{
|
|
||||||
0x1002 => Vendor.Amd,
|
|
||||||
0x10DE => Vendor.Nvidia,
|
|
||||||
0x8086 => Vendor.Intel,
|
|
||||||
0x5143 => Vendor.Qualcomm,
|
|
||||||
_ => Vendor.Unknown
|
|
||||||
};
|
|
||||||
|
|
||||||
IsAmdWindows = Vendor == Vendor.Amd && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
IsAmdWindows = Vendor == Vendor.Amd && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||||
IsIntelWindows = Vendor == Vendor.Intel && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
IsIntelWindows = Vendor == Vendor.Intel && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||||
|
|
|
@ -300,6 +300,9 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
PQueuePriorities = queuePriorities
|
PQueuePriorities = queuePriorities
|
||||||
};
|
};
|
||||||
|
|
||||||
|
api.GetPhysicalDeviceProperties(physicalDevice, out var properties);
|
||||||
|
bool useRobustBufferAccess = VendorUtils.FromId(properties.VendorID) == Vendor.Nvidia;
|
||||||
|
|
||||||
var supportedFeatures = api.GetPhysicalDeviceFeature(physicalDevice);
|
var supportedFeatures = api.GetPhysicalDeviceFeature(physicalDevice);
|
||||||
|
|
||||||
var features = new PhysicalDeviceFeatures()
|
var features = new PhysicalDeviceFeatures()
|
||||||
|
@ -321,7 +324,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
// ShaderStorageImageReadWithoutFormat = true,
|
// ShaderStorageImageReadWithoutFormat = true,
|
||||||
// ShaderStorageImageWriteWithoutFormat = true,
|
// ShaderStorageImageWriteWithoutFormat = true,
|
||||||
TessellationShader = true,
|
TessellationShader = true,
|
||||||
VertexPipelineStoresAndAtomics = true
|
VertexPipelineStoresAndAtomics = true,
|
||||||
|
RobustBufferAccess = useRobustBufferAccess
|
||||||
};
|
};
|
||||||
|
|
||||||
void* pExtendedFeatures = null;
|
void* pExtendedFeatures = null;
|
||||||
|
|
Loading…
Reference in a new issue