mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 09:03:36 +00:00
Force device local storage for textures (fixes linux performance)
This commit is contained in:
parent
1e167788d4
commit
2f066d1d6d
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,9 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
class TextureStorage : IDisposable
|
||||
{
|
||||
private const MemoryPropertyFlags DefaultImageMemoryFlags =
|
||||
MemoryPropertyFlags.MemoryPropertyDeviceLocalBit;
|
||||
|
||||
private const ImageUsageFlags DefaultUsageFlags =
|
||||
ImageUsageFlags.ImageUsageSampledBit |
|
||||
ImageUsageFlags.ImageUsageTransferSrcBit |
|
||||
|
@ -127,7 +130,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
if (foreignAllocation == null)
|
||||
{
|
||||
gd.Api.GetImageMemoryRequirements(device, _image, out var requirements);
|
||||
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(physicalDevice, requirements);
|
||||
var allocation = gd.MemoryAllocator.AllocateDeviceMemory(physicalDevice, requirements, DefaultImageMemoryFlags);
|
||||
|
||||
if (allocation.Memory.Handle == 0UL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue