Better module loading.

This commit is contained in:
Nitload
2026-03-04 00:51:29 +08:00
parent 7533e15fc7
commit 7e970352ab
21 changed files with 757 additions and 529 deletions
@@ -167,7 +167,7 @@ namespace StgSharp.Mathematics.Graphics
{
const int f32 = 0;
fixed (MatrixKernel<float>* source = &this.kernel, target = &transpose.kernel) {
NativeIntrinsic.Context.mat[f32].buffer_transpose(source, target);
MathematicsModule.GlobalContext.mat[f32].buffer_transpose(source, target);
}
}
@@ -176,7 +176,7 @@ namespace StgSharp.Mathematics.Graphics
{
Matrix44 ret = new();
const int f32 = 0;
NativeIntrinsic.Context.mat[f32].buffer_sub(&left, &right, &ret, 1);
MathematicsModule.GlobalContext.mat[f32].buffer_sub(&left, &right, &ret, 1);
return ret;
}
@@ -197,7 +197,7 @@ namespace StgSharp.Mathematics.Graphics
{
Matrix44 ret = new();
int f32 = (int)MatrixElementType.F32;
NativeIntrinsic.Context.mat[f32].kernel_fma(&left, &right, &ret);
MathematicsModule.GlobalContext.mat[f32].kernel_fma(&left, &right, &ret);
return ret;
}
@@ -206,7 +206,7 @@ namespace StgSharp.Mathematics.Graphics
{
Matrix44 ret = new();
const int f32 = 0;
NativeIntrinsic.Context.mat[f32].buffer_add(&left, &right, &ret, 1);
MathematicsModule.GlobalContext.mat[f32].buffer_add(&left, &right, &ret, 1);
return ret;
}