Add support for BC1/2/3 decompression (for 3D textures) (#2987)
* Add support for BC1/2/3 decompression (for 3D textures) * Optimize and clean up * Unsafe not needed here * Fix alpha value interpolation when a0 <= a1
This commit is contained in:
@ -78,14 +78,27 @@ namespace Ryujinx.Graphics.Gpu
|
||||
/// <summary>
|
||||
/// Host hardware capabilities.
|
||||
/// </summary>
|
||||
internal Capabilities Capabilities => _caps.Value;
|
||||
internal ref Capabilities Capabilities
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_capsLoaded)
|
||||
{
|
||||
_caps = Renderer.GetCapabilities();
|
||||
_capsLoaded = true;
|
||||
}
|
||||
|
||||
return ref _caps;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event for signalling shader cache loading progress.
|
||||
/// </summary>
|
||||
public event Action<ShaderCacheState, int, int> ShaderCacheStateChanged;
|
||||
|
||||
private readonly Lazy<Capabilities> _caps;
|
||||
private bool _capsLoaded;
|
||||
private Capabilities _caps;
|
||||
private Thread _gpuThread;
|
||||
|
||||
/// <summary>
|
||||
@ -110,8 +123,6 @@ namespace Ryujinx.Graphics.Gpu
|
||||
DeferredActions = new Queue<Action>();
|
||||
|
||||
PhysicalMemoryRegistry = new ConcurrentDictionary<long, PhysicalMemory>();
|
||||
|
||||
_caps = new Lazy<Capabilities>(Renderer.GetCapabilities);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user