Skip to content

Commit

Permalink
[d3d9] Move GetInstanceExtensions to ID3D9VkInteropInterface1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpyneDreams committed Dec 6, 2024
1 parent 76b9742 commit 7cca3bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/d3d9/d3d9_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ namespace dxvk {
return S_OK;
}

if (riid == __uuidof(ID3D9VkInteropInterface1)) {
*ppvObject = ref(&m_d3d9Interop);
return S_OK;
}

if (logQueryInterfaceError(__uuidof(IDirect3D9), riid)) {
Logger::warn("D3D9InterfaceEx::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid));
Expand Down
10 changes: 10 additions & 0 deletions src/d3d9/d3d9_interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,16 @@ ID3D9VkInteropInterface : public IUnknown {
virtual void STDMETHODCALLTYPE GetPhysicalDeviceHandle(
UINT Adapter,
VkPhysicalDevice* pPhysicalDevice) = 0;
};

/**
* \brief D3D9 interface for Vulkan interop - extended
*
* Provides access to the instance extension lists
* and everything provided by ID3D9VkInteropInterface
*/
MIDL_INTERFACE("d6589ed4-7a37-4096-bac2-223b25ae31d2")
ID3D9VkInteropInterface1 : public ID3D9VkInteropInterface {
/**
* \brief Gets a list of enabled instance extensions
*
Expand Down Expand Up @@ -274,6 +283,7 @@ ID3D9VkExtSwapchain : public IUnknown {

#ifndef _MSC_VER
__CRT_UUID_DECL(ID3D9VkInteropInterface, 0x3461a81b,0xce41,0x485b,0xb6,0xb5,0xfc,0xf0,0x8b,0xa6,0xa6,0xbd);
__CRT_UUID_DECL(ID3D9VkInteropInterface1, 0xd6589ed4,0x7a37,0x4096,0xba,0xc2,0x22,0x3b,0x25,0xae,0x31,0xd2);
__CRT_UUID_DECL(ID3D9VkInteropTexture, 0xd56344f5,0x8d35,0x46fd,0x80,0x6d,0x94,0xc3,0x51,0xb4,0x72,0xc1);
__CRT_UUID_DECL(ID3D9VkInteropDevice, 0x2eaa4b89,0x0107,0x4bdb,0x87,0xf7,0x0f,0x54,0x1c,0x49,0x3c,0xe0);
__CRT_UUID_DECL(ID3D9VkExtSwapchain, 0x13776e93,0x4aa9,0x430a,0xa4,0xec,0xfe,0x9e,0x28,0x11,0x81,0xd5);
Expand Down
2 changes: 1 addition & 1 deletion src/d3d9/d3d9_interop.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace dxvk {
class D3D9DeviceEx;
struct D3D9_COMMON_TEXTURE_DESC;

class D3D9VkInteropInterface final : public ID3D9VkInteropInterface {
class D3D9VkInteropInterface final : public ID3D9VkInteropInterface1 {

public:

Expand Down

0 comments on commit 7cca3bd

Please sign in to comment.