Change D3D11 device wrappers to new serialisation method

This commit is contained in:
baldurk
2017-09-28 12:16:05 +01:00
parent 9194157eec
commit 0027ff1a10
4 changed files with 630 additions and 584 deletions
+2
View File
@@ -247,6 +247,8 @@ public:
template <typename SerialiserType> \
bool CONCAT(Serialise_, func(SerialiserType &ser, __VA_ARGS__));
#define USE_SCRATCH_SERIALISER() WriteSerialiser &ser = m_ScratchSerialiser;
// A handy macros to say "is the serialiser reading and we're doing replay-mode stuff?"
// The reason we check both is that checking the first allows the compiler to eliminate the other
// path at compile-time, and the second because we might be just struct-serialising in which case we
+9 -9
View File
@@ -520,15 +520,15 @@ public:
// this is defined as a macro so that we can re-use it to explicitly instantiate these functions as
// templates in the wrapper definition file.
#define SERIALISED_ID3D11DEVICE_FAKE_FUNCTIONS() \
IMPLEMENT_FUNCTION_SERIALISED(ID3D11ClassInstance *, CreateClassInstance, LPCSTR pClassTypeName, \
UINT ConstantBufferOffset, UINT ConstantVectorOffset, \
UINT TextureOffset, UINT SamplerOffset, \
WrappedID3D11ClassLinkage *linkage, ID3D11ClassInstance *inst); \
\
IMPLEMENT_FUNCTION_SERIALISED(ID3D11ClassInstance *, GetClassInstance, \
LPCSTR pClassInstanceName, UINT InstanceIndex, \
WrappedID3D11ClassLinkage *linkage, ID3D11ClassInstance *inst);
#define SERIALISED_ID3D11DEVICE_FAKE_FUNCTIONS() \
IMPLEMENT_FUNCTION_SERIALISED( \
ID3D11ClassInstance *, CreateClassInstance, LPCSTR pClassTypeName, \
UINT ConstantBufferOffset, UINT ConstantVectorOffset, UINT TextureOffset, \
UINT SamplerOffset, ID3D11ClassLinkage *pClassLinkage, ID3D11ClassInstance **ppInstance); \
\
IMPLEMENT_FUNCTION_SERIALISED(ID3D11ClassInstance *, GetClassInstance, LPCSTR pClassInstanceName, \
UINT InstanceIndex, ID3D11ClassLinkage *pClassLinkage, \
ID3D11ClassInstance **ppInstance);
SERIALISED_ID3D11DEVICE_FAKE_FUNCTIONS();
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1228,7 +1228,7 @@ public:
if(SUCCEEDED(hr) && real)
{
*ppInstance = m_pDevice->GetClassInstance(pClassInstanceName, InstanceIndex, this, real);
*ppInstance = m_pDevice->GetClassInstance(pClassInstanceName, InstanceIndex, this, &real);
}
else
{
@@ -1264,7 +1264,7 @@ public:
{
*ppInstance =
m_pDevice->CreateClassInstance(pClassTypeName, ConstantBufferOffset, ConstantVectorOffset,
TextureOffset, SamplerOffset, this, real);
TextureOffset, SamplerOffset, this, &real);
}
else
{