* This fixes an issue where applying a ID3DDeviceContextState by copying
the state it has saved would trash these members on the immediate
context's state tracker, and lead to missing refcounting and possibly
a crash if an error was later encountered.
* Since this would be confusing to do in an operator=, we instead remove
the operator and explicitly call a CopyState() function
* We don't create any objects with the ID that the original name was
applied to, we create a buffer for each baked version of that handle.
* So on replay we need to apply the name down from the original object,
and this also means temporarily storing the name in the original ID
instead of as a live ID (since there is no live ID for the original
command buffer object).
In #598 the alias glMapBufferOES and glUnmapBufferOES macros
were added for the gl_hookset_defs.h but the alias
entries in the gl_hookset.h was missed.
Also expose the glGetBufferPointervOES as part of the
GL_OES_mapbuffer extension.
* When creating a program with glCreateShaderProgramv it implicitly acts
as if the shaders are detached and deleted after linking. This means
it cannot be relinked again.
* However the only time we need to relink a program is when we are
copying across fragdata and vertex attrib bindings in case they were
changed from creation - but for the same reason that we can't relink
a program to apply them, the application can't either - which means
the data must be unchanged from creation, and so the copy is not
needed.
* Originally when I added the EXT_dsa emuluation, I targeted it
specifically to only those functions that I call outside of the replay
loop, for internal analysis purposes. For that reason the emulation
was only applied to a separate hookset, and only during replay (not
during capture).
* However this doesn't account for some of the streamlined serialisation
of functions like glBufferStorage, glBufferData, etc. To simplify
code paths, I 'promote' all variants of these types of functions to
the EXT_dsa variant (except ARB_dsa for texture functions which is
actually different by not requiring the texture target parameter).
* Note: most of these functions were emulated already (except three -
glNamedBufferStorageEXT, glTextureBufferEXT and
glTextureBufferRangeEXT) but on replay we didn't use the internal
hookset, just the normal one, which was not emulated.
* Rather than try to decide when these should use the internal hookset
and when the regular one, or switch them all over to the internal
hookset, instead re-evaluate the reason for a separate hookset in the
first place: Emulating functions separately means the original func
pointers are returned during capture time, for unsupported extensions.
* However mesa has proven that unsupported extensions don't have to
return NULL, as it's undefined what they return - they should not be
called if the extension isn't available. So in actual fact there's
little harm to be done by emulating in-place and returning some
different pointers to the application. In the worst case, they get a
bit of EXT_dsa emulation themselves.