Double add sub mul sc-mul ok

This commit is contained in:
Youmu Liu
2025-12-31 18:15:43 +08:00
parent 6484307b8a
commit 0e93787fa2
18 changed files with 1210 additions and 944 deletions
@@ -25,10 +25,6 @@
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
// <auto-generated>
// Generated by StgSharp.GenerateGL on 2025-12-30 02:54:41Z
// Version: 4.3
// </auto-generated>
using StgSharp.Graphics.OpenGL;
using System;
using System.Runtime.CompilerServices;
@@ -47,7 +43,7 @@ namespace StgSharp.Graphics.OpenGL
int stride
)
{
Context.glBindVertexBuffer(bindingindex, buffer.Value, offset, stride);
_context->glBindVertexBuffer(bindingindex, buffer.Value, offset, stride);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -60,7 +56,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* dataPtr = data) {
Context.glClearBufferData(target, internalformat, format, (uint)type, dataPtr);
_context->glClearBufferData(target, internalformat, format, (uint)type, dataPtr);
}
}
@@ -76,8 +72,8 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* dataPtr = data) {
Context.glClearBufferSubData(target, internalformat, offset, size, format,
(uint)type, dataPtr);
_context->glClearBufferSubData(target, internalformat, offset, size, format,
(uint)type, dataPtr);
}
}
@@ -100,9 +96,9 @@ namespace StgSharp.Graphics.OpenGL
int srcDepth
)
{
Context.glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName,
dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight,
srcDepth);
_context->glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName,
dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight,
srcDepth);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -112,7 +108,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* userParamPtr = userParam) {
Context.glDebugMessageCallback(callback, userParamPtr);
_context->glDebugMessageCallback(callback, userParamPtr);
}
}
@@ -127,7 +123,8 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (uint* idsPtr = ids) {
Context.glDebugMessageControl(source, (uint)type, severity, count, idsPtr, enabled);
_context->glDebugMessageControl(source, (uint)type, severity, count, idsPtr,
enabled);
}
}
@@ -142,7 +139,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* bufPtr = buf) {
Context.glDebugMessageInsert(source, (uint)type, id, severity, length, bufPtr);
_context->glDebugMessageInsert(source, (uint)type, id, severity, length, bufPtr);
}
}
@@ -153,7 +150,7 @@ namespace StgSharp.Graphics.OpenGL
uint num_groups_z
)
{
Context.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z);
_context->glDispatchCompute(num_groups_x, num_groups_y, num_groups_z);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -161,7 +158,7 @@ namespace StgSharp.Graphics.OpenGL
nint indirect
)
{
Context.glDispatchComputeIndirect(indirect);
_context->glDispatchComputeIndirect(indirect);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -171,7 +168,7 @@ namespace StgSharp.Graphics.OpenGL
int param
)
{
Context.glFramebufferParameteri(target, pname, param);
_context->glFramebufferParameteri(target, pname, param);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -186,8 +183,8 @@ namespace StgSharp.Graphics.OpenGL
byte* messageLog
)
{
return Context.glGetDebugMessageLog(count, bufSize, sources, types, ids, severities,
lengths, messageLog);
return _context->glGetDebugMessageLog(count, bufSize, sources, types, ids, severities,
lengths, messageLog);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -197,7 +194,7 @@ namespace StgSharp.Graphics.OpenGL
int* @params
)
{
Context.glGetFramebufferParameteriv(target, pname, @params);
_context->glGetFramebufferParameteriv(target, pname, @params);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -209,7 +206,7 @@ namespace StgSharp.Graphics.OpenGL
IntPtr* @params
)
{
Context.glGetInternalformati64v(target, internalformat, pname, count, @params);
_context->glGetInternalformati64v(target, internalformat, pname, count, @params);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -221,7 +218,7 @@ namespace StgSharp.Graphics.OpenGL
byte* label
)
{
Context.glGetObjectLabel(identifier, name, bufSize, length, label);
_context->glGetObjectLabel(identifier, name, bufSize, length, label);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -233,7 +230,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* ptrPtr = ptr) {
Context.glGetObjectPtrLabel(ptrPtr, bufSize, length, label);
_context->glGetObjectPtrLabel(ptrPtr, bufSize, length, label);
}
}
@@ -245,7 +242,7 @@ namespace StgSharp.Graphics.OpenGL
int* @params
)
{
Context.glGetProgramInterfaceiv(program.Value, programInterface, pname, @params);
_context->glGetProgramInterfaceiv(program.Value, programInterface, pname, @params);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -256,7 +253,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* namePtr = name) {
return Context.glGetProgramResourceIndex(program.Value, programInterface, namePtr);
return _context->glGetProgramResourceIndex(program.Value, programInterface, namePtr);
}
}
@@ -273,8 +270,8 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (uint* propsPtr = props) {
Context.glGetProgramResourceiv(program.Value, programInterface, index, propCount,
propsPtr, count, length, @params);
_context->glGetProgramResourceiv(program.Value, programInterface, index, propCount,
propsPtr, count, length, @params);
}
}
@@ -286,7 +283,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* namePtr = name) {
return Context.glGetProgramResourceLocation(program.Value, programInterface, namePtr);
return _context->glGetProgramResourceLocation(program.Value, programInterface, namePtr);
}
}
@@ -298,7 +295,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* namePtr = name) {
return Context.glGetProgramResourceLocationIndex(program.Value, programInterface, namePtr);
return _context->glGetProgramResourceLocationIndex(program.Value, programInterface, namePtr);
}
}
@@ -312,8 +309,8 @@ namespace StgSharp.Graphics.OpenGL
byte* name
)
{
Context.glGetProgramResourceName(program.Value, programInterface, index, bufSize,
length, name);
_context->glGetProgramResourceName(program.Value, programInterface, index, bufSize,
length, name);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -321,7 +318,7 @@ namespace StgSharp.Graphics.OpenGL
GlHandle buffer
)
{
Context.glInvalidateBufferData(buffer.Value);
_context->glInvalidateBufferData(buffer.Value);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -331,7 +328,7 @@ namespace StgSharp.Graphics.OpenGL
nuint length
)
{
Context.glInvalidateBufferSubData(buffer.Value, offset, length);
_context->glInvalidateBufferSubData(buffer.Value, offset, length);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -342,7 +339,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (uint* attachmentsPtr = attachments) {
Context.glInvalidateFramebuffer(target, numAttachments, attachmentsPtr);
_context->glInvalidateFramebuffer(target, numAttachments, attachmentsPtr);
}
}
@@ -358,8 +355,8 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (uint* attachmentsPtr = attachments) {
Context.glInvalidateSubFramebuffer(target, numAttachments, attachmentsPtr, x, y,
width, height);
_context->glInvalidateSubFramebuffer(target, numAttachments, attachmentsPtr, x, y,
width, height);
}
}
@@ -369,7 +366,7 @@ namespace StgSharp.Graphics.OpenGL
int level
)
{
Context.glInvalidateTexImage(texture.Value, level);
_context->glInvalidateTexImage(texture.Value, level);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -384,8 +381,8 @@ namespace StgSharp.Graphics.OpenGL
int depth
)
{
Context.glInvalidateTexSubImage(texture.Value, level, xoffset, yoffset, zoffset, width,
height, depth);
_context->glInvalidateTexSubImage(texture.Value, level, xoffset, yoffset, zoffset,
width, height, depth);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -397,7 +394,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* indirectPtr = indirect) {
Context.glMultiDrawArraysIndirect(mode, indirectPtr, drawcount, stride);
_context->glMultiDrawArraysIndirect(mode, indirectPtr, drawcount, stride);
}
}
@@ -411,8 +408,8 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (IntPtr* indirectPtr = indirect) {
Context.glMultiDrawElementsIndirect(mode, (uint)type, indirectPtr, drawcount,
stride);
_context->glMultiDrawElementsIndirect(mode, (uint)type, indirectPtr, drawcount,
stride);
}
}
@@ -425,7 +422,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* labelPtr = label) {
Context.glObjectLabel(identifier, name, length, labelPtr);
_context->glObjectLabel(identifier, name, length, labelPtr);
}
}
@@ -439,7 +436,7 @@ namespace StgSharp.Graphics.OpenGL
fixed (IntPtr* ptrPtr = ptr)
{
fixed (byte* labelPtr = label) {
Context.glObjectPtrLabel(ptrPtr, length, labelPtr);
_context->glObjectPtrLabel(ptrPtr, length, labelPtr);
}
}
}
@@ -447,7 +444,7 @@ namespace StgSharp.Graphics.OpenGL
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void PopDebugGroup()
{
Context.glPopDebugGroup();
_context->glPopDebugGroup();
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -459,7 +456,7 @@ namespace StgSharp.Graphics.OpenGL
)
{
fixed (byte* messagePtr = message) {
Context.glPushDebugGroup(source, id, length, messagePtr);
_context->glPushDebugGroup(source, id, length, messagePtr);
}
}
@@ -470,7 +467,7 @@ namespace StgSharp.Graphics.OpenGL
uint storageBlockBinding
)
{
Context.glShaderStorageBlockBinding(program.Value, storageBlockIndex, storageBlockBinding);
_context->glShaderStorageBlockBinding(program.Value, storageBlockIndex, storageBlockBinding);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -482,7 +479,7 @@ namespace StgSharp.Graphics.OpenGL
nuint size
)
{
Context.glTexBufferRange(target, internalformat, buffer.Value, offset, size);
_context->glTexBufferRange(target, internalformat, buffer.Value, offset, size);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -495,8 +492,8 @@ namespace StgSharp.Graphics.OpenGL
byte fixedsamplelocations
)
{
Context.glTexStorage2DMultisample(target, samples, internalformat, width, height,
fixedsamplelocations);
_context->glTexStorage2DMultisample(target, samples, internalformat, width, height,
fixedsamplelocations);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -510,8 +507,8 @@ namespace StgSharp.Graphics.OpenGL
byte fixedsamplelocations
)
{
Context.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth,
fixedsamplelocations);
_context->glTexStorage3DMultisample(target, samples, internalformat, width, height,
depth, fixedsamplelocations);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -526,8 +523,8 @@ namespace StgSharp.Graphics.OpenGL
uint numlayers
)
{
Context.glTextureView(texture.Value, target, origtexture.Value, internalformat,
minlevel, numlevels, minlayer, numlayers);
_context->glTextureView(texture.Value, target, origtexture.Value, internalformat,
minlevel, numlevels, minlayer, numlayers);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -536,7 +533,7 @@ namespace StgSharp.Graphics.OpenGL
uint bindingindex
)
{
Context.glVertexAttribBinding(attribindex, bindingindex);
_context->glVertexAttribBinding(attribindex, bindingindex);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -548,7 +545,8 @@ namespace StgSharp.Graphics.OpenGL
uint relativeoffset
)
{
Context.glVertexAttribFormat(attribindex, size, (uint)type, normalized, relativeoffset);
_context->glVertexAttribFormat(attribindex, size, (uint)type, normalized,
relativeoffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -559,7 +557,7 @@ namespace StgSharp.Graphics.OpenGL
uint relativeoffset
)
{
Context.glVertexAttribIFormat(attribindex, size, (uint)type, relativeoffset);
_context->glVertexAttribIFormat(attribindex, size, (uint)type, relativeoffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -570,7 +568,7 @@ namespace StgSharp.Graphics.OpenGL
uint relativeoffset
)
{
Context.glVertexAttribLFormat(attribindex, size, (uint)type, relativeoffset);
_context->glVertexAttribLFormat(attribindex, size, (uint)type, relativeoffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -579,7 +577,7 @@ namespace StgSharp.Graphics.OpenGL
uint divisor
)
{
Context.glVertexBindingDivisor(bindingindex, divisor);
_context->glVertexBindingDivisor(bindingindex, divisor);
}
}