mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-31 18:19:57 -06:00
Some small sync primitive fixes, logging fixes, started to implement the 2D engine on the GPU, fixed DrawArrays, implemented a few more shader instructions, made a start on nvdrv refactor, etc...
This commit is contained in:
31
Ryujinx.Core/OsHle/Services/Nv/NvChNvMap.cs
Normal file
31
Ryujinx.Core/OsHle/Services/Nv/NvChNvMap.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.Services.Nv
|
||||
{
|
||||
class NvChNvMap
|
||||
{
|
||||
private static ConcurrentDictionary<Process, IdDictionary> NvMaps;
|
||||
|
||||
public void Create(ServiceCtx Context)
|
||||
{
|
||||
long InputPosition = Context.Request.GetBufferType0x21Position();
|
||||
long OutputPosition = Context.Request.GetBufferType0x22Position();
|
||||
|
||||
int Size = Context.Memory.ReadInt32(InputPosition);
|
||||
|
||||
int Handle = AddNvMap(Context, new NvMap(Size));
|
||||
|
||||
Context.Memory.WriteInt32(OutputPosition, Handle);
|
||||
}
|
||||
|
||||
private int AddNvMap(ServiceCtx Context, NvMap Map)
|
||||
{
|
||||
return NvMaps[Context.Process].Add(Map);
|
||||
}
|
||||
|
||||
public NvMap GetNvMap(ServiceCtx Context, int Handle)
|
||||
{
|
||||
return NvMaps[Context.Process].GetData<NvMap>(Handle);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user