daily update on 20240209 by nitload youmu

This commit is contained in:
Nitload
2024-02-09 23:31:33 +08:00
parent 6fe6b3b3cf
commit 8391569482
159 changed files with 948 additions and 2431 deletions
+53 -35
View File
@@ -4,7 +4,6 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
@@ -51,6 +50,17 @@ namespace StgSharp.Logic
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(uint u0, uint u1, uint u2)
{
M128 m = default;
m.UInt32[0] = u0;
m.UInt32[1] = u1;
m.UInt32[2] = u2;
paramQueue.Enqueue(m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Enqueue(float f0, float f1, float f2, float f3)
{
@@ -139,28 +149,14 @@ namespace StgSharp.Logic
{
paramQueue.TryDequeue(out m);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out glHandle handle)
public void TryDequeue(out Vec4d v)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
M128 m;
if (paramQueue.TryDequeue(out m))
{
handle.valuePtr = (uint*)ret.IntPtr0;
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out glHandle handle, out glHandle handle1)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
handle.valuePtr = (uint*)ret.IntPtr0;
handle1.valuePtr = (uint*)ret.IntPtr1;
v = *(Vec4d*)&m;
}
else
{
@@ -168,6 +164,7 @@ namespace StgSharp.Logic
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out int i0)
{
@@ -182,6 +179,7 @@ namespace StgSharp.Logic
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out int i0, out int i1)
{
@@ -231,21 +229,6 @@ namespace StgSharp.Logic
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out glHandle handle)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
handle = ret.UInt32[0];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out IntPtr p)
{
@@ -327,6 +310,41 @@ namespace StgSharp.Logic
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out uint u0, out uint u1, out uint u2)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u1 = ret.UInt32[1];
u2 = ret.UInt32[2];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void TryDequeue(out uint u0, out uint u1, out uint u2, out uint u3)
{
M128 ret;
if (paramQueue.TryDequeue(out ret))
{
u0 = ret.UInt32[0];
u1 = ret.UInt32[1];
u2 = ret.UInt32[2];
u3 = ret.UInt32[3];
}
else
{
InternalIO.InternalWriteLog("No param in buffer when calling gl function.", LogType.Error);
throw new Exception();
}
}
internal void SetContext(GLcontext* p)
{
context = p;