Update non-wrapping D3D11 device code

This commit is contained in:
baldurk
2017-09-27 18:43:28 +01:00
parent da441b675c
commit 81a4e718cb
3 changed files with 536 additions and 524 deletions
+4 -3
View File
@@ -242,9 +242,10 @@ public:
#define IMPLEMENT_IUNKNOWN_WITH_REFCOUNTER_CUSTOMQUERY \
ULONG STDMETHODCALLTYPE AddRef() { return RefCounter::AddRef(); } \
ULONG STDMETHODCALLTYPE Release() { return RefCounter::Release(); }
#define IMPLEMENT_FUNCTION_SERIALISED(ret, func) \
ret func; \
bool CONCAT(Serialise_, func);
#define IMPLEMENT_FUNCTION_SERIALISED(ret, func, ...) \
ret func(__VA_ARGS__); \
template <typename SerialiserType> \
bool CONCAT(Serialise_, func(SerialiserType &ser, __VA_ARGS__));
// 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
File diff suppressed because it is too large Load Diff
+194 -216
View File
@@ -354,11 +354,13 @@ private:
// protects wrapped resource creation and serialiser access
Threading::CriticalSection m_D3DLock;
WriteSerialiser m_ScratchSerialiser;
std::set<std::string> m_StringDB;
ResourceId m_ResourceID;
D3D11ResourceRecord *m_DeviceRecord;
Serialiser *m_pSerialiser;
LogState m_State;
CaptureState m_State;
bool m_AppControlledCapture;
set<ID3D11DeviceChild *> m_CachedStateObjects;
@@ -426,7 +428,6 @@ public:
void RemoveDeferredContext(WrappedID3D11DeviceContext *defctx);
WrappedID3D11DeviceContext *GetDeferredContext(size_t idx);
Serialiser *GetSerialiser() { return m_pSerialiser; }
ResourceId GetResourceID() { return m_ResourceID; }
FrameRecord &GetFrameRecord() { return m_FrameRecord; }
FrameStatistics &GetFrameStats() { return m_FrameRecord.frameInfo.stats; }
@@ -441,7 +442,7 @@ public:
void FirstFrame(WrappedIDXGISwapChain4 *swapChain);
vector<DebugMessage> GetDebugMessages();
std::vector<DebugMessage> GetDebugMessages();
void AddDebugMessage(DebugMessage msg);
void AddDebugMessage(MessageCategory c, MessageSeverity sv, MessageSource src, std::string d);
const vector<D3D11_INPUT_ELEMENT_DESC> &GetLayoutDesc(ID3D11InputLayout *layout)
@@ -450,7 +451,8 @@ public:
}
vector<string> *GetShaderDebugInfoSearchPaths() { return &m_ShaderSearchPaths; }
void Serialise_CaptureScope(uint64_t offset);
template <typename SerialiserType>
void Serialise_CaptureScope(SerialiserType &ser);
void StartFrameCapture(void *dev, void *wnd);
bool EndFrameCapture(void *dev, void *wnd);
@@ -499,35 +501,32 @@ public:
void Apply_InitialState(ID3D11DeviceChild *live, D3D11ResourceManager::InitialContentData initial);
void ReadLogInitialisation(RDCFile *rdc);
void ProcessChunk(uint64_t offset, D3D11Chunk context);
void ProcessChunk(ReadSerialiser &ser, D3D11Chunk context);
void ReplayLog(uint32_t startEventID, uint32_t endEventID, ReplayLogType replayType);
////////////////////////////////////////////////////////////////
// 'fake' interfaces
// Resource
IMPLEMENT_FUNCTION_SERIALISED(void, SetResourceName(ID3D11DeviceChild *res, const char *name));
IMPLEMENT_FUNCTION_SERIALISED(HRESULT,
SetShaderDebugPath(ID3D11DeviceChild *res, const char *name));
IMPLEMENT_FUNCTION_SERIALISED(void, ReleaseResource(ID3D11DeviceChild *res));
IMPLEMENT_FUNCTION_SERIALISED(void, SetResourceName, ID3D11DeviceChild *pResource,
const char *Name);
IMPLEMENT_FUNCTION_SERIALISED(HRESULT, SetShaderDebugPath, ID3D11DeviceChild *pResource,
const char *Path);
IMPLEMENT_FUNCTION_SERIALISED(void, ReleaseResource, ID3D11DeviceChild *pResource);
// Class Linkage
IMPLEMENT_FUNCTION_SERIALISED(ID3D11ClassInstance *,
CreateClassInstance(LPCSTR pClassTypeName, UINT ConstantBufferOffset,
UINT ConstantVectorOffset, UINT TextureOffset,
UINT SamplerOffset,
WrappedID3D11ClassLinkage *linkage,
ID3D11ClassInstance *inst));
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));
IMPLEMENT_FUNCTION_SERIALISED(ID3D11ClassInstance *, GetClassInstance, LPCSTR pClassInstanceName,
UINT InstanceIndex, WrappedID3D11ClassLinkage *linkage,
ID3D11ClassInstance *inst);
// Swap Chain
IMPLEMENT_FUNCTION_SERIALISED(IUnknown *, WrapSwapchainBuffer(WrappedIDXGISwapChain4 *swap,
DXGI_SWAP_CHAIN_DESC *desc,
UINT buffer, IUnknown *realSurface));
IMPLEMENT_FUNCTION_SERIALISED(IUnknown *, WrapSwapchainBuffer, WrappedIDXGISwapChain4 *swap,
DXGI_SWAP_CHAIN_DESC *desc, UINT buffer, IUnknown *realSurface);
HRESULT Present(WrappedIDXGISwapChain4 *swap, UINT SyncInterval, UINT Flags);
void NewSwapchainBuffer(IUnknown *backbuffer);
@@ -566,10 +565,9 @@ public:
//////////////////////////////
// implement ID3D11Device
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateBuffer(const D3D11_BUFFER_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Buffer **ppBuffer));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateBuffer,
const D3D11_BUFFER_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData, ID3D11Buffer **ppBuffer);
template <typename TexDesc>
TextureDisplayType DispTypeForTexture(TexDesc &Descriptor)
@@ -593,208 +591,189 @@ public:
return dispType;
}
vector<D3D11_SUBRESOURCE_DATA> Serialise_CreateTextureData(ID3D11Resource *tex, ResourceId id,
const D3D11_SUBRESOURCE_DATA *data,
UINT w, UINT h, UINT d, DXGI_FORMAT fmt,
UINT mips, UINT arr, bool HasData);
template <typename SerialiserType>
std::vector<D3D11_SUBRESOURCE_DATA> Serialise_CreateTextureData(
SerialiserType &ser, ID3D11Resource *tex, ResourceId id, const D3D11_SUBRESOURCE_DATA *data,
UINT w, UINT h, UINT d, DXGI_FORMAT fmt, UINT mips, UINT arr, bool HasData);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateTexture1D,
const D3D11_TEXTURE1D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture1D **ppTexture1D);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateTexture2D,
const D3D11_TEXTURE2D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture2D **ppTexture2D);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateTexture3D,
const D3D11_TEXTURE3D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture3D **ppTexture3D);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateShaderResourceView,
ID3D11Resource *pResource,
const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
ID3D11ShaderResourceView **ppSRView);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateUnorderedAccessView,
ID3D11Resource *pResource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
ID3D11UnorderedAccessView **ppUAView);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateRenderTargetView,
ID3D11Resource *pResource, const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
ID3D11RenderTargetView **ppRTView);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDepthStencilView,
ID3D11Resource *pResource, const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
ID3D11DepthStencilView **ppDepthStencilView);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateInputLayout,
const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
UINT NumElements, const void *pShaderBytecodeWithInputSignature,
SIZE_T BytecodeLength, ID3D11InputLayout **ppInputLayout);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateVertexShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11VertexShader **ppVertexShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateGeometryShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11GeometryShader **ppGeometryShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateTexture1D(const D3D11_TEXTURE1D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture1D **ppTexture1D));
CreateGeometryShaderWithStreamOutput, const void *pShaderBytecode,
SIZE_T BytecodeLength,
const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, UINT NumEntries,
const UINT *pBufferStrides, UINT NumStrides, UINT RasterizedStream,
ID3D11ClassLinkage *pClassLinkage,
ID3D11GeometryShader **ppGeometryShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateTexture2D(const D3D11_TEXTURE2D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture2D **ppTexture2D));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreatePixelShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage, ID3D11PixelShader **ppPixelShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateTexture3D(const D3D11_TEXTURE3D_DESC *pDesc,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture3D **ppTexture3D));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateHullShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage, ID3D11HullShader **ppHullShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateShaderResourceView(ID3D11Resource *pResource,
const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc,
ID3D11ShaderResourceView **ppSRView));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDomainShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11DomainShader **ppDomainShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateUnorderedAccessView(ID3D11Resource *pResource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc,
ID3D11UnorderedAccessView **ppUAView));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateComputeShader,
const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11ComputeShader **ppComputeShader);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateRenderTargetView(ID3D11Resource *pResource,
const D3D11_RENDER_TARGET_VIEW_DESC *pDesc,
ID3D11RenderTargetView **ppRTView));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateClassLinkage,
ID3D11ClassLinkage **ppLinkage);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateDepthStencilView(ID3D11Resource *pResource,
const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc,
ID3D11DepthStencilView **ppDepthStencilView));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateBlendState,
const D3D11_BLEND_DESC *pBlendStateDesc,
ID3D11BlendState **ppBlendState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateInputLayout(const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs,
UINT NumElements,
const void *pShaderBytecodeWithInputSignature,
SIZE_T BytecodeLength,
ID3D11InputLayout **ppInputLayout));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDepthStencilState,
const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
ID3D11DepthStencilState **ppDepthStencilState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateVertexShader(const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11VertexShader **ppVertexShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateRasterizerState,
const D3D11_RASTERIZER_DESC *pRasterizerDesc,
ID3D11RasterizerState **ppRasterizerState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateGeometryShader(const void *pShaderBytecode,
SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11GeometryShader **ppGeometryShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateSamplerState,
const D3D11_SAMPLER_DESC *pSamplerDesc,
ID3D11SamplerState **ppSamplerState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateGeometryShaderWithStreamOutput(
const void *pShaderBytecode, SIZE_T BytecodeLength,
const D3D11_SO_DECLARATION_ENTRY *pSODeclaration,
UINT NumEntries, const UINT *pBufferStrides, UINT NumStrides,
UINT RasterizedStream, ID3D11ClassLinkage *pClassLinkage,
ID3D11GeometryShader **ppGeometryShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateQuery,
const D3D11_QUERY_DESC *pQueryDesc, ID3D11Query **ppQuery);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreatePixelShader(const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11PixelShader **ppPixelShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreatePredicate,
const D3D11_QUERY_DESC *pPredicateDesc,
ID3D11Predicate **ppPredicate);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateHullShader(const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11HullShader **ppHullShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateCounter,
const D3D11_COUNTER_DESC *pCounterDesc, ID3D11Counter **ppCounter);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateDomainShader(const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11DomainShader **ppDomainShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDeferredContext,
UINT ContextFlags, ID3D11DeviceContext **ppDeferredContext);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateComputeShader(const void *pShaderBytecode, SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11ComputeShader **ppComputeShader));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, OpenSharedResource,
HANDLE hResource, REFIID ReturnedInterface, void **ppResource);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateClassLinkage(ID3D11ClassLinkage **ppLinkage));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CheckFormatSupport,
DXGI_FORMAT Format, UINT *pFormatSupport);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateBlendState(const D3D11_BLEND_DESC *pBlendStateDesc,
ID3D11BlendState **ppBlendState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CheckMultisampleQualityLevels,
DXGI_FORMAT Format, UINT SampleCount, UINT *pNumQualityLevels);
IMPLEMENT_FUNCTION_SERIALISED(
virtual HRESULT STDMETHODCALLTYPE,
CreateDepthStencilState(const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
ID3D11DepthStencilState **ppDepthStencilState));
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, CheckCounterInfo,
D3D11_COUNTER_INFO *pCounterInfo);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateRasterizerState(const D3D11_RASTERIZER_DESC *pRasterizerDesc,
ID3D11RasterizerState **ppRasterizerState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CheckCounter,
const D3D11_COUNTER_DESC *pDesc, D3D11_COUNTER_TYPE *pType,
UINT *pActiveCounters, LPSTR szName, UINT *pNameLength, LPSTR szUnits,
UINT *pUnitsLength, LPSTR szDescription, UINT *pDescriptionLength);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateSamplerState(const D3D11_SAMPLER_DESC *pSamplerDesc,
ID3D11SamplerState **ppSamplerState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CheckFeatureSupport,
D3D11_FEATURE Feature, void *pFeatureSupportData,
UINT FeatureSupportDataSize);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateQuery(const D3D11_QUERY_DESC *pQueryDesc,
ID3D11Query **ppQuery));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, GetPrivateData, REFGUID guid,
UINT *pDataSize, void *pData);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreatePredicate(const D3D11_QUERY_DESC *pPredicateDesc,
ID3D11Predicate **ppPredicate));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, SetPrivateData, REFGUID guid,
UINT DataSize, const void *pData);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateCounter(const D3D11_COUNTER_DESC *pCounterDesc,
ID3D11Counter **ppCounter));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, SetPrivateDataInterface,
REFGUID guid, const IUnknown *pData);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateDeferredContext(UINT ContextFlags,
ID3D11DeviceContext **ppDeferredContext));
IMPLEMENT_FUNCTION_SERIALISED(virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE, GetFeatureLevel);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
OpenSharedResource(HANDLE hResource, REFIID ReturnedInterface,
void **ppResource));
IMPLEMENT_FUNCTION_SERIALISED(virtual UINT STDMETHODCALLTYPE, GetCreationFlags);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CheckFormatSupport(DXGI_FORMAT Format, UINT *pFormatSupport));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, GetDeviceRemovedReason);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CheckMultisampleQualityLevels(DXGI_FORMAT Format, UINT SampleCount,
UINT *pNumQualityLevels));
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, GetImmediateContext,
ID3D11DeviceContext **ppImmediateContext);
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE,
CheckCounterInfo(D3D11_COUNTER_INFO *pCounterInfo));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, SetExceptionMode, UINT RaiseFlags);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CheckCounter(const D3D11_COUNTER_DESC *pDesc,
D3D11_COUNTER_TYPE *pType, UINT *pActiveCounters,
LPSTR szName, UINT *pNameLength, LPSTR szUnits,
UINT *pUnitsLength, LPSTR szDescription,
UINT *pDescriptionLength));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CheckFeatureSupport(D3D11_FEATURE Feature, void *pFeatureSupportData,
UINT FeatureSupportDataSize));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
GetPrivateData(REFGUID guid, UINT *pDataSize, void *pData));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
SetPrivateData(REFGUID guid, UINT DataSize, const void *pData));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
SetPrivateDataInterface(REFGUID guid, const IUnknown *pData));
IMPLEMENT_FUNCTION_SERIALISED(virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE, GetFeatureLevel(void));
IMPLEMENT_FUNCTION_SERIALISED(virtual UINT STDMETHODCALLTYPE, GetCreationFlags(void));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, GetDeviceRemovedReason(void));
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE,
GetImmediateContext(ID3D11DeviceContext **ppImmediateContext));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, SetExceptionMode(UINT RaiseFlags));
IMPLEMENT_FUNCTION_SERIALISED(virtual UINT STDMETHODCALLTYPE, GetExceptionMode(void));
IMPLEMENT_FUNCTION_SERIALISED(virtual UINT STDMETHODCALLTYPE, GetExceptionMode);
//////////////////////////////
// implement ID3D11Device1
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE,
GetImmediateContext1(ID3D11DeviceContext1 **ppImmediateContext));
IMPLEMENT_FUNCTION_SERIALISED(virtual void STDMETHODCALLTYPE, GetImmediateContext1,
ID3D11DeviceContext1 **ppImmediateContext);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateDeferredContext1(UINT ContextFlags,
ID3D11DeviceContext1 **ppDeferredContext));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDeferredContext1,
UINT ContextFlags, ID3D11DeviceContext1 **ppDeferredContext);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateBlendState1(const D3D11_BLEND_DESC1 *pBlendStateDesc,
ID3D11BlendState1 **ppBlendState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateBlendState1,
const D3D11_BLEND_DESC1 *pBlendStateDesc,
ID3D11BlendState1 **ppBlendState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateRasterizerState1(const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
ID3D11RasterizerState1 **ppRasterizerState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateRasterizerState1,
const D3D11_RASTERIZER_DESC1 *pRasterizerDesc,
ID3D11RasterizerState1 **ppRasterizerState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateDeviceContextState(UINT Flags,
const D3D_FEATURE_LEVEL *pFeatureLevels,
UINT FeatureLevels, UINT SDKVersion,
REFIID EmulatedInterface,
D3D_FEATURE_LEVEL *pChosenFeatureLevel,
ID3DDeviceContextState **ppContextState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateDeviceContextState,
UINT Flags, const D3D_FEATURE_LEVEL *pFeatureLevels,
UINT FeatureLevels, UINT SDKVersion, REFIID EmulatedInterface,
D3D_FEATURE_LEVEL *pChosenFeatureLevel,
ID3DDeviceContextState **ppContextState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
OpenSharedResource1(HANDLE hResource, REFIID returnedInterface,
void **ppResource));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, OpenSharedResource1,
HANDLE hResource, REFIID returnedInterface, void **ppResource);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
OpenSharedResourceByName(LPCWSTR lpName, DWORD dwDesiredAccess,
REFIID returnedInterface, void **ppResource));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, OpenSharedResourceByName,
LPCWSTR lpName, DWORD dwDesiredAccess, REFIID returnedInterface,
void **ppResource);
//////////////////////////////
// implement ID3D11Device2
@@ -817,38 +796,37 @@ public:
//////////////////////////////
// implement ID3D11Device3
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateTexture2D1(const D3D11_TEXTURE2D_DESC1 *pDesc1,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture2D1 **ppTexture2D));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateTexture2D1,
const D3D11_TEXTURE2D_DESC1 *pDesc1,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture2D1 **ppTexture2D);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateTexture3D1(const D3D11_TEXTURE3D_DESC1 *pDesc1,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture3D1 **ppTexture3D));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateTexture3D1,
const D3D11_TEXTURE3D_DESC1 *pDesc1,
const D3D11_SUBRESOURCE_DATA *pInitialData,
ID3D11Texture3D1 **ppTexture3D);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateRasterizerState2(const D3D11_RASTERIZER_DESC2 *pRasterizerDesc,
ID3D11RasterizerState2 **ppRasterizerState));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateRasterizerState2,
const D3D11_RASTERIZER_DESC2 *pRasterizerDesc,
ID3D11RasterizerState2 **ppRasterizerState);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateShaderResourceView1(ID3D11Resource *pResource,
const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1,
ID3D11ShaderResourceView1 **ppSRView1));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateShaderResourceView1,
ID3D11Resource *pResource,
const D3D11_SHADER_RESOURCE_VIEW_DESC1 *pDesc1,
ID3D11ShaderResourceView1 **ppSRView1);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateUnorderedAccessView1(ID3D11Resource *pResource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1,
ID3D11UnorderedAccessView1 **ppUAView1));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateUnorderedAccessView1,
ID3D11Resource *pResource,
const D3D11_UNORDERED_ACCESS_VIEW_DESC1 *pDesc1,
ID3D11UnorderedAccessView1 **ppUAView1);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateRenderTargetView1(ID3D11Resource *pResource,
const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1,
ID3D11RenderTargetView1 **ppRTView1));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateRenderTargetView1,
ID3D11Resource *pResource,
const D3D11_RENDER_TARGET_VIEW_DESC1 *pDesc1,
ID3D11RenderTargetView1 **ppRTView1);
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE,
CreateQuery1(const D3D11_QUERY_DESC1 *pQueryDesc1,
ID3D11Query1 **ppQuery1));
IMPLEMENT_FUNCTION_SERIALISED(virtual HRESULT STDMETHODCALLTYPE, CreateQuery1,
const D3D11_QUERY_DESC1 *pQueryDesc1, ID3D11Query1 **ppQuery1);
virtual void STDMETHODCALLTYPE GetImmediateContext3(ID3D11DeviceContext3 **ppImmediateContext);
@@ -869,4 +847,4 @@ public:
virtual HRESULT STDMETHODCALLTYPE RegisterDeviceRemovedEvent(HANDLE hEvent, DWORD *pdwCookie);
virtual void STDMETHODCALLTYPE UnregisterDeviceRemoved(DWORD dwCookie);
};
};