mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-03 10:47:09 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
32
src/Ryujinx.Graphics.Gpu/Shader/ShaderCodeAccessor.cs
Normal file
32
src/Ryujinx.Graphics.Gpu/Shader/ShaderCodeAccessor.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using Ryujinx.Graphics.Gpu.Memory;
|
||||
using Ryujinx.Graphics.Gpu.Shader.HashTable;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Graphics.Gpu.Shader
|
||||
{
|
||||
/// <summary>
|
||||
/// Shader code accessor.
|
||||
/// </summary>
|
||||
readonly struct ShaderCodeAccessor : IDataAccessor
|
||||
{
|
||||
private readonly MemoryManager _memoryManager;
|
||||
private readonly ulong _baseAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new shader code accessor.
|
||||
/// </summary>
|
||||
/// <param name="memoryManager">Memory manager used to access the shader code</param>
|
||||
/// <param name="baseAddress">Base address of the shader in memory</param>
|
||||
public ShaderCodeAccessor(MemoryManager memoryManager, ulong baseAddress)
|
||||
{
|
||||
_memoryManager = memoryManager;
|
||||
_baseAddress = baseAddress;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ReadOnlySpan<byte> GetSpan(int offset, int length)
|
||||
{
|
||||
return _memoryManager.GetSpanMapped(_baseAddress + (ulong)offset, length);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue