diff --git a/build-win32.txt b/build-win32.txt new file mode 100644 index 00000000..57cfbe1c --- /dev/null +++ b/build-win32.txt @@ -0,0 +1,19 @@ +[binaries] +c = '/usr/bin/i686-w64-mingw32-gcc' +cpp = '/usr/bin/i686-w64-mingw32-g++' +ar = '/usr/bin/i686-w64-mingw32-ar' +strip = '/usr/bin/i686-w64-mingw32-strip' +exe_wrapper = 'wine' + +[properties] +c_args = ['-Og', '-ggdb'] +c_link_args = ['-static', '-static-libgcc'] + +cpp_args = ['-std=c++17', '-Og', '-gstabs'] +cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++', '-Wl,--add-stdcall-alias'] + +[host_machine] +system = 'windows' +cpu_family = 'x86' +cpu = 'x86' +endian = 'little' diff --git a/lib32/SDL2.lib b/lib32/SDL2.lib new file mode 100755 index 00000000..533337bf Binary files /dev/null and b/lib32/SDL2.lib differ diff --git a/lib32/vulkan-1.lib b/lib32/vulkan-1.lib new file mode 100755 index 00000000..0a08a519 Binary files /dev/null and b/lib32/vulkan-1.lib differ diff --git a/meson.build b/meson.build index 8b76ef6e..b3d32cdb 100644 --- a/meson.build +++ b/meson.build @@ -1,11 +1,22 @@ project('dxvk', ['c', 'cpp']) +cpu_family = target_machine.cpu_family() + dxvk_compiler = meson.get_compiler('cpp') -dxvk_library_path = meson.source_root() + '/lib' dxvk_include_path = include_directories('./include') +if (cpu_family == 'x86_64') + dxvk_library_path = meson.source_root() + '/lib' +else + dxvk_library_path = meson.source_root() + '/lib32' +endif + lib_vulkan = dxvk_compiler.find_library('vulkan-1', dirs : dxvk_library_path) lib_sdl2 = dxvk_compiler.find_library('SDL2', dirs : dxvk_library_path) +lib_d3d11 = dxvk_compiler.find_library('d3d11') +lib_dxgi = dxvk_compiler.find_library('dxgi') +lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47') + subdir('src') subdir('tests') \ No newline at end of file diff --git a/src/d3d11/d3d11_blend.cpp b/src/d3d11/d3d11_blend.cpp index 22ca2a3b..c3deb82c 100644 --- a/src/d3d11/d3d11_blend.cpp +++ b/src/d3d11/d3d11_blend.cpp @@ -36,7 +36,7 @@ namespace dxvk { } - HRESULT D3D11BlendState::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11BlendState::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11BlendState); @@ -46,12 +46,12 @@ namespace dxvk { } - void D3D11BlendState::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11BlendState::GetDevice(ID3D11Device** ppDevice) { *ppDevice = ref(m_device); } - void D3D11BlendState::GetDesc(D3D11_BLEND_DESC* pDesc) { + void STDMETHODCALLTYPE D3D11BlendState::GetDesc(D3D11_BLEND_DESC* pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_blend.h b/src/d3d11/d3d11_blend.h index d476001a..33cbbbce 100644 --- a/src/d3d11/d3d11_blend.h +++ b/src/d3d11/d3d11_blend.h @@ -20,14 +20,14 @@ namespace dxvk { const D3D11_BLEND_DESC& desc); ~D3D11BlendState(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_BLEND_DESC* pDesc) final; void BindToContext( diff --git a/src/d3d11/d3d11_buffer.cpp b/src/d3d11/d3d11_buffer.cpp index 40517ad9..4cefa1ea 100644 --- a/src/d3d11/d3d11_buffer.cpp +++ b/src/d3d11/d3d11_buffer.cpp @@ -19,7 +19,7 @@ namespace dxvk { } - HRESULT D3D11Buffer::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11Buffer::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11Resource); @@ -34,29 +34,29 @@ namespace dxvk { } - void D3D11Buffer::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11Buffer::GetDevice(ID3D11Device** ppDevice) { *ppDevice = m_device.ref(); } - UINT D3D11Buffer::GetEvictionPriority() { + UINT STDMETHODCALLTYPE D3D11Buffer::GetEvictionPriority() { UINT EvictionPriority = DXGI_RESOURCE_PRIORITY_NORMAL; m_resource->GetEvictionPriority(&EvictionPriority); return EvictionPriority; } - void D3D11Buffer::SetEvictionPriority(UINT EvictionPriority) { + void STDMETHODCALLTYPE D3D11Buffer::SetEvictionPriority(UINT EvictionPriority) { m_resource->SetEvictionPriority(EvictionPriority); } - void D3D11Buffer::GetType(D3D11_RESOURCE_DIMENSION* pResourceDimension) { + void STDMETHODCALLTYPE D3D11Buffer::GetType(D3D11_RESOURCE_DIMENSION* pResourceDimension) { *pResourceDimension = D3D11_RESOURCE_DIMENSION_BUFFER; } - void D3D11Buffer::GetDesc(D3D11_BUFFER_DESC* pDesc) { + void STDMETHODCALLTYPE D3D11Buffer::GetDesc(D3D11_BUFFER_DESC* pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_buffer.h b/src/d3d11/d3d11_buffer.h index f3db42c5..36d9e6fe 100644 --- a/src/d3d11/d3d11_buffer.h +++ b/src/d3d11/d3d11_buffer.h @@ -20,21 +20,21 @@ namespace dxvk { const D3D11_BUFFER_DESC& desc); ~D3D11Buffer(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetType( + void STDMETHODCALLTYPE GetType( D3D11_RESOURCE_DIMENSION *pResourceDimension) final; - UINT GetEvictionPriority() final; + UINT STDMETHODCALLTYPE GetEvictionPriority() final; - void SetEvictionPriority(UINT EvictionPriority) final; + void STDMETHODCALLTYPE SetEvictionPriority(UINT EvictionPriority) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_BUFFER_DESC *pDesc) final; Rc GetDXVKBuffer(); diff --git a/src/d3d11/d3d11_class_linkage.cpp b/src/d3d11/d3d11_class_linkage.cpp index ceffe7c0..456acb97 100644 --- a/src/d3d11/d3d11_class_linkage.cpp +++ b/src/d3d11/d3d11_class_linkage.cpp @@ -15,7 +15,7 @@ namespace dxvk { } - HRESULT D3D11ClassLinkage::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11ClassLinkage); @@ -25,12 +25,12 @@ namespace dxvk { } - void D3D11ClassLinkage::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11ClassLinkage::GetDevice(ID3D11Device** ppDevice) { *ppDevice = m_device.ref(); } - HRESULT D3D11ClassLinkage::CreateClassInstance( + HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::CreateClassInstance( LPCSTR pClassTypeName, UINT ConstantBufferOffset, UINT ConstantVectorOffset, @@ -42,7 +42,7 @@ namespace dxvk { } - HRESULT D3D11ClassLinkage::GetClassInstance( + HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::GetClassInstance( LPCSTR pClassInstanceName, UINT InstanceIndex, ID3D11ClassInstance **ppInstance) { diff --git a/src/d3d11/d3d11_class_linkage.h b/src/d3d11/d3d11_class_linkage.h index 511e4d96..e50cb718 100644 --- a/src/d3d11/d3d11_class_linkage.h +++ b/src/d3d11/d3d11_class_linkage.h @@ -16,14 +16,14 @@ namespace dxvk { ~D3D11ClassLinkage(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - HRESULT CreateClassInstance( + HRESULT STDMETHODCALLTYPE CreateClassInstance( LPCSTR pClassTypeName, UINT ConstantBufferOffset, UINT ConstantVectorOffset, @@ -31,7 +31,7 @@ namespace dxvk { UINT SamplerOffset, ID3D11ClassInstance **ppInstance); - HRESULT GetClassInstance( + HRESULT STDMETHODCALLTYPE GetClassInstance( LPCSTR pClassInstanceName, UINT InstanceIndex, ID3D11ClassInstance **ppInstance); diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index b4d37174..4c1a02e9 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -47,17 +47,17 @@ namespace dxvk { } - ULONG D3D11DeviceContext::AddRef() { + ULONG STDMETHODCALLTYPE D3D11DeviceContext::AddRef() { return m_parent->AddRef(); } - ULONG D3D11DeviceContext::Release() { + ULONG STDMETHODCALLTYPE D3D11DeviceContext::Release() { return m_parent->Release(); } - HRESULT D3D11DeviceContext::QueryInterface( + HRESULT STDMETHODCALLTYPE D3D11DeviceContext::QueryInterface( REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); @@ -69,22 +69,22 @@ namespace dxvk { } - void D3D11DeviceContext::GetDevice(ID3D11Device **ppDevice) { + void STDMETHODCALLTYPE D3D11DeviceContext::GetDevice(ID3D11Device **ppDevice) { *ppDevice = ref(m_parent); } - D3D11_DEVICE_CONTEXT_TYPE D3D11DeviceContext::GetType() { + D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE D3D11DeviceContext::GetType() { return m_type; } - UINT D3D11DeviceContext::GetContextFlags() { + UINT STDMETHODCALLTYPE D3D11DeviceContext::GetContextFlags() { return m_flags; } - void D3D11DeviceContext::ClearState() { + void STDMETHODCALLTYPE D3D11DeviceContext::ClearState() { this->IASetInputLayout(nullptr); this->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED); this->IASetVertexBuffers(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT, nullptr, nullptr, nullptr); @@ -134,7 +134,7 @@ namespace dxvk { } - void D3D11DeviceContext::Flush() { + void STDMETHODCALLTYPE D3D11DeviceContext::Flush() { if (m_type == D3D11_DEVICE_CONTEXT_IMMEDIATE) { m_device->submitCommandList( m_context->endRecording(), @@ -148,14 +148,14 @@ namespace dxvk { } - void D3D11DeviceContext::ExecuteCommandList( + void STDMETHODCALLTYPE D3D11DeviceContext::ExecuteCommandList( ID3D11CommandList* pCommandList, WINBOOL RestoreContextState) { Logger::err("D3D11DeviceContext::ExecuteCommandList: Not implemented"); } - HRESULT D3D11DeviceContext::FinishCommandList( + HRESULT STDMETHODCALLTYPE D3D11DeviceContext::FinishCommandList( WINBOOL RestoreDeferredContextState, ID3D11CommandList **ppCommandList) { if (m_type == D3D11_DEVICE_CONTEXT_DEFERRED) { @@ -168,7 +168,7 @@ namespace dxvk { } - HRESULT D3D11DeviceContext::Map( + HRESULT STDMETHODCALLTYPE D3D11DeviceContext::Map( ID3D11Resource* pResource, UINT Subresource, D3D11_MAP MapType, @@ -210,7 +210,7 @@ namespace dxvk { } - void D3D11DeviceContext::Unmap( + void STDMETHODCALLTYPE D3D11DeviceContext::Unmap( ID3D11Resource* pResource, UINT Subresource) { // There's literally nothing we have to do here at the moment @@ -219,17 +219,17 @@ namespace dxvk { } - void D3D11DeviceContext::Begin(ID3D11Asynchronous *pAsync) { + void STDMETHODCALLTYPE D3D11DeviceContext::Begin(ID3D11Asynchronous *pAsync) { Logger::err("D3D11DeviceContext::Begin: Not implemented"); } - void D3D11DeviceContext::End(ID3D11Asynchronous *pAsync) { + void STDMETHODCALLTYPE D3D11DeviceContext::End(ID3D11Asynchronous *pAsync) { Logger::err("D3D11DeviceContext::End: Not implemented"); } - HRESULT D3D11DeviceContext::GetData( + HRESULT STDMETHODCALLTYPE D3D11DeviceContext::GetData( ID3D11Asynchronous* pAsync, void* pData, UINT DataSize, @@ -239,21 +239,21 @@ namespace dxvk { } - void D3D11DeviceContext::SetPredication( + void STDMETHODCALLTYPE D3D11DeviceContext::SetPredication( ID3D11Predicate* pPredicate, WINBOOL PredicateValue) { Logger::err("D3D11DeviceContext::SetPredication: Not implemented"); } - void D3D11DeviceContext::GetPredication( + void STDMETHODCALLTYPE D3D11DeviceContext::GetPredication( ID3D11Predicate** ppPredicate, WINBOOL* pPredicateValue) { Logger::err("D3D11DeviceContext::GetPredication: Not implemented"); } - void D3D11DeviceContext::CopySubresourceRegion( + void STDMETHODCALLTYPE D3D11DeviceContext::CopySubresourceRegion( ID3D11Resource* pDstResource, UINT DstSubresource, UINT DstX, @@ -266,14 +266,14 @@ namespace dxvk { } - void D3D11DeviceContext::CopyResource( + void STDMETHODCALLTYPE D3D11DeviceContext::CopyResource( ID3D11Resource* pDstResource, ID3D11Resource* pSrcResource) { Logger::err("D3D11DeviceContext::CopyResource: Not implemented"); } - void D3D11DeviceContext::CopyStructureCount( + void STDMETHODCALLTYPE D3D11DeviceContext::CopyStructureCount( ID3D11Buffer* pDstBuffer, UINT DstAlignedByteOffset, ID3D11UnorderedAccessView* pSrcView) { @@ -281,7 +281,7 @@ namespace dxvk { } - void D3D11DeviceContext::ClearRenderTargetView( + void STDMETHODCALLTYPE D3D11DeviceContext::ClearRenderTargetView( ID3D11RenderTargetView* pRenderTargetView, const FLOAT ColorRGBA[4]) { auto rtv = static_cast(pRenderTargetView); @@ -334,21 +334,21 @@ namespace dxvk { } - void D3D11DeviceContext::ClearUnorderedAccessViewUint( + void STDMETHODCALLTYPE D3D11DeviceContext::ClearUnorderedAccessViewUint( ID3D11UnorderedAccessView* pUnorderedAccessView, const UINT Values[4]) { Logger::err("D3D11DeviceContext::ClearUnorderedAccessViewUint: Not implemented"); } - void D3D11DeviceContext::ClearUnorderedAccessViewFloat( + void STDMETHODCALLTYPE D3D11DeviceContext::ClearUnorderedAccessViewFloat( ID3D11UnorderedAccessView* pUnorderedAccessView, const FLOAT Values[4]) { Logger::err("D3D11DeviceContext::ClearUnorderedAccessViewFloat: Not implemented"); } - void D3D11DeviceContext::ClearDepthStencilView( + void STDMETHODCALLTYPE D3D11DeviceContext::ClearDepthStencilView( ID3D11DepthStencilView* pDepthStencilView, UINT ClearFlags, FLOAT Depth, @@ -395,12 +395,12 @@ namespace dxvk { } - void D3D11DeviceContext::GenerateMips(ID3D11ShaderResourceView* pShaderResourceView) { + void STDMETHODCALLTYPE D3D11DeviceContext::GenerateMips(ID3D11ShaderResourceView* pShaderResourceView) { Logger::err("D3D11DeviceContext::GenerateMips: Not implemented"); } - void D3D11DeviceContext::UpdateSubresource( + void STDMETHODCALLTYPE D3D11DeviceContext::UpdateSubresource( ID3D11Resource* pDstResource, UINT DstSubresource, const D3D11_BOX* pDstBox, @@ -436,20 +436,20 @@ namespace dxvk { } - void D3D11DeviceContext::SetResourceMinLOD( + void STDMETHODCALLTYPE D3D11DeviceContext::SetResourceMinLOD( ID3D11Resource* pResource, FLOAT MinLOD) { Logger::err("D3D11DeviceContext::SetResourceMinLOD: Not implemented"); } - FLOAT D3D11DeviceContext::GetResourceMinLOD(ID3D11Resource* pResource) { + FLOAT STDMETHODCALLTYPE D3D11DeviceContext::GetResourceMinLOD(ID3D11Resource* pResource) { Logger::err("D3D11DeviceContext::GetResourceMinLOD: Not implemented"); return 0.0f; } - void D3D11DeviceContext::ResolveSubresource( + void STDMETHODCALLTYPE D3D11DeviceContext::ResolveSubresource( ID3D11Resource* pDstResource, UINT DstSubresource, ID3D11Resource* pSrcResource, @@ -459,12 +459,12 @@ namespace dxvk { } - void D3D11DeviceContext::DrawAuto() { + void STDMETHODCALLTYPE D3D11DeviceContext::DrawAuto() { Logger::err("D3D11DeviceContext::DrawAuto: Not implemented"); } - void D3D11DeviceContext::Draw( + void STDMETHODCALLTYPE D3D11DeviceContext::Draw( UINT VertexCount, UINT StartVertexLocation) { m_context->draw( @@ -473,7 +473,7 @@ namespace dxvk { } - void D3D11DeviceContext::DrawIndexed( + void STDMETHODCALLTYPE D3D11DeviceContext::DrawIndexed( UINT IndexCount, UINT StartIndexLocation, INT BaseVertexLocation) { @@ -484,7 +484,7 @@ namespace dxvk { } - void D3D11DeviceContext::DrawInstanced( + void STDMETHODCALLTYPE D3D11DeviceContext::DrawInstanced( UINT VertexCountPerInstance, UINT InstanceCount, UINT StartVertexLocation, @@ -497,7 +497,7 @@ namespace dxvk { } - void D3D11DeviceContext::DrawIndexedInstanced( + void STDMETHODCALLTYPE D3D11DeviceContext::DrawIndexedInstanced( UINT IndexCountPerInstance, UINT InstanceCount, UINT StartIndexLocation, @@ -512,21 +512,21 @@ namespace dxvk { } - void D3D11DeviceContext::DrawIndexedInstancedIndirect( + void STDMETHODCALLTYPE D3D11DeviceContext::DrawIndexedInstancedIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) { Logger::err("D3D11DeviceContext::DrawIndexedInstancedIndirect: Not implemented"); } - void D3D11DeviceContext::DrawInstancedIndirect( + void STDMETHODCALLTYPE D3D11DeviceContext::DrawInstancedIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) { Logger::err("D3D11DeviceContext::DrawInstancedIndirect: Not implemented"); } - void D3D11DeviceContext::Dispatch( + void STDMETHODCALLTYPE D3D11DeviceContext::Dispatch( UINT ThreadGroupCountX, UINT ThreadGroupCountY, UINT ThreadGroupCountZ) { @@ -537,14 +537,14 @@ namespace dxvk { } - void D3D11DeviceContext::DispatchIndirect( + void STDMETHODCALLTYPE D3D11DeviceContext::DispatchIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) { Logger::err("D3D11DeviceContext::DispatchIndirect: Not implemented"); } - void D3D11DeviceContext::IASetInputLayout(ID3D11InputLayout* pInputLayout) { + void STDMETHODCALLTYPE D3D11DeviceContext::IASetInputLayout(ID3D11InputLayout* pInputLayout) { auto inputLayout = static_cast(pInputLayout); if (m_state.ia.inputLayout != inputLayout) { @@ -558,7 +558,7 @@ namespace dxvk { } - void D3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY Topology) { + void STDMETHODCALLTYPE D3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY Topology) { if (m_state.ia.primitiveTopology != Topology) { m_state.ia.primitiveTopology = Topology; @@ -624,7 +624,7 @@ namespace dxvk { } - void D3D11DeviceContext::IASetVertexBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::IASetVertexBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppVertexBuffers, @@ -662,7 +662,7 @@ namespace dxvk { } - void D3D11DeviceContext::IASetIndexBuffer( + void STDMETHODCALLTYPE D3D11DeviceContext::IASetIndexBuffer( ID3D11Buffer* pIndexBuffer, DXGI_FORMAT Format, UINT Offset) { @@ -701,17 +701,17 @@ namespace dxvk { } - void D3D11DeviceContext::IAGetInputLayout(ID3D11InputLayout** ppInputLayout) { + void STDMETHODCALLTYPE D3D11DeviceContext::IAGetInputLayout(ID3D11InputLayout** ppInputLayout) { *ppInputLayout = m_state.ia.inputLayout.ref(); } - void D3D11DeviceContext::IAGetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY* pTopology) { + void STDMETHODCALLTYPE D3D11DeviceContext::IAGetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY* pTopology) { *pTopology = m_state.ia.primitiveTopology; } - void D3D11DeviceContext::IAGetVertexBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::IAGetVertexBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppVertexBuffers, @@ -721,7 +721,7 @@ namespace dxvk { } - void D3D11DeviceContext::IAGetIndexBuffer( + void STDMETHODCALLTYPE D3D11DeviceContext::IAGetIndexBuffer( ID3D11Buffer** pIndexBuffer, DXGI_FORMAT* Format, UINT* Offset) { @@ -729,7 +729,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::VSSetShader( ID3D11VertexShader* pVertexShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -747,7 +747,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::VSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -759,7 +759,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::VSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -771,7 +771,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::VSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -783,7 +783,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::VSGetShader( ID3D11VertexShader** ppVertexShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -797,7 +797,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::VSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -805,7 +805,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::VSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -813,7 +813,7 @@ namespace dxvk { } - void D3D11DeviceContext::VSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::VSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -821,7 +821,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::HSSetShader( ID3D11HullShader* pHullShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -830,7 +830,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::HSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -838,7 +838,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::HSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -846,7 +846,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::HSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -854,7 +854,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::HSGetShader( ID3D11HullShader** ppHullShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -862,7 +862,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::HSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -870,7 +870,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::HSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -878,7 +878,7 @@ namespace dxvk { } - void D3D11DeviceContext::HSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::HSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -886,7 +886,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::DSSetShader( ID3D11DomainShader* pDomainShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -895,7 +895,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::DSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -903,7 +903,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::DSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -911,7 +911,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::DSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -919,7 +919,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::DSGetShader( ID3D11DomainShader** ppDomainShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -927,7 +927,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::DSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -935,7 +935,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::DSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -943,7 +943,7 @@ namespace dxvk { } - void D3D11DeviceContext::DSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::DSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -951,7 +951,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::GSSetShader( ID3D11GeometryShader* pShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -960,7 +960,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::GSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -968,7 +968,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::GSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -976,7 +976,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::GSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -984,7 +984,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::GSGetShader( ID3D11GeometryShader** ppGeometryShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -992,7 +992,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::GSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -1000,7 +1000,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::GSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -1008,7 +1008,7 @@ namespace dxvk { } - void D3D11DeviceContext::GSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::GSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -1016,7 +1016,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::PSSetShader( ID3D11PixelShader* pPixelShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -1034,7 +1034,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::PSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -1046,7 +1046,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::PSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -1058,7 +1058,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::PSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -1070,7 +1070,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::PSGetShader( ID3D11PixelShader** ppPixelShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -1084,7 +1084,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::PSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -1093,7 +1093,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::PSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -1102,7 +1102,7 @@ namespace dxvk { } - void D3D11DeviceContext::PSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::PSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -1111,7 +1111,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSSetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::CSSetShader( ID3D11ComputeShader* pComputeShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) { @@ -1119,7 +1119,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSSetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::CSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) { @@ -1127,7 +1127,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSSetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::CSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) { @@ -1135,7 +1135,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSSetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::CSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) { @@ -1143,7 +1143,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSSetUnorderedAccessViews( + void STDMETHODCALLTYPE D3D11DeviceContext::CSSetUnorderedAccessViews( UINT StartSlot, UINT NumUAVs, ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, @@ -1152,7 +1152,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSGetShader( + void STDMETHODCALLTYPE D3D11DeviceContext::CSGetShader( ID3D11ComputeShader** ppComputeShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) { @@ -1160,7 +1160,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSGetConstantBuffers( + void STDMETHODCALLTYPE D3D11DeviceContext::CSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) { @@ -1168,7 +1168,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSGetShaderResources( + void STDMETHODCALLTYPE D3D11DeviceContext::CSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) { @@ -1176,7 +1176,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSGetSamplers( + void STDMETHODCALLTYPE D3D11DeviceContext::CSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) { @@ -1184,7 +1184,7 @@ namespace dxvk { } - void D3D11DeviceContext::CSGetUnorderedAccessViews( + void STDMETHODCALLTYPE D3D11DeviceContext::CSGetUnorderedAccessViews( UINT StartSlot, UINT NumUAVs, ID3D11UnorderedAccessView** ppUnorderedAccessViews) { @@ -1192,7 +1192,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMSetRenderTargets( + void STDMETHODCALLTYPE D3D11DeviceContext::OMSetRenderTargets( UINT NumViews, ID3D11RenderTargetView* const* ppRenderTargetViews, ID3D11DepthStencilView* pDepthStencilView) { @@ -1234,7 +1234,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews( + void STDMETHODCALLTYPE D3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews( UINT NumRTVs, ID3D11RenderTargetView* const* ppRenderTargetViews, ID3D11DepthStencilView* pDepthStencilView, @@ -1246,7 +1246,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMSetBlendState( + void STDMETHODCALLTYPE D3D11DeviceContext::OMSetBlendState( ID3D11BlendState* pBlendState, const FLOAT BlendFactor[4], UINT SampleMask) { @@ -1270,7 +1270,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMSetDepthStencilState( + void STDMETHODCALLTYPE D3D11DeviceContext::OMSetDepthStencilState( ID3D11DepthStencilState* pDepthStencilState, UINT StencilRef) { auto depthStencilState = static_cast(pDepthStencilState); @@ -1291,7 +1291,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMGetRenderTargets( + void STDMETHODCALLTYPE D3D11DeviceContext::OMGetRenderTargets( UINT NumViews, ID3D11RenderTargetView** ppRenderTargetViews, ID3D11DepthStencilView** ppDepthStencilView) { @@ -1309,7 +1309,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMGetRenderTargetsAndUnorderedAccessViews( + void STDMETHODCALLTYPE D3D11DeviceContext::OMGetRenderTargetsAndUnorderedAccessViews( UINT NumRTVs, ID3D11RenderTargetView** ppRenderTargetViews, ID3D11DepthStencilView** ppDepthStencilView, @@ -1320,7 +1320,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMGetBlendState( + void STDMETHODCALLTYPE D3D11DeviceContext::OMGetBlendState( ID3D11BlendState** ppBlendState, FLOAT BlendFactor[4], UINT* pSampleMask) { @@ -1335,7 +1335,7 @@ namespace dxvk { } - void D3D11DeviceContext::OMGetDepthStencilState( + void STDMETHODCALLTYPE D3D11DeviceContext::OMGetDepthStencilState( ID3D11DepthStencilState** ppDepthStencilState, UINT* pStencilRef) { if (ppDepthStencilState != nullptr) @@ -1346,7 +1346,7 @@ namespace dxvk { } - void D3D11DeviceContext::RSSetState(ID3D11RasterizerState* pRasterizerState) { + void STDMETHODCALLTYPE D3D11DeviceContext::RSSetState(ID3D11RasterizerState* pRasterizerState) { auto rasterizerState = static_cast(pRasterizerState); if (m_state.rs.state != rasterizerState) { @@ -1365,7 +1365,7 @@ namespace dxvk { } - void D3D11DeviceContext::RSSetViewports( + void STDMETHODCALLTYPE D3D11DeviceContext::RSSetViewports( UINT NumViewports, const D3D11_VIEWPORT* pViewports) { m_state.rs.numViewports = NumViewports; @@ -1377,7 +1377,7 @@ namespace dxvk { } - void D3D11DeviceContext::RSSetScissorRects( + void STDMETHODCALLTYPE D3D11DeviceContext::RSSetScissorRects( UINT NumRects, const D3D11_RECT* pRects) { m_state.rs.numScissors = NumRects; @@ -1395,13 +1395,13 @@ namespace dxvk { } - void D3D11DeviceContext::RSGetState(ID3D11RasterizerState** ppRasterizerState) { + void STDMETHODCALLTYPE D3D11DeviceContext::RSGetState(ID3D11RasterizerState** ppRasterizerState) { if (ppRasterizerState != nullptr) *ppRasterizerState = m_state.rs.state.ref(); } - void D3D11DeviceContext::RSGetViewports( + void STDMETHODCALLTYPE D3D11DeviceContext::RSGetViewports( UINT* pNumViewports, D3D11_VIEWPORT* pViewports) { if (pViewports != nullptr) { @@ -1423,7 +1423,7 @@ namespace dxvk { } - void D3D11DeviceContext::RSGetScissorRects( + void STDMETHODCALLTYPE D3D11DeviceContext::RSGetScissorRects( UINT* pNumRects, D3D11_RECT* pRects) { if (pRects != nullptr) { @@ -1443,7 +1443,7 @@ namespace dxvk { } - void D3D11DeviceContext::SOSetTargets( + void STDMETHODCALLTYPE D3D11DeviceContext::SOSetTargets( UINT NumBuffers, ID3D11Buffer* const* ppSOTargets, const UINT* pOffsets) { @@ -1451,7 +1451,7 @@ namespace dxvk { } - void D3D11DeviceContext::SOGetTargets( + void STDMETHODCALLTYPE D3D11DeviceContext::SOGetTargets( UINT NumBuffers, ID3D11Buffer** ppSOTargets) { Logger::err("D3D11DeviceContext::SOGetTargets: Not implemented"); diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index b1449f52..6722a18b 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -20,62 +20,62 @@ namespace dxvk { Rc device); ~D3D11DeviceContext(); - ULONG AddRef() final; + ULONG STDMETHODCALLTYPE AddRef() final; - ULONG Release() final; + ULONG STDMETHODCALLTYPE Release() final; - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice(ID3D11Device **ppDevice) final; + void STDMETHODCALLTYPE GetDevice(ID3D11Device **ppDevice) final; - D3D11_DEVICE_CONTEXT_TYPE GetType() final; + D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE GetType() final; - UINT GetContextFlags() final; + UINT STDMETHODCALLTYPE GetContextFlags() final; - void ClearState() final; + void STDMETHODCALLTYPE ClearState() final; - void Flush() final; + void STDMETHODCALLTYPE Flush() final; - void ExecuteCommandList( + void STDMETHODCALLTYPE ExecuteCommandList( ID3D11CommandList* pCommandList, WINBOOL RestoreContextState) final; - HRESULT FinishCommandList( + HRESULT STDMETHODCALLTYPE FinishCommandList( WINBOOL RestoreDeferredContextState, ID3D11CommandList **ppCommandList) final; - HRESULT Map( + HRESULT STDMETHODCALLTYPE Map( ID3D11Resource* pResource, UINT Subresource, D3D11_MAP MapType, UINT MapFlags, D3D11_MAPPED_SUBRESOURCE* pMappedResource) final; - void Unmap( + void STDMETHODCALLTYPE Unmap( ID3D11Resource* pResource, UINT Subresource) final; - void Begin(ID3D11Asynchronous *pAsync) final; + void STDMETHODCALLTYPE Begin(ID3D11Asynchronous *pAsync) final; - void End(ID3D11Asynchronous *pAsync) final; + void STDMETHODCALLTYPE End(ID3D11Asynchronous *pAsync) final; - HRESULT GetData( + HRESULT STDMETHODCALLTYPE GetData( ID3D11Asynchronous* pAsync, void* pData, UINT DataSize, UINT GetDataFlags) final; - void SetPredication( + void STDMETHODCALLTYPE SetPredication( ID3D11Predicate* pPredicate, WINBOOL PredicateValue) final; - void GetPredication( + void STDMETHODCALLTYPE GetPredication( ID3D11Predicate** ppPredicate, WINBOOL* pPredicateValue) final; - void CopySubresourceRegion( + void STDMETHODCALLTYPE CopySubresourceRegion( ID3D11Resource* pDstResource, UINT DstSubresource, UINT DstX, @@ -85,37 +85,37 @@ namespace dxvk { UINT SrcSubresource, const D3D11_BOX* pSrcBox) final; - void CopyResource( + void STDMETHODCALLTYPE CopyResource( ID3D11Resource* pDstResource, ID3D11Resource* pSrcResource) final; - void CopyStructureCount( + void STDMETHODCALLTYPE CopyStructureCount( ID3D11Buffer* pDstBuffer, UINT DstAlignedByteOffset, ID3D11UnorderedAccessView* pSrcView) final; - void ClearRenderTargetView( + void STDMETHODCALLTYPE ClearRenderTargetView( ID3D11RenderTargetView* pRenderTargetView, const FLOAT ColorRGBA[4]) final; - void ClearUnorderedAccessViewUint( + void STDMETHODCALLTYPE ClearUnorderedAccessViewUint( ID3D11UnorderedAccessView* pUnorderedAccessView, const UINT Values[4]) final; - void ClearUnorderedAccessViewFloat( + void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat( ID3D11UnorderedAccessView* pUnorderedAccessView, const FLOAT Values[4]) final; - void ClearDepthStencilView( + void STDMETHODCALLTYPE ClearDepthStencilView( ID3D11DepthStencilView* pDepthStencilView, UINT ClearFlags, FLOAT Depth, UINT8 Stencil) final; - void GenerateMips( + void STDMETHODCALLTYPE GenerateMips( ID3D11ShaderResourceView* pShaderResourceView) final; - void UpdateSubresource( + void STDMETHODCALLTYPE UpdateSubresource( ID3D11Resource* pDstResource, UINT DstSubresource, const D3D11_BOX* pDstBox, @@ -123,354 +123,354 @@ namespace dxvk { UINT SrcRowPitch, UINT SrcDepthPitch) final; - void SetResourceMinLOD( + void STDMETHODCALLTYPE SetResourceMinLOD( ID3D11Resource* pResource, FLOAT MinLOD) final; - FLOAT GetResourceMinLOD( + FLOAT STDMETHODCALLTYPE GetResourceMinLOD( ID3D11Resource* pResource) final; - void ResolveSubresource( + void STDMETHODCALLTYPE ResolveSubresource( ID3D11Resource* pDstResource, UINT DstSubresource, ID3D11Resource* pSrcResource, UINT SrcSubresource, DXGI_FORMAT Format) final; - void DrawAuto() final; + void STDMETHODCALLTYPE DrawAuto() final; - void Draw( + void STDMETHODCALLTYPE Draw( UINT VertexCount, UINT StartVertexLocation) final; - void DrawIndexed( + void STDMETHODCALLTYPE DrawIndexed( UINT IndexCount, UINT StartIndexLocation, INT BaseVertexLocation) final; - void DrawInstanced( + void STDMETHODCALLTYPE DrawInstanced( UINT VertexCountPerInstance, UINT InstanceCount, UINT StartVertexLocation, UINT StartInstanceLocation) final; - void DrawIndexedInstanced( + void STDMETHODCALLTYPE DrawIndexedInstanced( UINT IndexCountPerInstance, UINT InstanceCount, UINT StartIndexLocation, INT BaseVertexLocation, UINT StartInstanceLocation) final; - void DrawIndexedInstancedIndirect( + void STDMETHODCALLTYPE DrawIndexedInstancedIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) final; - void DrawInstancedIndirect( + void STDMETHODCALLTYPE DrawInstancedIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) final; - void Dispatch( + void STDMETHODCALLTYPE Dispatch( UINT ThreadGroupCountX, UINT ThreadGroupCountY, UINT ThreadGroupCountZ) final; - void DispatchIndirect( + void STDMETHODCALLTYPE DispatchIndirect( ID3D11Buffer* pBufferForArgs, UINT AlignedByteOffsetForArgs) final; - void IASetInputLayout( + void STDMETHODCALLTYPE IASetInputLayout( ID3D11InputLayout* pInputLayout) final; - void IASetPrimitiveTopology( + void STDMETHODCALLTYPE IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY Topology) final; - void IASetVertexBuffers( + void STDMETHODCALLTYPE IASetVertexBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppVertexBuffers, const UINT* pStrides, const UINT* pOffsets) final; - void IASetIndexBuffer( + void STDMETHODCALLTYPE IASetIndexBuffer( ID3D11Buffer* pIndexBuffer, DXGI_FORMAT Format, UINT Offset) final; - void IAGetInputLayout( + void STDMETHODCALLTYPE IAGetInputLayout( ID3D11InputLayout** ppInputLayout) final; - void IAGetPrimitiveTopology( + void STDMETHODCALLTYPE IAGetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY* pTopology) final; - void IAGetVertexBuffers( + void STDMETHODCALLTYPE IAGetVertexBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppVertexBuffers, UINT* pStrides, UINT* pOffsets) final; - void IAGetIndexBuffer( + void STDMETHODCALLTYPE IAGetIndexBuffer( ID3D11Buffer** pIndexBuffer, DXGI_FORMAT* Format, UINT* Offset) final; - void VSSetShader( + void STDMETHODCALLTYPE VSSetShader( ID3D11VertexShader* pVertexShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void VSSetConstantBuffers( + void STDMETHODCALLTYPE VSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void VSSetShaderResources( + void STDMETHODCALLTYPE VSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void VSSetSamplers( + void STDMETHODCALLTYPE VSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void VSGetShader( + void STDMETHODCALLTYPE VSGetShader( ID3D11VertexShader** ppVertexShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void VSGetConstantBuffers( + void STDMETHODCALLTYPE VSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void VSGetShaderResources( + void STDMETHODCALLTYPE VSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void VSGetSamplers( + void STDMETHODCALLTYPE VSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void HSSetShader( + void STDMETHODCALLTYPE HSSetShader( ID3D11HullShader* pHullShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void HSSetShaderResources( + void STDMETHODCALLTYPE HSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void HSSetConstantBuffers( + void STDMETHODCALLTYPE HSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void HSSetSamplers( + void STDMETHODCALLTYPE HSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void HSGetShader( + void STDMETHODCALLTYPE HSGetShader( ID3D11HullShader** ppHullShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void HSGetConstantBuffers( + void STDMETHODCALLTYPE HSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void HSGetShaderResources( + void STDMETHODCALLTYPE HSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void HSGetSamplers( + void STDMETHODCALLTYPE HSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void DSSetShader( + void STDMETHODCALLTYPE DSSetShader( ID3D11DomainShader* pDomainShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void DSSetShaderResources( + void STDMETHODCALLTYPE DSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void DSSetConstantBuffers( + void STDMETHODCALLTYPE DSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void DSSetSamplers( + void STDMETHODCALLTYPE DSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void DSGetShader( + void STDMETHODCALLTYPE DSGetShader( ID3D11DomainShader** ppDomainShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void DSGetConstantBuffers( + void STDMETHODCALLTYPE DSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void DSGetShaderResources( + void STDMETHODCALLTYPE DSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void DSGetSamplers( + void STDMETHODCALLTYPE DSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void GSSetShader( + void STDMETHODCALLTYPE GSSetShader( ID3D11GeometryShader* pShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void GSSetConstantBuffers( + void STDMETHODCALLTYPE GSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void GSSetShaderResources( + void STDMETHODCALLTYPE GSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void GSSetSamplers( + void STDMETHODCALLTYPE GSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void GSGetShader( + void STDMETHODCALLTYPE GSGetShader( ID3D11GeometryShader** ppGeometryShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void GSGetConstantBuffers( + void STDMETHODCALLTYPE GSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void GSGetShaderResources( + void STDMETHODCALLTYPE GSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void GSGetSamplers( + void STDMETHODCALLTYPE GSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void PSSetShader( + void STDMETHODCALLTYPE PSSetShader( ID3D11PixelShader* pPixelShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void PSSetConstantBuffers( + void STDMETHODCALLTYPE PSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void PSSetShaderResources( + void STDMETHODCALLTYPE PSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void PSSetSamplers( + void STDMETHODCALLTYPE PSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void PSGetShader( + void STDMETHODCALLTYPE PSGetShader( ID3D11PixelShader** ppPixelShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void PSGetConstantBuffers( + void STDMETHODCALLTYPE PSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void PSGetShaderResources( + void STDMETHODCALLTYPE PSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void PSGetSamplers( + void STDMETHODCALLTYPE PSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void CSSetShader( + void STDMETHODCALLTYPE CSSetShader( ID3D11ComputeShader* pComputeShader, ID3D11ClassInstance* const* ppClassInstances, UINT NumClassInstances) final; - void CSSetConstantBuffers( + void STDMETHODCALLTYPE CSSetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer* const* ppConstantBuffers) final; - void CSSetShaderResources( + void STDMETHODCALLTYPE CSSetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView* const* ppShaderResourceViews) final; - void CSSetSamplers( + void STDMETHODCALLTYPE CSSetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState* const* ppSamplers) final; - void CSSetUnorderedAccessViews( + void STDMETHODCALLTYPE CSSetUnorderedAccessViews( UINT StartSlot, UINT NumUAVs, ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, const UINT* pUAVInitialCounts) final; - void CSGetShader( + void STDMETHODCALLTYPE CSGetShader( ID3D11ComputeShader** ppComputeShader, ID3D11ClassInstance** ppClassInstances, UINT* pNumClassInstances) final; - void CSGetConstantBuffers( + void STDMETHODCALLTYPE CSGetConstantBuffers( UINT StartSlot, UINT NumBuffers, ID3D11Buffer** ppConstantBuffers) final; - void CSGetShaderResources( + void STDMETHODCALLTYPE CSGetShaderResources( UINT StartSlot, UINT NumViews, ID3D11ShaderResourceView** ppShaderResourceViews) final; - void CSGetSamplers( + void STDMETHODCALLTYPE CSGetSamplers( UINT StartSlot, UINT NumSamplers, ID3D11SamplerState** ppSamplers) final; - void CSGetUnorderedAccessViews( + void STDMETHODCALLTYPE CSGetUnorderedAccessViews( UINT StartSlot, UINT NumUAVs, ID3D11UnorderedAccessView** ppUnorderedAccessViews) final; - void OMSetRenderTargets( + void STDMETHODCALLTYPE OMSetRenderTargets( UINT NumViews, ID3D11RenderTargetView* const* ppRenderTargetViews, ID3D11DepthStencilView* pDepthStencilView) final; - void OMSetRenderTargetsAndUnorderedAccessViews( + void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews( UINT NumRTVs, ID3D11RenderTargetView* const* ppRenderTargetViews, ID3D11DepthStencilView* pDepthStencilView, @@ -479,21 +479,21 @@ namespace dxvk { ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, const UINT* pUAVInitialCounts) final; - void OMSetBlendState( + void STDMETHODCALLTYPE OMSetBlendState( ID3D11BlendState* pBlendState, const FLOAT BlendFactor[4], UINT SampleMask) final; - void OMSetDepthStencilState( + void STDMETHODCALLTYPE OMSetDepthStencilState( ID3D11DepthStencilState* pDepthStencilState, UINT StencilRef) final; - void OMGetRenderTargets( + void STDMETHODCALLTYPE OMGetRenderTargets( UINT NumViews, ID3D11RenderTargetView** ppRenderTargetViews, ID3D11DepthStencilView** ppDepthStencilView) final; - void OMGetRenderTargetsAndUnorderedAccessViews( + void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews( UINT NumRTVs, ID3D11RenderTargetView** ppRenderTargetViews, ID3D11DepthStencilView** ppDepthStencilView, @@ -501,43 +501,43 @@ namespace dxvk { UINT NumUAVs, ID3D11UnorderedAccessView** ppUnorderedAccessViews) final; - void OMGetBlendState( + void STDMETHODCALLTYPE OMGetBlendState( ID3D11BlendState** ppBlendState, FLOAT BlendFactor[4], UINT* pSampleMask) final; - void OMGetDepthStencilState( + void STDMETHODCALLTYPE OMGetDepthStencilState( ID3D11DepthStencilState** ppDepthStencilState, UINT* pStencilRef) final; - void RSSetState( + void STDMETHODCALLTYPE RSSetState( ID3D11RasterizerState* pRasterizerState) final; - void RSSetViewports( + void STDMETHODCALLTYPE RSSetViewports( UINT NumViewports, const D3D11_VIEWPORT* pViewports) final; - void RSSetScissorRects( + void STDMETHODCALLTYPE RSSetScissorRects( UINT NumRects, const D3D11_RECT* pRects) final; - void RSGetState( + void STDMETHODCALLTYPE RSGetState( ID3D11RasterizerState** ppRasterizerState) final; - void RSGetViewports( + void STDMETHODCALLTYPE RSGetViewports( UINT* pNumViewports, D3D11_VIEWPORT* pViewports) final; - void RSGetScissorRects( + void STDMETHODCALLTYPE RSGetScissorRects( UINT* pNumRects, D3D11_RECT* pRects) final; - void SOSetTargets( + void STDMETHODCALLTYPE SOSetTargets( UINT NumBuffers, ID3D11Buffer* const* ppSOTargets, const UINT* pOffsets) final; - void SOGetTargets( + void STDMETHODCALLTYPE SOGetTargets( UINT NumBuffers, ID3D11Buffer** ppSOTargets) final; diff --git a/src/d3d11/d3d11_depth_stencil.cpp b/src/d3d11/d3d11_depth_stencil.cpp index 7be5c5db..8bf8a374 100644 --- a/src/d3d11/d3d11_depth_stencil.cpp +++ b/src/d3d11/d3d11_depth_stencil.cpp @@ -27,7 +27,7 @@ namespace dxvk { } - HRESULT D3D11DepthStencilState::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11DepthStencilState::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11DepthStencilState); @@ -37,12 +37,12 @@ namespace dxvk { } - void D3D11DepthStencilState::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11DepthStencilState::GetDevice(ID3D11Device** ppDevice) { *ppDevice = ref(m_device); } - void D3D11DepthStencilState::GetDesc(D3D11_DEPTH_STENCIL_DESC* pDesc) { + void STDMETHODCALLTYPE D3D11DepthStencilState::GetDesc(D3D11_DEPTH_STENCIL_DESC* pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_depth_stencil.h b/src/d3d11/d3d11_depth_stencil.h index f697ae92..c4f3ee6d 100644 --- a/src/d3d11/d3d11_depth_stencil.h +++ b/src/d3d11/d3d11_depth_stencil.h @@ -20,14 +20,14 @@ namespace dxvk { const D3D11_DEPTH_STENCIL_DESC& desc); ~D3D11DepthStencilState(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_DEPTH_STENCIL_DESC* pDesc) final; void BindToContext( diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 77f1a562..0c25cc70 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -45,7 +45,7 @@ namespace dxvk { } - HRESULT D3D11Device::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11Device::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11Device); @@ -63,7 +63,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateBuffer( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateBuffer( const D3D11_BUFFER_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Buffer** ppBuffer) { @@ -153,7 +153,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateTexture1D( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateTexture1D( const D3D11_TEXTURE1D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture1D** ppTexture1D) { @@ -162,7 +162,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateTexture2D( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateTexture2D( const D3D11_TEXTURE2D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture2D** ppTexture2D) { @@ -255,7 +255,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateTexture3D( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateTexture3D( const D3D11_TEXTURE3D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture3D** ppTexture3D) { @@ -264,7 +264,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateShaderResourceView( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateShaderResourceView( ID3D11Resource* pResource, const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, ID3D11ShaderResourceView** ppSRView) { @@ -399,7 +399,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateUnorderedAccessView( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateUnorderedAccessView( ID3D11Resource* pResource, const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, ID3D11UnorderedAccessView** ppUAView) { @@ -408,7 +408,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateRenderTargetView( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateRenderTargetView( ID3D11Resource* pResource, const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, ID3D11RenderTargetView** ppRTView) { @@ -503,7 +503,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateDepthStencilView( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateDepthStencilView( ID3D11Resource* pResource, const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, ID3D11DepthStencilView** ppDepthStencilView) { @@ -598,7 +598,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateInputLayout( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateInputLayout( const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, UINT NumElements, const void* pShaderBytecodeWithInputSignature, @@ -645,7 +645,7 @@ namespace dxvk { // Create vertex input binding description. The // stride is dynamic state in D3D11 and will be - // set by D3D11DeviceContext::IASetVertexBuffers. + // set by STDMETHODCALLTYPE D3D11DeviceContext::IASetVertexBuffers. DxvkVertexBinding binding; binding.binding = pInputElementDescs[i].InputSlot; binding.inputRate = VK_VERTEX_INPUT_RATE_VERTEX; @@ -700,7 +700,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateVertexShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateVertexShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -720,7 +720,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateGeometryShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateGeometryShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -730,7 +730,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateGeometryShaderWithStreamOutput( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateGeometryShaderWithStreamOutput( const void* pShaderBytecode, SIZE_T BytecodeLength, const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, @@ -745,7 +745,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreatePixelShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreatePixelShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -765,7 +765,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateHullShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateHullShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -775,7 +775,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateDomainShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateDomainShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -785,7 +785,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateComputeShader( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateComputeShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, @@ -795,13 +795,13 @@ namespace dxvk { } - HRESULT D3D11Device::CreateClassLinkage(ID3D11ClassLinkage** ppLinkage) { + HRESULT STDMETHODCALLTYPE D3D11Device::CreateClassLinkage(ID3D11ClassLinkage** ppLinkage) { *ppLinkage = ref(new D3D11ClassLinkage(this)); return S_OK; } - HRESULT D3D11Device::CreateBlendState( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateBlendState( const D3D11_BLEND_DESC* pBlendStateDesc, ID3D11BlendState** ppBlendState) { D3D11_BLEND_DESC desc; @@ -833,7 +833,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateDepthStencilState( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateDepthStencilState( const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, ID3D11DepthStencilState** ppDepthStencilState) { D3D11_DEPTH_STENCIL_DESC desc; @@ -863,7 +863,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateRasterizerState( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateRasterizerState( const D3D11_RASTERIZER_DESC* pRasterizerDesc, ID3D11RasterizerState** ppRasterizerState) { D3D11_RASTERIZER_DESC desc; @@ -889,7 +889,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateSamplerState( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateSamplerState( const D3D11_SAMPLER_DESC* pSamplerDesc, ID3D11SamplerState** ppSamplerState) { DxvkSamplerCreateInfo info; @@ -943,7 +943,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateQuery( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateQuery( const D3D11_QUERY_DESC* pQueryDesc, ID3D11Query** ppQuery) { Logger::err("D3D11Device::CreateQuery: Not implemented"); @@ -951,7 +951,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreatePredicate( + HRESULT STDMETHODCALLTYPE D3D11Device::CreatePredicate( const D3D11_QUERY_DESC* pPredicateDesc, ID3D11Predicate** ppPredicate) { Logger::err("D3D11Device::CreatePredicate: Not implemented"); @@ -959,7 +959,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateCounter( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateCounter( const D3D11_COUNTER_DESC* pCounterDesc, ID3D11Counter** ppCounter) { Logger::err("D3D11Device::CreateCounter: Not implemented"); @@ -967,7 +967,7 @@ namespace dxvk { } - HRESULT D3D11Device::CreateDeferredContext( + HRESULT STDMETHODCALLTYPE D3D11Device::CreateDeferredContext( UINT ContextFlags, ID3D11DeviceContext** ppDeferredContext) { Logger::err("D3D11Device::CreateDeferredContext: Not implemented"); @@ -975,7 +975,7 @@ namespace dxvk { } - HRESULT D3D11Device::OpenSharedResource( + HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResource( HANDLE hResource, REFIID ReturnedInterface, void** ppResource) { @@ -984,7 +984,7 @@ namespace dxvk { } - HRESULT D3D11Device::CheckFormatSupport( + HRESULT STDMETHODCALLTYPE D3D11Device::CheckFormatSupport( DXGI_FORMAT Format, UINT* pFormatSupport) { Logger::err("D3D11Device::CheckFormatSupport: Not implemented"); @@ -992,7 +992,7 @@ namespace dxvk { } - HRESULT D3D11Device::CheckMultisampleQualityLevels( + HRESULT STDMETHODCALLTYPE D3D11Device::CheckMultisampleQualityLevels( DXGI_FORMAT Format, UINT SampleCount, UINT* pNumQualityLevels) { @@ -1030,12 +1030,12 @@ namespace dxvk { } - void D3D11Device::CheckCounterInfo(D3D11_COUNTER_INFO* pCounterInfo) { + void STDMETHODCALLTYPE D3D11Device::CheckCounterInfo(D3D11_COUNTER_INFO* pCounterInfo) { Logger::err("D3D11Device::CheckCounterInfo: Not implemented"); } - HRESULT D3D11Device::CheckCounter( + HRESULT STDMETHODCALLTYPE D3D11Device::CheckCounter( const D3D11_COUNTER_DESC* pDesc, D3D11_COUNTER_TYPE* pType, UINT* pActiveCounters, @@ -1050,7 +1050,7 @@ namespace dxvk { } - HRESULT D3D11Device::CheckFeatureSupport( + HRESULT STDMETHODCALLTYPE D3D11Device::CheckFeatureSupport( D3D11_FEATURE Feature, void* pFeatureSupportData, UINT FeatureSupportDataSize) { @@ -1059,52 +1059,52 @@ namespace dxvk { } - HRESULT D3D11Device::GetPrivateData( + HRESULT STDMETHODCALLTYPE D3D11Device::GetPrivateData( REFGUID guid, UINT* pDataSize, void* pData) { return m_dxgiDevice->GetPrivateData(guid, pDataSize, pData); } - HRESULT D3D11Device::SetPrivateData( + HRESULT STDMETHODCALLTYPE D3D11Device::SetPrivateData( REFGUID guid, UINT DataSize, const void* pData) { return m_dxgiDevice->SetPrivateData(guid, DataSize, pData); } - HRESULT D3D11Device::SetPrivateDataInterface( + HRESULT STDMETHODCALLTYPE D3D11Device::SetPrivateDataInterface( REFGUID guid, const IUnknown* pData) { return m_dxgiDevice->SetPrivateDataInterface(guid, pData); } - D3D_FEATURE_LEVEL D3D11Device::GetFeatureLevel() { + D3D_FEATURE_LEVEL STDMETHODCALLTYPE D3D11Device::GetFeatureLevel() { return m_featureLevel; } - UINT D3D11Device::GetCreationFlags() { + UINT STDMETHODCALLTYPE D3D11Device::GetCreationFlags() { return m_featureFlags; } - HRESULT D3D11Device::GetDeviceRemovedReason() { + HRESULT STDMETHODCALLTYPE D3D11Device::GetDeviceRemovedReason() { Logger::err("D3D11Device::GetDeviceRemovedReason: Not implemented"); return E_NOTIMPL; } - void D3D11Device::GetImmediateContext(ID3D11DeviceContext** ppImmediateContext) { + void STDMETHODCALLTYPE D3D11Device::GetImmediateContext(ID3D11DeviceContext** ppImmediateContext) { *ppImmediateContext = ref(m_context); } - HRESULT D3D11Device::SetExceptionMode(UINT RaiseFlags) { + HRESULT STDMETHODCALLTYPE D3D11Device::SetExceptionMode(UINT RaiseFlags) { Logger::err("D3D11Device::SetExceptionMode: Not implemented"); return E_NOTIMPL; } - UINT D3D11Device::GetExceptionMode() { + UINT STDMETHODCALLTYPE D3D11Device::GetExceptionMode() { Logger::err("D3D11Device::GetExceptionMode: Not implemented"); return 0; } diff --git a/src/d3d11/d3d11_device.h b/src/d3d11/d3d11_device.h index ac627be3..681621f0 100644 --- a/src/d3d11/d3d11_device.h +++ b/src/d3d11/d3d11_device.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include "../dxgi/dxgi_object.h" +#include "../dxgi/dxgi_resource.h" #include "d3d11_interfaces.h" #include "d3d11_state.h" @@ -25,70 +25,70 @@ namespace dxvk { UINT featureFlags); ~D3D11Device(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - HRESULT CreateBuffer( + HRESULT STDMETHODCALLTYPE CreateBuffer( const D3D11_BUFFER_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Buffer** ppBuffer) final; - HRESULT CreateTexture1D( + HRESULT STDMETHODCALLTYPE CreateTexture1D( const D3D11_TEXTURE1D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture1D** ppTexture1D) final; - HRESULT CreateTexture2D( + HRESULT STDMETHODCALLTYPE CreateTexture2D( const D3D11_TEXTURE2D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture2D** ppTexture2D) final; - HRESULT CreateTexture3D( + HRESULT STDMETHODCALLTYPE CreateTexture3D( const D3D11_TEXTURE3D_DESC* pDesc, const D3D11_SUBRESOURCE_DATA* pInitialData, ID3D11Texture3D** ppTexture3D) final; - HRESULT CreateShaderResourceView( + HRESULT STDMETHODCALLTYPE CreateShaderResourceView( ID3D11Resource* pResource, const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, ID3D11ShaderResourceView** ppSRView) final; - HRESULT CreateUnorderedAccessView( + HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView( ID3D11Resource* pResource, const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, ID3D11UnorderedAccessView** ppUAView) final; - HRESULT CreateRenderTargetView( + HRESULT STDMETHODCALLTYPE CreateRenderTargetView( ID3D11Resource* pResource, const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, ID3D11RenderTargetView** ppRTView) final; - HRESULT CreateDepthStencilView( + HRESULT STDMETHODCALLTYPE CreateDepthStencilView( ID3D11Resource* pResource, const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, ID3D11DepthStencilView** ppDepthStencilView) final; - HRESULT CreateInputLayout( + HRESULT STDMETHODCALLTYPE CreateInputLayout( const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, UINT NumElements, const void* pShaderBytecodeWithInputSignature, SIZE_T BytecodeLength, ID3D11InputLayout** ppInputLayout) final; - HRESULT CreateVertexShader( + HRESULT STDMETHODCALLTYPE CreateVertexShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11VertexShader** ppVertexShader) final; - HRESULT CreateGeometryShader( + HRESULT STDMETHODCALLTYPE CreateGeometryShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11GeometryShader** ppGeometryShader) final; - HRESULT CreateGeometryShaderWithStreamOutput( + HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( const void* pShaderBytecode, SIZE_T BytecodeLength, const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, @@ -99,83 +99,83 @@ namespace dxvk { ID3D11ClassLinkage* pClassLinkage, ID3D11GeometryShader** ppGeometryShader) final; - HRESULT CreatePixelShader( + HRESULT STDMETHODCALLTYPE CreatePixelShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11PixelShader** ppPixelShader) final; - HRESULT CreateHullShader( + HRESULT STDMETHODCALLTYPE CreateHullShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11HullShader** ppHullShader) final; - HRESULT CreateDomainShader( + HRESULT STDMETHODCALLTYPE CreateDomainShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11DomainShader** ppDomainShader) final; - HRESULT CreateComputeShader( + HRESULT STDMETHODCALLTYPE CreateComputeShader( const void* pShaderBytecode, SIZE_T BytecodeLength, ID3D11ClassLinkage* pClassLinkage, ID3D11ComputeShader** ppComputeShader) final; - HRESULT CreateClassLinkage( + HRESULT STDMETHODCALLTYPE CreateClassLinkage( ID3D11ClassLinkage** ppLinkage) final; - HRESULT CreateBlendState( + HRESULT STDMETHODCALLTYPE CreateBlendState( const D3D11_BLEND_DESC* pBlendStateDesc, ID3D11BlendState** ppBlendState) final; - HRESULT CreateDepthStencilState( + HRESULT STDMETHODCALLTYPE CreateDepthStencilState( const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, ID3D11DepthStencilState** ppDepthStencilState) final; - HRESULT CreateRasterizerState( + HRESULT STDMETHODCALLTYPE CreateRasterizerState( const D3D11_RASTERIZER_DESC* pRasterizerDesc, ID3D11RasterizerState** ppRasterizerState) final; - HRESULT CreateSamplerState( + HRESULT STDMETHODCALLTYPE CreateSamplerState( const D3D11_SAMPLER_DESC* pSamplerDesc, ID3D11SamplerState** ppSamplerState) final; - HRESULT CreateQuery( + HRESULT STDMETHODCALLTYPE CreateQuery( const D3D11_QUERY_DESC* pQueryDesc, ID3D11Query** ppQuery) final; - HRESULT CreatePredicate( + HRESULT STDMETHODCALLTYPE CreatePredicate( const D3D11_QUERY_DESC* pPredicateDesc, ID3D11Predicate** ppPredicate) final; - HRESULT CreateCounter( + HRESULT STDMETHODCALLTYPE CreateCounter( const D3D11_COUNTER_DESC* pCounterDesc, ID3D11Counter** ppCounter) final; - HRESULT CreateDeferredContext( + HRESULT STDMETHODCALLTYPE CreateDeferredContext( UINT ContextFlags, ID3D11DeviceContext** ppDeferredContext) final; - HRESULT OpenSharedResource( + HRESULT STDMETHODCALLTYPE OpenSharedResource( HANDLE hResource, REFIID ReturnedInterface, void** ppResource) final; - HRESULT CheckFormatSupport( + HRESULT STDMETHODCALLTYPE CheckFormatSupport( DXGI_FORMAT Format, UINT* pFormatSupport) final; - HRESULT CheckMultisampleQualityLevels( + HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels( DXGI_FORMAT Format, UINT SampleCount, UINT* pNumQualityLevels) final; - void CheckCounterInfo( + void STDMETHODCALLTYPE CheckCounterInfo( D3D11_COUNTER_INFO* pCounterInfo) final; - HRESULT CheckCounter( + HRESULT STDMETHODCALLTYPE CheckCounter( const D3D11_COUNTER_DESC* pDesc, D3D11_COUNTER_TYPE* pType, UINT* pActiveCounters, @@ -186,37 +186,37 @@ namespace dxvk { LPSTR szDescription, UINT* pDescriptionLength) final; - HRESULT CheckFeatureSupport( + HRESULT STDMETHODCALLTYPE CheckFeatureSupport( D3D11_FEATURE Feature, void* pFeatureSupportData, UINT FeatureSupportDataSize) final; - HRESULT GetPrivateData( + HRESULT STDMETHODCALLTYPE GetPrivateData( REFGUID Name, UINT *pDataSize, void *pData) final; - HRESULT SetPrivateData( + HRESULT STDMETHODCALLTYPE SetPrivateData( REFGUID Name, UINT DataSize, const void *pData) final; - HRESULT SetPrivateDataInterface( + HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( REFGUID Name, const IUnknown *pUnknown) final; - D3D_FEATURE_LEVEL GetFeatureLevel() final; + D3D_FEATURE_LEVEL STDMETHODCALLTYPE GetFeatureLevel() final; - UINT GetCreationFlags() final; + UINT STDMETHODCALLTYPE GetCreationFlags() final; - HRESULT GetDeviceRemovedReason() final; + HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason() final; - void GetImmediateContext( + void STDMETHODCALLTYPE GetImmediateContext( ID3D11DeviceContext** ppImmediateContext) final; - HRESULT SetExceptionMode(UINT RaiseFlags) final; + HRESULT STDMETHODCALLTYPE SetExceptionMode(UINT RaiseFlags) final; - UINT GetExceptionMode() final; + UINT STDMETHODCALLTYPE GetExceptionMode() final; Rc GetDXVKDevice() { return m_dxvkDevice; diff --git a/src/d3d11/d3d11_device_child.h b/src/d3d11/d3d11_device_child.h index 485b23a6..190b5afa 100644 --- a/src/d3d11/d3d11_device_child.h +++ b/src/d3d11/d3d11_device_child.h @@ -11,7 +11,7 @@ namespace dxvk { public: - HRESULT GetPrivateData( + HRESULT STDMETHODCALLTYPE GetPrivateData( REFGUID guid, UINT *pDataSize, void *pData) final { @@ -19,7 +19,7 @@ namespace dxvk { guid, pDataSize, pData); } - HRESULT SetPrivateData( + HRESULT STDMETHODCALLTYPE SetPrivateData( REFGUID guid, UINT DataSize, const void *pData) final { @@ -27,7 +27,7 @@ namespace dxvk { guid, DataSize, pData); } - HRESULT SetPrivateDataInterface( + HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( REFGUID guid, const IUnknown *pUnknown) final { return m_privateData.setInterface( diff --git a/src/d3d11/d3d11_input_layout.cpp b/src/d3d11/d3d11_input_layout.cpp index 4eac95e2..99809515 100644 --- a/src/d3d11/d3d11_input_layout.cpp +++ b/src/d3d11/d3d11_input_layout.cpp @@ -26,7 +26,7 @@ namespace dxvk { } - HRESULT D3D11InputLayout::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11InputLayout::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11InputLayout); @@ -36,7 +36,7 @@ namespace dxvk { } - void D3D11InputLayout::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11InputLayout::GetDevice(ID3D11Device** ppDevice) { *ppDevice = m_device.ref(); } diff --git a/src/d3d11/d3d11_input_layout.h b/src/d3d11/d3d11_input_layout.h index 038027c1..cfe068d3 100644 --- a/src/d3d11/d3d11_input_layout.h +++ b/src/d3d11/d3d11_input_layout.h @@ -19,11 +19,11 @@ namespace dxvk { ~D3D11InputLayout(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; void BindToContext( diff --git a/src/d3d11/d3d11_main.cpp b/src/d3d11/d3d11_main.cpp index 77aa77c4..d62a84d8 100644 --- a/src/d3d11/d3d11_main.cpp +++ b/src/d3d11/d3d11_main.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include "../dxgi/dxgi_adapter.h" +#include "../dxgi/dxgi_device.h" #include "d3d11_device.h" #include "d3d11_enums.h" diff --git a/src/d3d11/d3d11_present.cpp b/src/d3d11/d3d11_present.cpp index 107e2928..81bba6fb 100644 --- a/src/d3d11/d3d11_present.cpp +++ b/src/d3d11/d3d11_present.cpp @@ -8,7 +8,7 @@ namespace dxvk { D3D11PresentDevice::~D3D11PresentDevice() { } - HRESULT D3D11PresentDevice::QueryInterface( + HRESULT STDMETHODCALLTYPE D3D11PresentDevice::QueryInterface( REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); @@ -17,7 +17,7 @@ namespace dxvk { } - HRESULT D3D11PresentDevice::WrapSwapChainBackBuffer( + HRESULT STDMETHODCALLTYPE D3D11PresentDevice::WrapSwapChainBackBuffer( IDXGIImageResourcePrivate* pResource, const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IUnknown** ppInterface) { @@ -40,7 +40,7 @@ namespace dxvk { } - HRESULT D3D11PresentDevice::FlushRenderingCommands() { + HRESULT STDMETHODCALLTYPE D3D11PresentDevice::FlushRenderingCommands() { Com deviceContext = nullptr; m_device->GetImmediateContext(&deviceContext); @@ -49,7 +49,7 @@ namespace dxvk { } - HRESULT D3D11PresentDevice::GetDevice(REFGUID riid, void** ppvDevice) { + HRESULT STDMETHODCALLTYPE D3D11PresentDevice::GetDevice(REFGUID riid, void** ppvDevice) { return m_device->QueryInterface(riid, ppvDevice); } diff --git a/src/d3d11/d3d11_present.h b/src/d3d11/d3d11_present.h index 70c9ad36..8b3ca333 100644 --- a/src/d3d11/d3d11_present.h +++ b/src/d3d11/d3d11_present.h @@ -1,12 +1,11 @@ #pragma once -#include - -#include "d3d11_include.h" - +#include "../dxgi/dxgi_device.h" #include "../dxgi/dxgi_interfaces.h" #include "../dxgi/dxgi_resource.h" +#include "d3d11_include.h" + namespace dxvk { class D3D11Device; @@ -18,18 +17,18 @@ namespace dxvk { D3D11PresentDevice(); ~D3D11PresentDevice(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - HRESULT WrapSwapChainBackBuffer( + HRESULT STDMETHODCALLTYPE WrapSwapChainBackBuffer( IDXGIImageResourcePrivate* pResource, const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IUnknown** ppInterface) final; - HRESULT FlushRenderingCommands() final; + HRESULT STDMETHODCALLTYPE FlushRenderingCommands() final; - HRESULT GetDevice( + HRESULT STDMETHODCALLTYPE GetDevice( REFGUID riid, void** ppvDevice) final; diff --git a/src/d3d11/d3d11_rasterizer.cpp b/src/d3d11/d3d11_rasterizer.cpp index 8ee2b493..3167ac5d 100644 --- a/src/d3d11/d3d11_rasterizer.cpp +++ b/src/d3d11/d3d11_rasterizer.cpp @@ -67,7 +67,7 @@ namespace dxvk { } - HRESULT D3D11RasterizerState::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11RasterizerState::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11RasterizerState); @@ -77,12 +77,12 @@ namespace dxvk { } - void D3D11RasterizerState::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11RasterizerState::GetDevice(ID3D11Device** ppDevice) { *ppDevice = ref(m_device); } - void D3D11RasterizerState::GetDesc(D3D11_RASTERIZER_DESC* pDesc) { + void STDMETHODCALLTYPE D3D11RasterizerState::GetDesc(D3D11_RASTERIZER_DESC* pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_rasterizer.h b/src/d3d11/d3d11_rasterizer.h index a050fe45..9538bc57 100644 --- a/src/d3d11/d3d11_rasterizer.h +++ b/src/d3d11/d3d11_rasterizer.h @@ -19,14 +19,14 @@ namespace dxvk { const D3D11_RASTERIZER_DESC& desc); ~D3D11RasterizerState(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_RASTERIZER_DESC* pDesc) final; void BindToContext( diff --git a/src/d3d11/d3d11_sampler.cpp b/src/d3d11/d3d11_sampler.cpp index 2e216f81..2e133b21 100644 --- a/src/d3d11/d3d11_sampler.cpp +++ b/src/d3d11/d3d11_sampler.cpp @@ -19,7 +19,7 @@ namespace dxvk { } - HRESULT D3D11SamplerState::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11SamplerState::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11SamplerState); @@ -29,12 +29,12 @@ namespace dxvk { } - void D3D11SamplerState::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11SamplerState::GetDevice(ID3D11Device** ppDevice) { *ppDevice = m_device.ref(); } - void D3D11SamplerState::GetDesc(D3D11_SAMPLER_DESC* pDesc) { + void STDMETHODCALLTYPE D3D11SamplerState::GetDesc(D3D11_SAMPLER_DESC* pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_sampler.h b/src/d3d11/d3d11_sampler.h index aab44390..fcc0d4d5 100644 --- a/src/d3d11/d3d11_sampler.h +++ b/src/d3d11/d3d11_sampler.h @@ -18,14 +18,14 @@ namespace dxvk { const Rc& sampler); ~D3D11SamplerState(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_SAMPLER_DESC* pDesc) final; Rc GetDXVKSampler() const { diff --git a/src/d3d11/d3d11_shader.h b/src/d3d11/d3d11_shader.h index 7b80464e..92a4a430 100644 --- a/src/d3d11/d3d11_shader.h +++ b/src/d3d11/d3d11_shader.h @@ -66,7 +66,7 @@ namespace dxvk { ~D3D11Shader() { } - HRESULT QueryInterface(REFIID riid, void** ppvObject) final { + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) final { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, Base); @@ -75,11 +75,11 @@ namespace dxvk { return E_NOINTERFACE; } - void GetDevice(ID3D11Device **ppDevice) final { + void STDMETHODCALLTYPE GetDevice(ID3D11Device **ppDevice) final { *ppDevice = m_device.ref(); } - Rc GetShader() const { + Rc STDMETHODCALLTYPE GetShader() const { return m_module.GetShader(); } diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index a33250ff..59a9c669 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -19,7 +19,7 @@ namespace dxvk { } - HRESULT D3D11Texture2D::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE D3D11Texture2D::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11Resource); @@ -34,29 +34,29 @@ namespace dxvk { } - void D3D11Texture2D::GetDevice(ID3D11Device** ppDevice) { + void STDMETHODCALLTYPE D3D11Texture2D::GetDevice(ID3D11Device** ppDevice) { *ppDevice = m_device.ref(); } - void D3D11Texture2D::GetType(D3D11_RESOURCE_DIMENSION *pResourceDimension) { + void STDMETHODCALLTYPE D3D11Texture2D::GetType(D3D11_RESOURCE_DIMENSION *pResourceDimension) { *pResourceDimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D; } - UINT D3D11Texture2D::GetEvictionPriority() { + UINT STDMETHODCALLTYPE D3D11Texture2D::GetEvictionPriority() { UINT EvictionPriority = DXGI_RESOURCE_PRIORITY_NORMAL; m_resource->GetEvictionPriority(&EvictionPriority); return EvictionPriority; } - void D3D11Texture2D::SetEvictionPriority(UINT EvictionPriority) { + void STDMETHODCALLTYPE D3D11Texture2D::SetEvictionPriority(UINT EvictionPriority) { m_resource->SetEvictionPriority(EvictionPriority); } - void D3D11Texture2D::GetDesc(D3D11_TEXTURE2D_DESC *pDesc) { + void STDMETHODCALLTYPE D3D11Texture2D::GetDesc(D3D11_TEXTURE2D_DESC *pDesc) { *pDesc = m_desc; } diff --git a/src/d3d11/d3d11_texture.h b/src/d3d11/d3d11_texture.h index 623542a8..9f5b3514 100644 --- a/src/d3d11/d3d11_texture.h +++ b/src/d3d11/d3d11_texture.h @@ -20,21 +20,21 @@ namespace dxvk { const D3D11_TEXTURE2D_DESC& desc); ~D3D11Texture2D(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - void GetDevice( + void STDMETHODCALLTYPE GetDevice( ID3D11Device **ppDevice) final; - void GetType( + void STDMETHODCALLTYPE GetType( D3D11_RESOURCE_DIMENSION *pResourceDimension) final; - UINT GetEvictionPriority() final; + UINT STDMETHODCALLTYPE GetEvictionPriority() final; - void SetEvictionPriority(UINT EvictionPriority) final; + void STDMETHODCALLTYPE SetEvictionPriority(UINT EvictionPriority) final; - void GetDesc( + void STDMETHODCALLTYPE GetDesc( D3D11_TEXTURE2D_DESC *pDesc) final; Rc GetDXVKImage(); diff --git a/src/d3d11/d3d11_view.h b/src/d3d11/d3d11_view.h index c9a6ca7a..4364a0ad 100644 --- a/src/d3d11/d3d11_view.h +++ b/src/d3d11/d3d11_view.h @@ -31,7 +31,7 @@ namespace dxvk { : m_device(device), m_resource(resource), m_desc(desc), m_bufferView(bufferView), m_imageView(imageView) { } - HRESULT QueryInterface(REFIID riid, void** ppvObject) final { + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject) final { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild); COM_QUERY_IFACE(riid, ppvObject, ID3D11View); @@ -41,15 +41,15 @@ namespace dxvk { return E_NOINTERFACE; } - void GetDevice(ID3D11Device** ppDevice) final { + void STDMETHODCALLTYPE GetDevice(ID3D11Device** ppDevice) final { *ppDevice = m_device.ref(); } - void GetResource(ID3D11Resource** ppResource) final { + void STDMETHODCALLTYPE GetResource(ID3D11Resource** ppResource) final { *ppResource = m_resource.ref(); } - void GetDesc(DescType* pDesc) final { + void STDMETHODCALLTYPE GetDesc(DescType* pDesc) final { *pDesc = m_desc; } diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index d9e6c686..64fa10ec 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -24,7 +24,7 @@ namespace dxvk { } - HRESULT DxgiAdapter::QueryInterface( + HRESULT STDMETHODCALLTYPE DxgiAdapter::QueryInterface( REFIID riid, void **ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); @@ -38,14 +38,14 @@ namespace dxvk { } - HRESULT DxgiAdapter::GetParent( + HRESULT STDMETHODCALLTYPE DxgiAdapter::GetParent( REFIID riid, void **ppParent) { return m_factory->QueryInterface(riid, ppParent); } - HRESULT DxgiAdapter::CheckInterfaceSupport( + HRESULT STDMETHODCALLTYPE DxgiAdapter::CheckInterfaceSupport( REFGUID InterfaceName, LARGE_INTEGER *pUMDVersion) { Logger::err("DxgiAdapter::CheckInterfaceSupport: No D3D10 support"); @@ -53,7 +53,7 @@ namespace dxvk { } - HRESULT DxgiAdapter::EnumOutputs( + HRESULT STDMETHODCALLTYPE DxgiAdapter::EnumOutputs( UINT Output, IDXGIOutput **ppOutput) { if (ppOutput == nullptr) @@ -74,7 +74,7 @@ namespace dxvk { } - HRESULT DxgiAdapter::GetDesc(DXGI_ADAPTER_DESC* pDesc) { + HRESULT STDMETHODCALLTYPE DxgiAdapter::GetDesc(DXGI_ADAPTER_DESC* pDesc) { DXGI_ADAPTER_DESC1 desc1; HRESULT hr = this->GetDesc1(&desc1); @@ -98,7 +98,7 @@ namespace dxvk { } - HRESULT DxgiAdapter::GetDesc1(DXGI_ADAPTER_DESC1* pDesc) { + HRESULT STDMETHODCALLTYPE DxgiAdapter::GetDesc1(DXGI_ADAPTER_DESC1* pDesc) { if (pDesc == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -133,12 +133,12 @@ namespace dxvk { } - Rc DxgiAdapter::GetDXVKAdapter() { + Rc STDMETHODCALLTYPE DxgiAdapter::GetDXVKAdapter() { return m_adapter; } - DxgiFormatPair DxgiAdapter::LookupFormat(DXGI_FORMAT format) { + DxgiFormatPair STDMETHODCALLTYPE DxgiAdapter::LookupFormat(DXGI_FORMAT format) { auto pair = m_formats.find(format); return pair != m_formats.end() diff --git a/src/dxgi/dxgi_adapter.h b/src/dxgi/dxgi_adapter.h index be61708c..242ad933 100644 --- a/src/dxgi/dxgi_adapter.h +++ b/src/dxgi/dxgi_adapter.h @@ -24,31 +24,31 @@ namespace dxvk { const Rc& adapter); ~DxgiAdapter(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void **ppParent) final; - HRESULT CheckInterfaceSupport( + HRESULT STDMETHODCALLTYPE CheckInterfaceSupport( REFGUID InterfaceName, LARGE_INTEGER *pUMDVersion) final; - HRESULT EnumOutputs( + HRESULT STDMETHODCALLTYPE EnumOutputs( UINT Output, IDXGIOutput **ppOutput) final; - HRESULT GetDesc( + HRESULT STDMETHODCALLTYPE GetDesc( DXGI_ADAPTER_DESC *pDesc) final; - HRESULT GetDesc1( + HRESULT STDMETHODCALLTYPE GetDesc1( DXGI_ADAPTER_DESC1 *pDesc) final; - Rc GetDXVKAdapter() final; + Rc STDMETHODCALLTYPE GetDXVKAdapter() final; - DxgiFormatPair LookupFormat( + DxgiFormatPair STDMETHODCALLTYPE LookupFormat( DXGI_FORMAT format) final; private: diff --git a/src/dxgi/dxgi_device.cpp b/src/dxgi/dxgi_device.cpp index 77a1680e..173fc2d5 100644 --- a/src/dxgi/dxgi_device.cpp +++ b/src/dxgi/dxgi_device.cpp @@ -16,7 +16,7 @@ namespace dxvk { } - HRESULT DxgiDevice::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE DxgiDevice::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice); @@ -31,12 +31,12 @@ namespace dxvk { } - HRESULT DxgiDevice::GetParent(REFIID riid, void** ppParent) { + HRESULT STDMETHODCALLTYPE DxgiDevice::GetParent(REFIID riid, void** ppParent) { return m_adapter->QueryInterface(riid, ppParent); } - HRESULT DxgiDevice::CreateSurface( + HRESULT STDMETHODCALLTYPE DxgiDevice::CreateSurface( const DXGI_SURFACE_DESC* pDesc, UINT NumSurfaces, DXGI_USAGE Usage, @@ -47,21 +47,21 @@ namespace dxvk { } - HRESULT DxgiDevice::GetAdapter( + HRESULT STDMETHODCALLTYPE DxgiDevice::GetAdapter( IDXGIAdapter** pAdapter) { *pAdapter = static_cast(m_adapter.ref()); return S_OK; } - HRESULT DxgiDevice::GetGPUThreadPriority( + HRESULT STDMETHODCALLTYPE DxgiDevice::GetGPUThreadPriority( INT* pPriority) { *pPriority = 0; return S_OK; } - HRESULT DxgiDevice::QueryResourceResidency( + HRESULT STDMETHODCALLTYPE DxgiDevice::QueryResourceResidency( IUnknown* const* ppResources, DXGI_RESIDENCY* pResidencyStatus, UINT NumResources) { @@ -70,7 +70,7 @@ namespace dxvk { } - HRESULT DxgiDevice::SetGPUThreadPriority( + HRESULT STDMETHODCALLTYPE DxgiDevice::SetGPUThreadPriority( INT Priority) { if (Priority < -7 || Priority > 7) return E_INVALIDARG; @@ -80,7 +80,7 @@ namespace dxvk { } - HRESULT DxgiDevice::GetMaximumFrameLatency( + HRESULT STDMETHODCALLTYPE DxgiDevice::GetMaximumFrameLatency( UINT* pMaxLatency) { Logger::warn("DxgiDevice::GetMaximumFrameLatency: Stub"); *pMaxLatency = 1; @@ -88,19 +88,19 @@ namespace dxvk { } - HRESULT DxgiDevice::SetMaximumFrameLatency( + HRESULT STDMETHODCALLTYPE DxgiDevice::SetMaximumFrameLatency( UINT MaxLatency) { Logger::warn("DxgiDevice::SetMaximumFrameLatency: Stub"); return S_OK; } - void DxgiDevice::SetDeviceLayer(IUnknown* layer) { + void STDMETHODCALLTYPE DxgiDevice::SetDeviceLayer(IUnknown* layer) { m_layer = layer; } - Rc DxgiDevice::GetDXVKDevice() { + Rc STDMETHODCALLTYPE DxgiDevice::GetDXVKDevice() { return m_device; } diff --git a/src/dxgi/dxgi_device.h b/src/dxgi/dxgi_device.h index be8e798e..41b1a6b4 100644 --- a/src/dxgi/dxgi_device.h +++ b/src/dxgi/dxgi_device.h @@ -18,45 +18,45 @@ namespace dxvk { const VkPhysicalDeviceFeatures* features); ~DxgiDevice(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void **ppParent) final; - HRESULT CreateSurface( + HRESULT STDMETHODCALLTYPE CreateSurface( const DXGI_SURFACE_DESC* pDesc, UINT NumSurfaces, DXGI_USAGE Usage, const DXGI_SHARED_RESOURCE* pSharedResource, IDXGISurface** ppSurface) final; - HRESULT GetAdapter( + HRESULT STDMETHODCALLTYPE GetAdapter( IDXGIAdapter** pAdapter) final; - HRESULT GetGPUThreadPriority( + HRESULT STDMETHODCALLTYPE GetGPUThreadPriority( INT* pPriority) final; - HRESULT QueryResourceResidency( + HRESULT STDMETHODCALLTYPE QueryResourceResidency( IUnknown* const* ppResources, DXGI_RESIDENCY* pResidencyStatus, UINT NumResources) final; - HRESULT SetGPUThreadPriority( + HRESULT STDMETHODCALLTYPE SetGPUThreadPriority( INT Priority) final; - HRESULT GetMaximumFrameLatency( + HRESULT STDMETHODCALLTYPE GetMaximumFrameLatency( UINT* pMaxLatency) final; - HRESULT SetMaximumFrameLatency( + HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency( UINT MaxLatency) final; - void SetDeviceLayer( + void STDMETHODCALLTYPE SetDeviceLayer( IUnknown* layer) final; - Rc GetDXVKDevice() final; + Rc STDMETHODCALLTYPE GetDXVKDevice() final; private: diff --git a/src/dxgi/dxgi_factory.cpp b/src/dxgi/dxgi_factory.cpp index 77f6fff8..54bc6e6a 100644 --- a/src/dxgi/dxgi_factory.cpp +++ b/src/dxgi/dxgi_factory.cpp @@ -15,7 +15,7 @@ namespace dxvk { } - HRESULT DxgiFactory::QueryInterface( + HRESULT STDMETHODCALLTYPE DxgiFactory::QueryInterface( REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); @@ -28,7 +28,7 @@ namespace dxvk { } - HRESULT DxgiFactory::GetParent( + HRESULT STDMETHODCALLTYPE DxgiFactory::GetParent( REFIID riid, void** ppParent) { Logger::warn("DxgiFactory::GetParent: Unknown interface query"); @@ -36,7 +36,7 @@ namespace dxvk { } - HRESULT DxgiFactory::CreateSoftwareAdapter( + HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSoftwareAdapter( HMODULE Module, IDXGIAdapter** ppAdapter) { Logger::err("DxgiFactory::CreateSoftwareAdapter: Software adapters not supported"); @@ -44,7 +44,7 @@ namespace dxvk { } - HRESULT DxgiFactory::CreateSwapChain( + HRESULT STDMETHODCALLTYPE DxgiFactory::CreateSwapChain( IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) { @@ -61,7 +61,7 @@ namespace dxvk { } - HRESULT DxgiFactory::EnumAdapters( + HRESULT STDMETHODCALLTYPE DxgiFactory::EnumAdapters( UINT Adapter, IDXGIAdapter** ppAdapter) { if (ppAdapter == nullptr) @@ -75,7 +75,7 @@ namespace dxvk { } - HRESULT DxgiFactory::EnumAdapters1( + HRESULT STDMETHODCALLTYPE DxgiFactory::EnumAdapters1( UINT Adapter, IDXGIAdapter1** ppAdapter) { if (ppAdapter == nullptr) @@ -90,7 +90,7 @@ namespace dxvk { } - HRESULT DxgiFactory::GetWindowAssociation(HWND *pWindowHandle) { + HRESULT STDMETHODCALLTYPE DxgiFactory::GetWindowAssociation(HWND *pWindowHandle) { if (pWindowHandle == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -99,14 +99,14 @@ namespace dxvk { } - HRESULT DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) { + HRESULT STDMETHODCALLTYPE DxgiFactory::MakeWindowAssociation(HWND WindowHandle, UINT Flags) { Logger::warn("DxgiFactory::MakeWindowAssociation: Ignoring flags"); m_associatedWindow = WindowHandle; return S_OK; } - BOOL DxgiFactory::IsCurrent() { + BOOL STDMETHODCALLTYPE DxgiFactory::IsCurrent() { Logger::warn("DxgiFactory::IsCurrent: Stub"); return TRUE; } diff --git a/src/dxgi/dxgi_factory.h b/src/dxgi/dxgi_factory.h index f72920a7..b0fc4d94 100644 --- a/src/dxgi/dxgi_factory.h +++ b/src/dxgi/dxgi_factory.h @@ -15,39 +15,39 @@ namespace dxvk { DxgiFactory(); ~DxgiFactory(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void** ppParent) final; - HRESULT CreateSoftwareAdapter( + HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter( HMODULE Module, IDXGIAdapter** ppAdapter) final; - HRESULT CreateSwapChain( + HRESULT STDMETHODCALLTYPE CreateSwapChain( IUnknown* pDevice, DXGI_SWAP_CHAIN_DESC* pDesc, IDXGISwapChain** ppSwapChain) final; - HRESULT EnumAdapters( + HRESULT STDMETHODCALLTYPE EnumAdapters( UINT Adapter, IDXGIAdapter** ppAdapter) final; - HRESULT EnumAdapters1( + HRESULT STDMETHODCALLTYPE EnumAdapters1( UINT Adapter, IDXGIAdapter1** ppAdapter) final; - HRESULT GetWindowAssociation( + HRESULT STDMETHODCALLTYPE GetWindowAssociation( HWND *pWindowHandle) final; - HRESULT MakeWindowAssociation( + HRESULT STDMETHODCALLTYPE MakeWindowAssociation( HWND WindowHandle, UINT Flags) final; - BOOL IsCurrent(); + BOOL STDMETHODCALLTYPE IsCurrent(); private: diff --git a/src/dxgi/dxgi_interfaces.h b/src/dxgi/dxgi_interfaces.h index c527aa22..9bdc0d81 100644 --- a/src/dxgi/dxgi_interfaces.h +++ b/src/dxgi/dxgi_interfaces.h @@ -37,9 +37,9 @@ MIDL_INTERFACE("907bf281-ea3c-43b4-a8e4-9f231107b4ff") IDXGIAdapterPrivate : public IDXGIAdapter1 { static const GUID guid; - virtual dxvk::Rc GetDXVKAdapter() = 0; + virtual dxvk::Rc STDMETHODCALLTYPE GetDXVKAdapter() = 0; - virtual dxvk::DxgiFormatPair LookupFormat( + virtual dxvk::DxgiFormatPair STDMETHODCALLTYPE LookupFormat( DXGI_FORMAT format) = 0; }; @@ -55,10 +55,10 @@ MIDL_INTERFACE("7a622cf6-627a-46b2-b52f-360ef3da831c") IDXGIDevicePrivate : public IDXGIDevice1 { static const GUID guid; - virtual void SetDeviceLayer( + virtual void STDMETHODCALLTYPE SetDeviceLayer( IUnknown* layer) = 0; - virtual dxvk::Rc GetDXVKDevice() = 0; + virtual dxvk::Rc STDMETHODCALLTYPE GetDXVKDevice() = 0; }; @@ -70,9 +70,9 @@ MIDL_INTERFACE("5679becd-8547-4d93-96a1-e61a1ce7ef37") IDXGIBufferResourcePrivate : public IDXGIResource { static const GUID guid; - virtual dxvk::Rc GetDXVKBuffer() = 0; + virtual dxvk::Rc STDMETHODCALLTYPE GetDXVKBuffer() = 0; - virtual void SetResourceLayer( + virtual void STDMETHODCALLTYPE SetResourceLayer( IUnknown* pLayer) = 0; }; @@ -85,9 +85,9 @@ MIDL_INTERFACE("1cfe6592-7de0-4a07-8dcb-4543cbbc6a7d") IDXGIImageResourcePrivate : public IDXGIResource { static const GUID guid; - virtual dxvk::Rc GetDXVKImage() = 0; + virtual dxvk::Rc STDMETHODCALLTYPE GetDXVKImage() = 0; - virtual void SetResourceLayer( + virtual void STDMETHODCALLTYPE SetResourceLayer( IUnknown* pLayer) = 0; }; @@ -114,7 +114,7 @@ IDXGIPresentDevicePrivate : public IUnknown { * \param [in] ppInterface Target interface * \returns \c S_OK on success */ - virtual HRESULT WrapSwapChainBackBuffer( + virtual HRESULT STDMETHODCALLTYPE WrapSwapChainBackBuffer( IDXGIImageResourcePrivate* pResource, const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, IUnknown** ppInterface) = 0; @@ -127,7 +127,7 @@ IDXGIPresentDevicePrivate : public IUnknown { * before presenting the swap chain's back buffer. * \returns \c S_OK on success */ - virtual HRESULT FlushRenderingCommands() = 0; + virtual HRESULT STDMETHODCALLTYPE FlushRenderingCommands() = 0; /** * \brief Underlying DXVK device @@ -136,7 +136,7 @@ IDXGIPresentDevicePrivate : public IUnknown { * \param [in] ppDevice device * \returns DXVK device handle */ - virtual HRESULT GetDevice( + virtual HRESULT STDMETHODCALLTYPE GetDevice( REFGUID riid, void** ppDevice) = 0; }; diff --git a/src/dxgi/dxgi_object.h b/src/dxgi/dxgi_object.h index c51b58ad..d837e363 100644 --- a/src/dxgi/dxgi_object.h +++ b/src/dxgi/dxgi_object.h @@ -11,7 +11,7 @@ namespace dxvk { public: - HRESULT GetPrivateData( + HRESULT STDMETHODCALLTYPE GetPrivateData( REFGUID Name, UINT *pDataSize, void *pData) final { @@ -19,7 +19,7 @@ namespace dxvk { Name, pDataSize, pData); } - HRESULT SetPrivateData( + HRESULT STDMETHODCALLTYPE SetPrivateData( REFGUID Name, UINT DataSize, const void *pData) final { @@ -27,7 +27,7 @@ namespace dxvk { Name, DataSize, pData); } - HRESULT SetPrivateDataInterface( + HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( REFGUID Name, const IUnknown *pUnknown) final { return m_privateData.setInterface( diff --git a/src/dxgi/dxgi_output.cpp b/src/dxgi/dxgi_output.cpp index cfd52689..545ad657 100644 --- a/src/dxgi/dxgi_output.cpp +++ b/src/dxgi/dxgi_output.cpp @@ -23,7 +23,7 @@ namespace dxvk { } - HRESULT DxgiOutput::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE DxgiOutput::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIOutput); @@ -33,14 +33,14 @@ namespace dxvk { } - HRESULT DxgiOutput::GetParent( + HRESULT STDMETHODCALLTYPE DxgiOutput::GetParent( REFIID riid, void **ppParent) { return m_adapter->QueryInterface(riid, ppParent); } - HRESULT DxgiOutput::FindClosestMatchingMode( + HRESULT STDMETHODCALLTYPE DxgiOutput::FindClosestMatchingMode( const DXGI_MODE_DESC *pModeToMatch, DXGI_MODE_DESC *pClosestMatch, IUnknown *pConcernedDevice) { @@ -49,7 +49,7 @@ namespace dxvk { } - HRESULT DxgiOutput::GetDesc(DXGI_OUTPUT_DESC *pDesc) { + HRESULT STDMETHODCALLTYPE DxgiOutput::GetDesc(DXGI_OUTPUT_DESC *pDesc) { if (pDesc == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -85,7 +85,7 @@ namespace dxvk { } - HRESULT DxgiOutput::GetDisplayModeList( + HRESULT STDMETHODCALLTYPE DxgiOutput::GetDisplayModeList( DXGI_FORMAT EnumFormat, UINT Flags, UINT *pNumModes, @@ -185,48 +185,48 @@ namespace dxvk { } - HRESULT DxgiOutput::GetDisplaySurfaceData(IDXGISurface *pDestination) { + HRESULT STDMETHODCALLTYPE DxgiOutput::GetDisplaySurfaceData(IDXGISurface *pDestination) { Logger::err("DxgiOutput::GetDisplaySurfaceData: Not implemented"); return E_NOTIMPL; } - HRESULT DxgiOutput::GetFrameStatistics(DXGI_FRAME_STATISTICS *pStats) { + HRESULT STDMETHODCALLTYPE DxgiOutput::GetFrameStatistics(DXGI_FRAME_STATISTICS *pStats) { Logger::err("DxgiOutput::GetFrameStatistics: Not implemented"); return E_NOTIMPL; } - HRESULT DxgiOutput::GetGammaControl(DXGI_GAMMA_CONTROL *pArray) { + HRESULT STDMETHODCALLTYPE DxgiOutput::GetGammaControl(DXGI_GAMMA_CONTROL *pArray) { Logger::err("DxgiOutput::GetGammaControl: Not implemented"); return E_NOTIMPL; } - HRESULT DxgiOutput::GetGammaControlCapabilities(DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) { + HRESULT STDMETHODCALLTYPE DxgiOutput::GetGammaControlCapabilities(DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) { Logger::err("DxgiOutput::GetGammaControlCapabilities: Not implemented"); return E_NOTIMPL; } - void DxgiOutput::ReleaseOwnership() { + void STDMETHODCALLTYPE DxgiOutput::ReleaseOwnership() { Logger::warn("DxgiOutput::ReleaseOwnership: Stub"); } - HRESULT DxgiOutput::SetDisplaySurface(IDXGISurface *pScanoutSurface) { + HRESULT STDMETHODCALLTYPE DxgiOutput::SetDisplaySurface(IDXGISurface *pScanoutSurface) { Logger::err("DxgiOutput::SetDisplaySurface: Not implemented"); return E_NOTIMPL; } - HRESULT DxgiOutput::SetGammaControl(const DXGI_GAMMA_CONTROL *pArray) { + HRESULT STDMETHODCALLTYPE DxgiOutput::SetGammaControl(const DXGI_GAMMA_CONTROL *pArray) { Logger::err("DxgiOutput::SetGammaControl: Not implemented"); return E_NOTIMPL; } - HRESULT DxgiOutput::TakeOwnership( + HRESULT STDMETHODCALLTYPE DxgiOutput::TakeOwnership( IUnknown *pDevice, BOOL Exclusive) { Logger::warn("DxgiOutput::TakeOwnership: Stub"); @@ -234,7 +234,7 @@ namespace dxvk { } - HRESULT DxgiOutput::WaitForVBlank() { + HRESULT STDMETHODCALLTYPE DxgiOutput::WaitForVBlank() { Logger::warn("DxgiOutput::WaitForVBlank: Stub"); return S_OK; } diff --git a/src/dxgi/dxgi_output.h b/src/dxgi/dxgi_output.h index e92a96f5..d30ea768 100644 --- a/src/dxgi/dxgi_output.h +++ b/src/dxgi/dxgi_output.h @@ -16,53 +16,53 @@ namespace dxvk { ~DxgiOutput(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void **ppParent) final; - HRESULT FindClosestMatchingMode( + HRESULT STDMETHODCALLTYPE FindClosestMatchingMode( const DXGI_MODE_DESC *pModeToMatch, DXGI_MODE_DESC *pClosestMatch, IUnknown *pConcernedDevice) final; - HRESULT GetDesc( + HRESULT STDMETHODCALLTYPE GetDesc( DXGI_OUTPUT_DESC *pDesc) final; - HRESULT GetDisplayModeList( + HRESULT STDMETHODCALLTYPE GetDisplayModeList( DXGI_FORMAT EnumFormat, UINT Flags, UINT *pNumModes, DXGI_MODE_DESC *pDesc) final; - HRESULT GetDisplaySurfaceData( + HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData( IDXGISurface *pDestination) final; - HRESULT GetFrameStatistics( + HRESULT STDMETHODCALLTYPE GetFrameStatistics( DXGI_FRAME_STATISTICS *pStats) final; - HRESULT GetGammaControl( + HRESULT STDMETHODCALLTYPE GetGammaControl( DXGI_GAMMA_CONTROL *pArray) final; - HRESULT GetGammaControlCapabilities( + HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities( DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) final; - void ReleaseOwnership() final; + void STDMETHODCALLTYPE ReleaseOwnership() final; - HRESULT SetDisplaySurface( + HRESULT STDMETHODCALLTYPE SetDisplaySurface( IDXGISurface *pScanoutSurface) final; - HRESULT SetGammaControl( + HRESULT STDMETHODCALLTYPE SetGammaControl( const DXGI_GAMMA_CONTROL *pArray) final; - HRESULT TakeOwnership( + HRESULT STDMETHODCALLTYPE TakeOwnership( IUnknown *pDevice, BOOL Exclusive) final; - HRESULT WaitForVBlank() final; + HRESULT STDMETHODCALLTYPE WaitForVBlank() final; private: diff --git a/src/dxgi/dxgi_resource.cpp b/src/dxgi/dxgi_resource.cpp index 6525de70..e14eafc4 100644 --- a/src/dxgi/dxgi_resource.cpp +++ b/src/dxgi/dxgi_resource.cpp @@ -27,7 +27,7 @@ namespace dxvk { } - HRESULT DxgiImageResource::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE DxgiImageResource::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIDeviceSubObject); @@ -42,18 +42,18 @@ namespace dxvk { } - HRESULT DxgiImageResource::GetParent(REFIID riid, void** ppParent) { + HRESULT STDMETHODCALLTYPE DxgiImageResource::GetParent(REFIID riid, void** ppParent) { Logger::err("DxgiImageResource::GetParent: Unknown interface query"); return E_NOINTERFACE; } - Rc DxgiImageResource::GetDXVKImage() { + Rc STDMETHODCALLTYPE DxgiImageResource::GetDXVKImage() { return m_image; } - void DxgiImageResource::SetResourceLayer(IUnknown* pLayer) { + void STDMETHODCALLTYPE DxgiImageResource::SetResourceLayer(IUnknown* pLayer) { m_layer = pLayer; } @@ -76,7 +76,7 @@ namespace dxvk { } - HRESULT DxgiBufferResource::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE DxgiBufferResource::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIDeviceSubObject); @@ -91,18 +91,18 @@ namespace dxvk { } - HRESULT DxgiBufferResource::GetParent(REFIID riid, void** ppParent) { + HRESULT STDMETHODCALLTYPE DxgiBufferResource::GetParent(REFIID riid, void** ppParent) { Logger::err("DxgiBufferResource::GetParent: Unknown interface query"); return E_NOINTERFACE; } - Rc DxgiBufferResource::GetDXVKBuffer() { + Rc STDMETHODCALLTYPE DxgiBufferResource::GetDXVKBuffer() { return m_buffer; } - void DxgiBufferResource::SetResourceLayer(IUnknown* pLayer) { + void STDMETHODCALLTYPE DxgiBufferResource::SetResourceLayer(IUnknown* pLayer) { m_layer = pLayer; } diff --git a/src/dxgi/dxgi_resource.h b/src/dxgi/dxgi_resource.h index e67f5721..dc9087a0 100644 --- a/src/dxgi/dxgi_resource.h +++ b/src/dxgi/dxgi_resource.h @@ -18,7 +18,7 @@ namespace dxvk { : m_device (pDevice), m_usageFlags(usage) { } - HRESULT GetDevice(REFIID riid, void** ppDevice) { + HRESULT STDMETHODCALLTYPE GetDevice(REFIID riid, void** ppDevice) { return m_device->QueryInterface(riid, ppDevice); } @@ -81,17 +81,17 @@ namespace dxvk { ~DxgiImageResource(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void **ppParent) final; - Rc GetDXVKImage() final; + Rc STDMETHODCALLTYPE GetDXVKImage() final; - void SetResourceLayer( + void STDMETHODCALLTYPE SetResourceLayer( IUnknown* pLayer) final; private: @@ -120,17 +120,17 @@ namespace dxvk { ~DxgiBufferResource(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void **ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void **ppParent) final; - Rc GetDXVKBuffer() final; + Rc STDMETHODCALLTYPE GetDXVKBuffer() final; - void SetResourceLayer( + void STDMETHODCALLTYPE SetResourceLayer( IUnknown* pLayer) final; private: diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 252dd868..a0ba3eed 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -70,7 +70,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::QueryInterface(REFIID riid, void** ppvObject) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::QueryInterface(REFIID riid, void** ppvObject) { COM_QUERY_IFACE(riid, ppvObject, IUnknown); COM_QUERY_IFACE(riid, ppvObject, IDXGIObject); COM_QUERY_IFACE(riid, ppvObject, IDXGIDeviceSubObject); @@ -81,17 +81,17 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetParent(REFIID riid, void** ppParent) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetParent(REFIID riid, void** ppParent) { return m_factory->QueryInterface(riid, ppParent); } - HRESULT DxgiSwapChain::GetDevice(REFIID riid, void** ppDevice) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetDevice(REFIID riid, void** ppDevice) { return m_device->QueryInterface(riid, ppDevice); } - HRESULT DxgiSwapChain::GetBuffer(UINT Buffer, REFIID riid, void** ppSurface) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetBuffer(UINT Buffer, REFIID riid, void** ppSurface) { std::lock_guard lock(m_mutex); if (Buffer > 0) { @@ -103,7 +103,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetContainingOutput(IDXGIOutput** ppOutput) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetContainingOutput(IDXGIOutput** ppOutput) { if (ppOutput != nullptr) return DXGI_ERROR_INVALID_CALL; @@ -122,7 +122,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetDesc(DXGI_SWAP_CHAIN_DESC* pDesc) { if (pDesc == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -132,7 +132,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetFrameStatistics(DXGI_FRAME_STATISTICS* pStats) { if (pStats == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -142,7 +142,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetFullscreenState( + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetFullscreenState( BOOL* pFullscreen, IDXGIOutput** ppTarget) { std::lock_guard lock(m_mutex); @@ -159,7 +159,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::GetLastPresentCount(UINT* pLastPresentCount) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::GetLastPresentCount(UINT* pLastPresentCount) { if (pLastPresentCount == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -169,7 +169,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::Present(UINT SyncInterval, UINT Flags) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present(UINT SyncInterval, UINT Flags) { std::lock_guard lock(m_mutex); try { @@ -188,7 +188,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::ResizeBuffers( + HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeBuffers( UINT BufferCount, UINT Width, UINT Height, @@ -223,7 +223,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::ResizeTarget(const DXGI_MODE_DESC* pNewTargetParameters) { + HRESULT STDMETHODCALLTYPE DxgiSwapChain::ResizeTarget(const DXGI_MODE_DESC* pNewTargetParameters) { if (pNewTargetParameters == nullptr) return DXGI_ERROR_INVALID_CALL; @@ -265,7 +265,7 @@ namespace dxvk { } - HRESULT DxgiSwapChain::SetFullscreenState( + HRESULT STDMETHODCALLTYPE DxgiSwapChain::SetFullscreenState( BOOL Fullscreen, IDXGIOutput* pTarget) { std::lock_guard lock(m_mutex); diff --git a/src/dxgi/dxgi_swapchain.h b/src/dxgi/dxgi_swapchain.h index 7a642cd1..1dd632d8 100644 --- a/src/dxgi/dxgi_swapchain.h +++ b/src/dxgi/dxgi_swapchain.h @@ -28,54 +28,54 @@ namespace dxvk { DXGI_SWAP_CHAIN_DESC* pDesc); ~DxgiSwapChain(); - HRESULT QueryInterface( + HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, void** ppvObject) final; - HRESULT GetParent( + HRESULT STDMETHODCALLTYPE GetParent( REFIID riid, void** ppParent) final; - HRESULT GetDevice( + HRESULT STDMETHODCALLTYPE GetDevice( REFIID riid, void** ppDevice) final; - HRESULT GetBuffer( + HRESULT STDMETHODCALLTYPE GetBuffer( UINT Buffer, REFIID riid, void** ppSurface) final; - HRESULT GetContainingOutput( + HRESULT STDMETHODCALLTYPE GetContainingOutput( IDXGIOutput **ppOutput) final; - HRESULT GetDesc( + HRESULT STDMETHODCALLTYPE GetDesc( DXGI_SWAP_CHAIN_DESC *pDesc) final; - HRESULT GetFrameStatistics( + HRESULT STDMETHODCALLTYPE GetFrameStatistics( DXGI_FRAME_STATISTICS *pStats) final; - HRESULT GetFullscreenState( + HRESULT STDMETHODCALLTYPE GetFullscreenState( BOOL *pFullscreen, IDXGIOutput **ppTarget) final; - HRESULT GetLastPresentCount( + HRESULT STDMETHODCALLTYPE GetLastPresentCount( UINT *pLastPresentCount) final; - HRESULT Present( + HRESULT STDMETHODCALLTYPE Present( UINT SyncInterval, UINT Flags) final; - HRESULT ResizeBuffers( + HRESULT STDMETHODCALLTYPE ResizeBuffers( UINT BufferCount, UINT Width, UINT Height, DXGI_FORMAT NewFormat, UINT SwapChainFlags) final; - HRESULT ResizeTarget( + HRESULT STDMETHODCALLTYPE ResizeTarget( const DXGI_MODE_DESC *pNewTargetParameters) final; - HRESULT SetFullscreenState( + HRESULT STDMETHODCALLTYPE SetFullscreenState( BOOL Fullscreen, IDXGIOutput *pTarget) final; diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index d0012824..12453412 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -172,7 +172,16 @@ namespace dxvk { Rc DxvkDevice::createSwapchain( const Rc& surface, const DxvkSwapchainProperties& properties) { - return new DxvkSwapchain(this, surface, properties, m_presentQueue); + return new DxvkSwapchain(this, surface, properties); + } + + + VkResult DxvkDevice::presentSwapImage( + const VkPresentInfoKHR& presentInfo) { + m_statCounters.increment(DxvkStat::DevQueuePresents, 1); + + std::lock_guard lock(m_submissionLock); + return m_vkd->vkQueuePresentKHR(m_presentQueue, &presentInfo); } @@ -195,8 +204,11 @@ namespace dxvk { commandList->trackResource(wakeSync); } - commandList->submit(m_graphicsQueue, - waitSemaphore, wakeSemaphore, fence->handle()); + { // Queue submissions are not thread safe + std::lock_guard lock(m_submissionLock); + commandList->submit(m_graphicsQueue, + waitSemaphore, wakeSemaphore, fence->handle()); + } // TODO Delay synchronization by putting these into a ring buffer fence->wait(std::numeric_limits::max()); diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index be091c9a..27babc6e 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -234,6 +234,17 @@ namespace dxvk { const Rc& surface, const DxvkSwapchainProperties& properties); + /** + * \brief Presents a swap chain image + * + * This is implicitly called by the swap chain class + * when presenting an image. Do not use this directly. + * \param [in] presentInfo Swap image present info + * \returns Present status + */ + VkResult presentSwapImage( + const VkPresentInfoKHR& presentInfo); + /** * \brief Submits a command list * @@ -276,6 +287,7 @@ namespace dxvk { Rc m_renderPassPool; Rc m_pipelineManager; + std::mutex m_submissionLock; VkQueue m_graphicsQueue = VK_NULL_HANDLE; VkQueue m_presentQueue = VK_NULL_HANDLE; diff --git a/src/dxvk/dxvk_swapchain.cpp b/src/dxvk/dxvk_swapchain.cpp index f799993e..581ffd21 100644 --- a/src/dxvk/dxvk_swapchain.cpp +++ b/src/dxvk/dxvk_swapchain.cpp @@ -10,12 +10,10 @@ namespace dxvk { DxvkSwapchain::DxvkSwapchain( const Rc& device, const Rc& surface, - const DxvkSwapchainProperties& properties, - VkQueue queue) + const DxvkSwapchainProperties& properties) : m_device (device), m_vkd (device->vkd()), m_surface (surface), - m_queue (queue), m_properties(properties) { this->recreateSwapchain(); } @@ -58,7 +56,7 @@ namespace dxvk { info.pImageIndices = &m_imageIndex; info.pResults = nullptr; - VkResult status = m_vkd->vkQueuePresentKHR(m_queue, &info); + VkResult status = m_device->presentSwapImage(info); if (status != VK_SUCCESS && status != VK_SUBOPTIMAL_KHR diff --git a/src/dxvk/dxvk_swapchain.h b/src/dxvk/dxvk_swapchain.h index a495510a..a6c5984b 100644 --- a/src/dxvk/dxvk_swapchain.h +++ b/src/dxvk/dxvk_swapchain.h @@ -31,8 +31,7 @@ namespace dxvk { DxvkSwapchain( const Rc& device, const Rc& surface, - const DxvkSwapchainProperties& properties, - VkQueue queue); + const DxvkSwapchainProperties& properties); ~DxvkSwapchain(); /** @@ -74,8 +73,6 @@ namespace dxvk { Rc m_vkd; Rc m_surface; - VkQueue m_queue; - DxvkSwapchainProperties m_properties; VkSwapchainKHR m_handle = VK_NULL_HANDLE; uint32_t m_imageIndex = 0; diff --git a/src/util/com/com_object.h b/src/util/com/com_object.h index 2bb2fa9f..cfb3fe28 100644 --- a/src/util/com/com_object.h +++ b/src/util/com/com_object.h @@ -22,11 +22,11 @@ namespace dxvk { virtual ~ComObject() { } - ULONG AddRef() { + ULONG STDMETHODCALLTYPE AddRef() { return ++m_refCount; } - ULONG Release() { + ULONG STDMETHODCALLTYPE Release() { ULONG refCount = --m_refCount; if (refCount == 0) { m_refCount += 0x80000000u; diff --git a/tests/meson.build b/tests/meson.build index b6efa377..096cbfdd 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,7 +1,3 @@ -lib_d3d11 = dxvk_compiler.find_library('d3d11') -lib_dxgi = dxvk_compiler.find_library('dxgi') -lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47') - subdir('d3d11') subdir('dxbc') subdir('dxgi')