Format
This commit is contained in:
parent
2f5be2c6ee
commit
3db4cbb9a9
3 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
using Ryujinx.Graphics.GAL;
|
using Ryujinx.Graphics.GAL;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Ryujinx.Common.Logging;
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Gpu.Image
|
namespace Ryujinx.Graphics.Gpu.Image
|
||||||
{
|
{
|
||||||
|
@ -56,19 +55,20 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
private HashSet<ShortTextureCacheEntry> _shortCache;
|
private HashSet<ShortTextureCacheEntry> _shortCache;
|
||||||
|
|
||||||
private readonly Dictionary<TextureDescriptor, ShortTextureCacheEntry> _shortCacheLookup;
|
private readonly Dictionary<TextureDescriptor, ShortTextureCacheEntry> _shortCacheLookup;
|
||||||
|
|
||||||
private readonly GpuContext _context;
|
private readonly GpuContext _context;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets MaxTextureCapacity Dynamically
|
/// Gets MaxTextureCapacity Dynamically
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private ulong GetMaxTextureCapacity() {
|
private ulong GetMaxTextureCapacity()
|
||||||
|
{
|
||||||
Capabilities capabilities = _context.Capabilities;
|
Capabilities capabilities = _context.Capabilities;
|
||||||
|
|
||||||
if (capabilities.MaximumGpuMemory <= 0)
|
if (capabilities.MaximumGpuMemory <= 0)
|
||||||
{
|
{
|
||||||
return 1024L * 1024 * 1024;
|
return 1024L * 1024 * 1024;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return (ulong)(capabilities.MaximumGpuMemory * 0.50);
|
return (ulong)(capabilities.MaximumGpuMemory * 0.50);
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
storageBufferOffsetAlignment: HwCapabilities.StorageBufferOffsetAlignment,
|
storageBufferOffsetAlignment: HwCapabilities.StorageBufferOffsetAlignment,
|
||||||
textureBufferOffsetAlignment: HwCapabilities.TextureBufferOffsetAlignment,
|
textureBufferOffsetAlignment: HwCapabilities.TextureBufferOffsetAlignment,
|
||||||
gatherBiasPrecision: intelWindows || amdWindows ? 8 : 0, // Precision is 8 for these vendors on Vulkan.
|
gatherBiasPrecision: intelWindows || amdWindows ? 8 : 0, // Precision is 8 for these vendors on Vulkan.
|
||||||
maximumGpuMemory : 0);
|
maximumGpuMemory: 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data)
|
public void SetBufferData(BufferHandle buffer, int offset, ReadOnlySpan<byte> data)
|
||||||
|
|
|
@ -785,7 +785,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
maximumGpuMemory: GetTotalGPUMemory());
|
maximumGpuMemory: GetTotalGPUMemory());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ulong GetTotalGPUMemory(){
|
public ulong GetTotalGPUMemory()
|
||||||
|
{
|
||||||
|
|
||||||
ulong totalMemory = 0;
|
ulong totalMemory = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue