1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[util] Add stubs for shared resources on other platforms

This commit is contained in:
Joshua Ashton 2022-08-09 12:05:47 +01:00 committed by Joshie
parent 8c3a44cac4
commit d9000485ea

View File

@ -1,9 +1,13 @@
#include "util_shared_res.h"
#include "log/log.h"
#include "winioctl.h"
#ifdef _WIN32
#include <winioctl.h>
#endif
namespace dxvk {
#ifdef _WIN32
#define IOCTL_SHARED_GPU_RESOURCE_OPEN CTL_CODE(FILE_DEVICE_VIDEO, 1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
HANDLE openKmtHandle(HANDLE kmt_handle) {
@ -42,5 +46,21 @@ namespace dxvk {
*metadataSize = retSize;
return ret;
}
#else
HANDLE openKmtHandle(HANDLE kmt_handle) {
Logger::warn("openKmtHandle: Shared resources not available on this platform.");
return INVALID_HANDLE_VALUE;
}
bool setSharedMetadata(HANDLE handle, void *buf, uint32_t bufSize) {
Logger::warn("setSharedMetadata: Shared resources not available on this platform.");
return false;
}
bool getSharedMetadata(HANDLE handle, void *buf, uint32_t bufSize, uint32_t *metadataSize) {
Logger::warn("getSharedMetadata: Shared resources not available on this platform.");
return false;
}
#endif
}