Specify the maximum count of parameters instead of number of bytes
i.e.
GLint iscol;
GL.glGetInternalformativ(target, fmt, eGL_DEPTH_COMPONENTS, sizeof(GLint), &isdepth);
becomes
GL.glGetInternalformativ(target, fmt, eGL_DEPTH_COMPONENTS, 1, &isdepth);
From GL references pages: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetInternalformat.xhtml
bufSize
Specifies the maximum number of integers of the specified width that may be written to params by the function.
* In a couple of places we need to store information that's redundant/pointless
to try and stay bitwise identical to DXBC (so we can parse a file, then write
it out and get the exact same result).
* This also means staying bug-compatible with fxc:
- it sometimes outputs an extra 0x00000000 DWORD after an operation.
- it outputs interpolation modifiers which the spec says should be 0, and are ignored.
- it also sometimes outputs extended operands with no actual use of the extended bits.
- there's ambiguity between swizzle mode and mask mode for .xyzw swizzles, and fxc uses both so we need to ensure we match.
* This can happen because the addresses map is shared among all devices so some
other devices might have added resources which we don't recognise the IDs for
- though this could break in other ways (same address range for different
resources on different devices) so it's generally not supported.
* This is a deliberate break of compatibility since the field is now often
empty, for non-markers. This means code will get a more explicit error when
the name is being referenced, so it can be updated to fetch the name it needs
as needed.
* There's not a good accepted terminology for this kind of event, and for
historical reasons 'drawcall' has been the accepted term, even though
that can be quite confusing when a dispatch or a copy is a 'drawcall'.
* This is particularly highlighted by the event browser filters where
$draw() includes draws and dispatches, but $dispatch() only includes
dispatches, it's hard to intuitively understand why $draw() matches all
of these calls.
* As a result we've defined the term 'action' to cover these types of
events in the same way that we defined 'event' in the first place to
mean a single atomic API call.