mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 17:10:19 +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
|
class TextureStorage : IDisposable
|
||||||
{
|
{
|
||||||
|
private const MemoryPropertyFlags DefaultImageMemoryFlags =
|
||||||
|
MemoryPropertyFlags.MemoryPropertyDeviceLocalBit;
|
||||||
|
|
||||||
private const ImageUsageFlags DefaultUsageFlags =
|
private const ImageUsageFlags DefaultUsageFlags =
|
||||||
ImageUsageFlags.ImageUsageSampledBit |
|
ImageUsageFlags.ImageUsageSampledBit |
|
||||||
ImageUsageFlags.ImageUsageTransferSrcBit |
|
ImageUsageFlags.ImageUsageTransferSrcBit |
|
||||||
|
@ -127,7 +130,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
if (foreignAllocation == null)
|
if (foreignAllocation == null)
|
||||||
{
|
{
|
||||||
gd.Api.GetImageMemoryRequirements(device, _image, out var requirements);
|
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)
|
if (allocation.Memory.Handle == 0UL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue