mirror of
https://github.com/libretro/RetroArch
synced 2025-03-21 04:21:13 +00:00
Add HAVE_D3D11 to MSVC 2013 - we need non-HAVE_DYNAMIC codepaths
for D3D11
This commit is contained in:
parent
81c8fc891a
commit
03e800c1c8
@ -15,9 +15,11 @@
|
||||
|
||||
#include "d3d11_common.h"
|
||||
#include "d3dcompiler_common.h"
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#include <dynamic/dylib.h>
|
||||
|
||||
static dylib_t d3d11_dll;
|
||||
#endif
|
||||
|
||||
HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
IDXGIAdapter* pAdapter,
|
||||
@ -35,6 +37,7 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
{
|
||||
static PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN fp;
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
if (!d3d11_dll)
|
||||
d3d11_dll = dylib_load("d3d11.dll");
|
||||
|
||||
@ -44,6 +47,9 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
if (!fp)
|
||||
fp = (PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)dylib_proc(
|
||||
d3d11_dll, "D3D11CreateDeviceAndSwapChain");
|
||||
#else
|
||||
fp = D3D11CreateDeviceAndSwapChain;
|
||||
#endif
|
||||
|
||||
if (!fp)
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
@ -83,12 +89,11 @@ void d3d11_init_texture(D3D11Device device, d3d11_texture_t* texture)
|
||||
D3D11CreateTexture2D(device, &texture->desc, NULL, &texture->handle);
|
||||
|
||||
{
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC view_desc = {
|
||||
.Format = texture->desc.Format,
|
||||
.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D,
|
||||
.Texture2D.MostDetailedMip = 0,
|
||||
.Texture2D.MipLevels = -1,
|
||||
};
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC view_desc = { 0 };
|
||||
view_desc.Format = texture->desc.Format;
|
||||
view_desc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;
|
||||
view_desc.Texture2D.MostDetailedMip = 0;
|
||||
view_desc.Texture2D.MipLevels = -1;
|
||||
D3D11CreateTexture2DShaderResourceView(device, texture->handle, &view_desc, &texture->view);
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,11 +14,14 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_DYNAMIC
|
||||
#include <dynamic/dylib.h>
|
||||
#endif
|
||||
|
||||
#include "gfx/common/d3dcompiler_common.h"
|
||||
#include "verbosity.h"
|
||||
#include "d3dcompiler_common.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
static dylib_t d3dcompiler_dll;
|
||||
static const char* d3dcompiler_dll_list[] = {
|
||||
"D3DCompiler_47.dll", "D3DCompiler_46.dll", "D3DCompiler_45.dll", "D3DCompiler_44.dll",
|
||||
@ -26,6 +29,7 @@ static const char* d3dcompiler_dll_list[] = {
|
||||
"D3DCompiler_39.dll", "D3DCompiler_38.dll", "D3DCompiler_37.dll", "D3DCompiler_36.dll",
|
||||
"D3DCompiler_35.dll", "D3DCompiler_34.dll", "D3DCompiler_33.dll", NULL,
|
||||
};
|
||||
#endif
|
||||
|
||||
HRESULT WINAPI D3DCompile(
|
||||
LPCVOID pSrcData,
|
||||
@ -40,22 +44,28 @@ HRESULT WINAPI D3DCompile(
|
||||
ID3DBlob** ppCode,
|
||||
ID3DBlob** ppErrorMsgs)
|
||||
{
|
||||
static pD3DCompile fp;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
const char** dll_name = d3dcompiler_dll_list;
|
||||
while (!d3dcompiler_dll && *dll_name)
|
||||
d3dcompiler_dll = dylib_load(*dll_name++);
|
||||
|
||||
if (d3dcompiler_dll)
|
||||
{
|
||||
static pD3DCompile fp;
|
||||
if (!fp)
|
||||
fp = (pD3DCompile)dylib_proc(d3dcompiler_dll, "D3DCompile");
|
||||
if (!d3dcompiler_dll)
|
||||
goto error;
|
||||
|
||||
if (fp)
|
||||
return fp(
|
||||
pSrcData, SrcDataSize, pSourceName, pDefines, pInclude, pEntrypoint, pTarget, Flags1,
|
||||
Flags2, ppCode, ppErrorMsgs);
|
||||
}
|
||||
if (!fp)
|
||||
fp = (pD3DCompile)dylib_proc(d3dcompiler_dll, "D3DCompile");
|
||||
#else
|
||||
fp = D3DCompile;
|
||||
#endif
|
||||
if (fp)
|
||||
return fp(
|
||||
pSrcData, SrcDataSize, pSourceName, pDefines, pInclude, pEntrypoint, pTarget, Flags1,
|
||||
Flags2, ppCode, ppErrorMsgs);
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
error:
|
||||
#endif
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
}
|
||||
|
||||
@ -70,26 +80,33 @@ HRESULT WINAPI D3DCompileFromFile(
|
||||
ID3DBlob** ppCode,
|
||||
ID3DBlob** ppErrorMsgs)
|
||||
{
|
||||
typedef HRESULT(WINAPI * pD3DCompileFromFile)(
|
||||
LPCWSTR pFileName, const D3D_SHADER_MACRO* pDefines, ID3DInclude* pInclude,
|
||||
LPCSTR pEntrypoint, LPCSTR pTarget, UINT Flags1, UINT Flags2, ID3DBlob** ppCode,
|
||||
ID3DBlob** ppErrorMsgs);
|
||||
static pD3DCompileFromFile fp;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
const char** dll_name = d3dcompiler_dll_list;
|
||||
while (!d3dcompiler_dll && *dll_name)
|
||||
d3dcompiler_dll = dylib_load(*dll_name++);
|
||||
|
||||
if (d3dcompiler_dll)
|
||||
{
|
||||
typedef HRESULT(WINAPI * pD3DCompileFromFile)(
|
||||
LPCWSTR pFileName, const D3D_SHADER_MACRO* pDefines, ID3DInclude* pInclude,
|
||||
LPCSTR pEntrypoint, LPCSTR pTarget, UINT Flags1, UINT Flags2, ID3DBlob** ppCode,
|
||||
ID3DBlob** ppErrorMsgs);
|
||||
static pD3DCompileFromFile fp;
|
||||
if (!fp)
|
||||
fp = (pD3DCompileFromFile)dylib_proc(d3dcompiler_dll, "D3DCompileFromFile");
|
||||
if (!d3dcompiler_dll)
|
||||
goto error;
|
||||
|
||||
if (fp)
|
||||
return fp(
|
||||
if (!fp)
|
||||
fp = (pD3DCompileFromFile)dylib_proc(d3dcompiler_dll, "D3DCompileFromFile");
|
||||
#else
|
||||
fp = D3DCompileFromFile;
|
||||
#endif
|
||||
|
||||
if (fp)
|
||||
return fp(
|
||||
pFileName, pDefines, pInclude, pEntrypoint, pTarget, Flags1, Flags2, ppCode,
|
||||
ppErrorMsgs);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
error:
|
||||
#endif
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <retro_inline.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 475
|
||||
#define _In_
|
||||
@ -39,14 +41,14 @@
|
||||
#ifndef COM_RELEASE_DECLARED
|
||||
#define COM_RELEASE_DECLARED
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
static inline ULONG Release(IUnknown* object)
|
||||
static INLINE ULONG Release(IUnknown* object)
|
||||
{
|
||||
if (object)
|
||||
return object->Release();
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline ULONG Release(void* object)
|
||||
static INLINE ULONG Release(void* object)
|
||||
{
|
||||
if (object)
|
||||
return ((IUnknown*)object)->lpVtbl->Release(object);
|
||||
@ -60,17 +62,17 @@ static inline ULONG Release(void* object)
|
||||
typedef ID3DBlob* D3DBlob;
|
||||
typedef ID3DDestructionNotifier* D3DDestructionNotifier;
|
||||
|
||||
static inline ULONG D3DReleaseBlob(D3DBlob blob) { return blob->lpVtbl->Release(blob); }
|
||||
static inline LPVOID D3DGetBufferPointer(D3DBlob blob)
|
||||
static INLINE ULONG D3DReleaseBlob(D3DBlob blob) { return blob->lpVtbl->Release(blob); }
|
||||
static INLINE LPVOID D3DGetBufferPointer(D3DBlob blob)
|
||||
{
|
||||
return blob->lpVtbl->GetBufferPointer(blob);
|
||||
}
|
||||
static inline SIZE_T D3DGetBufferSize(D3DBlob blob) { return blob->lpVtbl->GetBufferSize(blob); }
|
||||
static inline ULONG D3DReleaseDestructionNotifier(D3DDestructionNotifier destruction_notifier)
|
||||
static INLINE SIZE_T D3DGetBufferSize(D3DBlob blob) { return blob->lpVtbl->GetBufferSize(blob); }
|
||||
static INLINE ULONG D3DReleaseDestructionNotifier(D3DDestructionNotifier destruction_notifier)
|
||||
{
|
||||
return destruction_notifier->lpVtbl->Release(destruction_notifier);
|
||||
}
|
||||
static inline HRESULT D3DRegisterDestructionCallback(
|
||||
static INLINE HRESULT D3DRegisterDestructionCallback(
|
||||
D3DDestructionNotifier destruction_notifier,
|
||||
PFN_DESTRUCTION_CALLBACK callback_fn,
|
||||
void* data,
|
||||
@ -79,7 +81,7 @@ static inline HRESULT D3DRegisterDestructionCallback(
|
||||
return destruction_notifier->lpVtbl->RegisterDestructionCallback(
|
||||
destruction_notifier, callback_fn, data, callback_id);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
D3DUnregisterDestructionCallback(D3DDestructionNotifier destruction_notifier, UINT callback_id)
|
||||
{
|
||||
return destruction_notifier->lpVtbl->UnregisterDestructionCallback(
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
HRESULT WINAPI CreateDXGIFactory1(REFIID riid, void** ppFactory)
|
||||
{
|
||||
static dylib_t dxgi_dll;
|
||||
static HRESULT(WINAPI * fp)(REFIID, void**);
|
||||
#ifdef HAVE_DYNAMIC
|
||||
static dylib_t dxgi_dll;
|
||||
|
||||
if (!dxgi_dll)
|
||||
dxgi_dll = dylib_load("dxgi.dll");
|
||||
@ -31,6 +32,9 @@ HRESULT WINAPI CreateDXGIFactory1(REFIID riid, void** ppFactory)
|
||||
|
||||
if (!fp)
|
||||
fp = (HRESULT(WINAPI*)(REFIID, void**))dylib_proc(dxgi_dll, "CreateDXGIFactory1");
|
||||
#else
|
||||
fp = CreateDXGIFactory1;
|
||||
#endif
|
||||
|
||||
if (!fp)
|
||||
return TYPE_E_CANTLOADLIBRARY;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <retro_inline.h>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 475
|
||||
#define _In_
|
||||
@ -24,7 +26,7 @@
|
||||
#ifndef COM_RELEASE_DECLARED
|
||||
#define COM_RELEASE_DECLARED
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
static inline ULONG Release(IUnknown* object)
|
||||
static INLINE ULONG Release(IUnknown* object)
|
||||
{
|
||||
if (object)
|
||||
return object->Release();
|
||||
@ -32,7 +34,7 @@ static inline ULONG Release(IUnknown* object)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline ULONG Release(void* object)
|
||||
static INLINE ULONG Release(void* object)
|
||||
{
|
||||
if (object)
|
||||
return ((IUnknown*)object)->lpVtbl->Release(object);
|
||||
@ -60,62 +62,62 @@ typedef IDXGIFactoryMedia* DXGIFactoryMedia;
|
||||
typedef IDXGISwapChainMedia* DXGISwapChainMedia;
|
||||
typedef IDXGISwapChain3* DXGISwapChain;
|
||||
|
||||
static inline ULONG DXGIReleaseDeviceSubObject(DXGIDeviceSubObject device_sub_object)
|
||||
static INLINE ULONG DXGIReleaseDeviceSubObject(DXGIDeviceSubObject device_sub_object)
|
||||
{
|
||||
return device_sub_object->lpVtbl->Release(device_sub_object);
|
||||
}
|
||||
static inline HRESULT DXGIGetSharedHandle(void* resource, HANDLE* shared_handle)
|
||||
static INLINE HRESULT DXGIGetSharedHandle(void* resource, HANDLE* shared_handle)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetSharedHandle(resource, shared_handle);
|
||||
}
|
||||
static inline HRESULT DXGIGetUsage(void* resource, DXGI_USAGE* usage)
|
||||
static INLINE HRESULT DXGIGetUsage(void* resource, DXGI_USAGE* usage)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetUsage(resource, usage);
|
||||
}
|
||||
static inline HRESULT DXGISetEvictionPriority(void* resource, UINT eviction_priority)
|
||||
static INLINE HRESULT DXGISetEvictionPriority(void* resource, UINT eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->SetEvictionPriority(resource, eviction_priority);
|
||||
}
|
||||
static inline HRESULT DXGIGetEvictionPriority(void* resource, UINT* eviction_priority)
|
||||
static INLINE HRESULT DXGIGetEvictionPriority(void* resource, UINT* eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetEvictionPriority(resource, eviction_priority);
|
||||
}
|
||||
static inline ULONG DXGIReleaseKeyedMutex(DXGIKeyedMutex keyed_mutex)
|
||||
static INLINE ULONG DXGIReleaseKeyedMutex(DXGIKeyedMutex keyed_mutex)
|
||||
{
|
||||
return keyed_mutex->lpVtbl->Release(keyed_mutex);
|
||||
}
|
||||
static inline HRESULT DXGIAcquireSync(DXGIKeyedMutex keyed_mutex, UINT64 key, DWORD dw_milliseconds)
|
||||
static INLINE HRESULT DXGIAcquireSync(DXGIKeyedMutex keyed_mutex, UINT64 key, DWORD dw_milliseconds)
|
||||
{
|
||||
return keyed_mutex->lpVtbl->AcquireSync(keyed_mutex, key, dw_milliseconds);
|
||||
}
|
||||
static inline HRESULT DXGIReleaseSync(DXGIKeyedMutex keyed_mutex, UINT64 key)
|
||||
static INLINE HRESULT DXGIReleaseSync(DXGIKeyedMutex keyed_mutex, UINT64 key)
|
||||
{
|
||||
return keyed_mutex->lpVtbl->ReleaseSync(keyed_mutex, key);
|
||||
}
|
||||
static inline ULONG DXGIReleaseSurface(DXGISurface surface)
|
||||
static INLINE ULONG DXGIReleaseSurface(DXGISurface surface)
|
||||
{
|
||||
return surface->lpVtbl->Release(surface);
|
||||
}
|
||||
static inline HRESULT DXGIMap(DXGISurface surface, DXGI_MAPPED_RECT* locked_rect, UINT map_flags)
|
||||
static INLINE HRESULT DXGIMap(DXGISurface surface, DXGI_MAPPED_RECT* locked_rect, UINT map_flags)
|
||||
{
|
||||
return surface->lpVtbl->Map(surface, locked_rect, map_flags);
|
||||
}
|
||||
static inline HRESULT DXGIUnmap(DXGISurface surface) { return surface->lpVtbl->Unmap(surface); }
|
||||
static inline HRESULT DXGIGetDC(DXGISurface surface, BOOL discard, HDC* hdc)
|
||||
static INLINE HRESULT DXGIUnmap(DXGISurface surface) { return surface->lpVtbl->Unmap(surface); }
|
||||
static INLINE HRESULT DXGIGetDC(DXGISurface surface, BOOL discard, HDC* hdc)
|
||||
{
|
||||
return surface->lpVtbl->GetDC(surface, discard, hdc);
|
||||
}
|
||||
static inline HRESULT DXGIReleaseDC(DXGISurface surface, RECT* dirty_rect)
|
||||
static INLINE HRESULT DXGIReleaseDC(DXGISurface surface, RECT* dirty_rect)
|
||||
{
|
||||
return surface->lpVtbl->ReleaseDC(surface, dirty_rect);
|
||||
}
|
||||
static inline ULONG DXGIReleaseOutput(DXGIOutput output) { return output->lpVtbl->Release(output); }
|
||||
static inline HRESULT DXGIGetDisplayModeList(
|
||||
static INLINE ULONG DXGIReleaseOutput(DXGIOutput output) { return output->lpVtbl->Release(output); }
|
||||
static INLINE HRESULT DXGIGetDisplayModeList(
|
||||
DXGIOutput output, DXGI_FORMAT enum_format, UINT flags, UINT* num_modes, DXGI_MODE_DESC* desc)
|
||||
{
|
||||
return output->lpVtbl->GetDisplayModeList(output, enum_format, flags, num_modes, desc);
|
||||
}
|
||||
static inline HRESULT DXGIFindClosestMatchingMode(
|
||||
static INLINE HRESULT DXGIFindClosestMatchingMode(
|
||||
DXGIOutput output,
|
||||
DXGI_MODE_DESC* mode_to_match,
|
||||
DXGI_MODE_DESC* closest_match,
|
||||
@ -124,41 +126,41 @@ static inline HRESULT DXGIFindClosestMatchingMode(
|
||||
return output->lpVtbl->FindClosestMatchingMode(
|
||||
output, mode_to_match, closest_match, (IUnknown*)concerned_device);
|
||||
}
|
||||
static inline HRESULT DXGIWaitForVBlank(DXGIOutput output)
|
||||
static INLINE HRESULT DXGIWaitForVBlank(DXGIOutput output)
|
||||
{
|
||||
return output->lpVtbl->WaitForVBlank(output);
|
||||
}
|
||||
static inline HRESULT DXGITakeOwnership(DXGIOutput output, void* device, BOOL exclusive)
|
||||
static INLINE HRESULT DXGITakeOwnership(DXGIOutput output, void* device, BOOL exclusive)
|
||||
{
|
||||
return output->lpVtbl->TakeOwnership(output, (IUnknown*)device, exclusive);
|
||||
}
|
||||
static inline void DXGIReleaseOwnership(DXGIOutput output)
|
||||
static INLINE void DXGIReleaseOwnership(DXGIOutput output)
|
||||
{
|
||||
output->lpVtbl->ReleaseOwnership(output);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetGammaControlCapabilities(DXGIOutput output, DXGI_GAMMA_CONTROL_CAPABILITIES* gamma_caps)
|
||||
{
|
||||
return output->lpVtbl->GetGammaControlCapabilities(output, gamma_caps);
|
||||
}
|
||||
static inline HRESULT DXGISetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL* array)
|
||||
static INLINE HRESULT DXGISetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL* array)
|
||||
{
|
||||
return output->lpVtbl->SetGammaControl(output, array);
|
||||
}
|
||||
static inline HRESULT DXGIGetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL* array)
|
||||
static INLINE HRESULT DXGIGetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL* array)
|
||||
{
|
||||
return output->lpVtbl->GetGammaControl(output, array);
|
||||
}
|
||||
static inline HRESULT DXGISetDisplaySurface(DXGIOutput output, DXGISurface scanout_surface)
|
||||
static INLINE HRESULT DXGISetDisplaySurface(DXGIOutput output, DXGISurface scanout_surface)
|
||||
{
|
||||
return output->lpVtbl->SetDisplaySurface(output, (IDXGISurface*)scanout_surface);
|
||||
}
|
||||
static inline HRESULT DXGIGetDisplaySurfaceData(DXGIOutput output, DXGISurface destination)
|
||||
static INLINE HRESULT DXGIGetDisplaySurfaceData(DXGIOutput output, DXGISurface destination)
|
||||
{
|
||||
return output->lpVtbl->GetDisplaySurfaceData(output, (IDXGISurface*)destination);
|
||||
}
|
||||
static inline ULONG DXGIReleaseDevice(DXGIDevice device) { return device->lpVtbl->Release(device); }
|
||||
static inline HRESULT DXGICreateSurface(
|
||||
static INLINE ULONG DXGIReleaseDevice(DXGIDevice device) { return device->lpVtbl->Release(device); }
|
||||
static INLINE HRESULT DXGICreateSurface(
|
||||
DXGIDevice device,
|
||||
DXGI_SURFACE_DESC* desc,
|
||||
UINT num_surfaces,
|
||||
@ -169,79 +171,79 @@ static inline HRESULT DXGICreateSurface(
|
||||
return device->lpVtbl->CreateSurface(
|
||||
device, desc, num_surfaces, usage, shared_resource, (IDXGISurface**)surface);
|
||||
}
|
||||
static inline HRESULT DXGISetGPUThreadPriority(DXGIDevice device, INT priority)
|
||||
static INLINE HRESULT DXGISetGPUThreadPriority(DXGIDevice device, INT priority)
|
||||
{
|
||||
return device->lpVtbl->SetGPUThreadPriority(device, priority);
|
||||
}
|
||||
static inline HRESULT DXGIGetGPUThreadPriority(DXGIDevice device, INT* priority)
|
||||
static INLINE HRESULT DXGIGetGPUThreadPriority(DXGIDevice device, INT* priority)
|
||||
{
|
||||
return device->lpVtbl->GetGPUThreadPriority(device, priority);
|
||||
}
|
||||
static inline ULONG DXGIReleaseFactory(DXGIFactory factory)
|
||||
static INLINE ULONG DXGIReleaseFactory(DXGIFactory factory)
|
||||
{
|
||||
return factory->lpVtbl->Release(factory);
|
||||
}
|
||||
static inline HRESULT DXGIMakeWindowAssociation(DXGIFactory factory, HWND window_handle, UINT flags)
|
||||
static INLINE HRESULT DXGIMakeWindowAssociation(DXGIFactory factory, HWND window_handle, UINT flags)
|
||||
{
|
||||
return factory->lpVtbl->MakeWindowAssociation(factory, window_handle, flags);
|
||||
}
|
||||
static inline HRESULT DXGIGetWindowAssociation(DXGIFactory factory, HWND* window_handle)
|
||||
static INLINE HRESULT DXGIGetWindowAssociation(DXGIFactory factory, HWND* window_handle)
|
||||
{
|
||||
return factory->lpVtbl->GetWindowAssociation(factory, window_handle);
|
||||
}
|
||||
static inline HRESULT DXGICreateSwapChain(
|
||||
static INLINE HRESULT DXGICreateSwapChain(
|
||||
DXGIFactory factory, void* device, DXGI_SWAP_CHAIN_DESC* desc, DXGISwapChain* swap_chain)
|
||||
{
|
||||
return factory->lpVtbl->CreateSwapChain(
|
||||
factory, (IUnknown*)device, desc, (IDXGISwapChain**)swap_chain);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGICreateSoftwareAdapter(DXGIFactory factory, HMODULE module, DXGIAdapter* adapter)
|
||||
{
|
||||
return factory->lpVtbl->CreateSoftwareAdapter(factory, module, (IDXGIAdapter**)adapter);
|
||||
}
|
||||
static inline HRESULT DXGIEnumAdapters(DXGIFactory factory, UINT id, DXGIAdapter* adapter)
|
||||
static INLINE HRESULT DXGIEnumAdapters(DXGIFactory factory, UINT id, DXGIAdapter* adapter)
|
||||
{
|
||||
return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
|
||||
}
|
||||
static inline BOOL DXGIIsCurrent(DXGIFactory factory)
|
||||
static INLINE BOOL DXGIIsCurrent(DXGIFactory factory)
|
||||
{
|
||||
return factory->lpVtbl->IsCurrent(factory);
|
||||
}
|
||||
static inline ULONG DXGIReleaseAdapter(DXGIAdapter adapter)
|
||||
static INLINE ULONG DXGIReleaseAdapter(DXGIAdapter adapter)
|
||||
{
|
||||
return adapter->lpVtbl->Release(adapter);
|
||||
}
|
||||
static inline HRESULT DXGIEnumOutputs(DXGIAdapter adapter, UINT id, DXGIOutput* output)
|
||||
static INLINE HRESULT DXGIEnumOutputs(DXGIAdapter adapter, UINT id, DXGIOutput* output)
|
||||
{
|
||||
return adapter->lpVtbl->EnumOutputs(adapter, id, output);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGICheckInterfaceSupport(DXGIAdapter adapter, REFGUID interface_name, LARGE_INTEGER* u_m_d_version)
|
||||
{
|
||||
return adapter->lpVtbl->CheckInterfaceSupport(adapter, interface_name, u_m_d_version);
|
||||
}
|
||||
static inline HRESULT DXGIGetAdapterDesc1(DXGIAdapter adapter, DXGI_ADAPTER_DESC1* desc)
|
||||
static INLINE HRESULT DXGIGetAdapterDesc1(DXGIAdapter adapter, DXGI_ADAPTER_DESC1* desc)
|
||||
{
|
||||
return adapter->lpVtbl->GetDesc1(adapter, desc);
|
||||
}
|
||||
static inline ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
|
||||
static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
|
||||
{
|
||||
return display_control->lpVtbl->Release(display_control);
|
||||
}
|
||||
static inline BOOL DXGIIsStereoEnabled(DXGIDisplayControl display_control)
|
||||
static INLINE BOOL DXGIIsStereoEnabled(DXGIDisplayControl display_control)
|
||||
{
|
||||
return display_control->lpVtbl->IsStereoEnabled(display_control);
|
||||
}
|
||||
static inline void DXGISetStereoEnabled(DXGIDisplayControl display_control, BOOL enabled)
|
||||
static INLINE void DXGISetStereoEnabled(DXGIDisplayControl display_control, BOOL enabled)
|
||||
{
|
||||
display_control->lpVtbl->SetStereoEnabled(display_control, enabled);
|
||||
}
|
||||
static inline ULONG DXGIReleaseOutputDuplication(DXGIOutputDuplication output_duplication)
|
||||
static INLINE ULONG DXGIReleaseOutputDuplication(DXGIOutputDuplication output_duplication)
|
||||
{
|
||||
return output_duplication->lpVtbl->Release(output_duplication);
|
||||
}
|
||||
static inline HRESULT DXGIAcquireNextFrame(
|
||||
static INLINE HRESULT DXGIAcquireNextFrame(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT timeout_in_milliseconds,
|
||||
DXGI_OUTDUPL_FRAME_INFO* frame_info,
|
||||
@ -251,7 +253,7 @@ static inline HRESULT DXGIAcquireNextFrame(
|
||||
output_duplication, timeout_in_milliseconds, frame_info,
|
||||
(IDXGIResource**)desktop_resource);
|
||||
}
|
||||
static inline HRESULT DXGIGetFrameDirtyRects(
|
||||
static INLINE HRESULT DXGIGetFrameDirtyRects(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT dirty_rects_buffer_size,
|
||||
RECT* dirty_rects_buffer,
|
||||
@ -261,7 +263,7 @@ static inline HRESULT DXGIGetFrameDirtyRects(
|
||||
output_duplication, dirty_rects_buffer_size, dirty_rects_buffer,
|
||||
dirty_rects_buffer_size_required);
|
||||
}
|
||||
static inline HRESULT DXGIGetFrameMoveRects(
|
||||
static INLINE HRESULT DXGIGetFrameMoveRects(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT move_rects_buffer_size,
|
||||
DXGI_OUTDUPL_MOVE_RECT* move_rect_buffer,
|
||||
@ -271,7 +273,7 @@ static inline HRESULT DXGIGetFrameMoveRects(
|
||||
output_duplication, move_rects_buffer_size, move_rect_buffer,
|
||||
move_rects_buffer_size_required);
|
||||
}
|
||||
static inline HRESULT DXGIGetFramePointerShape(
|
||||
static INLINE HRESULT DXGIGetFramePointerShape(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT pointer_shape_buffer_size,
|
||||
void* pointer_shape_buffer,
|
||||
@ -282,70 +284,70 @@ static inline HRESULT DXGIGetFramePointerShape(
|
||||
output_duplication, pointer_shape_buffer_size, pointer_shape_buffer,
|
||||
pointer_shape_buffer_size_required, pointer_shape_info);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIMapDesktopSurface(DXGIOutputDuplication output_duplication, DXGI_MAPPED_RECT* locked_rect)
|
||||
{
|
||||
return output_duplication->lpVtbl->MapDesktopSurface(output_duplication, locked_rect);
|
||||
}
|
||||
static inline HRESULT DXGIUnMapDesktopSurface(DXGIOutputDuplication output_duplication)
|
||||
static INLINE HRESULT DXGIUnMapDesktopSurface(DXGIOutputDuplication output_duplication)
|
||||
{
|
||||
return output_duplication->lpVtbl->UnMapDesktopSurface(output_duplication);
|
||||
}
|
||||
static inline HRESULT DXGIReleaseFrame(DXGIOutputDuplication output_duplication)
|
||||
static INLINE HRESULT DXGIReleaseFrame(DXGIOutputDuplication output_duplication)
|
||||
{
|
||||
return output_duplication->lpVtbl->ReleaseFrame(output_duplication);
|
||||
}
|
||||
static inline ULONG DXGIReleaseDecodeSwapChain(DXGIDecodeSwapChain decode_swap_chain)
|
||||
static INLINE ULONG DXGIReleaseDecodeSwapChain(DXGIDecodeSwapChain decode_swap_chain)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->Release(decode_swap_chain);
|
||||
}
|
||||
static inline HRESULT DXGIPresentBuffer(
|
||||
static INLINE HRESULT DXGIPresentBuffer(
|
||||
DXGIDecodeSwapChain decode_swap_chain, UINT buffer_to_present, UINT sync_interval, UINT flags)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->PresentBuffer(
|
||||
decode_swap_chain, buffer_to_present, sync_interval, flags);
|
||||
}
|
||||
static inline HRESULT DXGISetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
static INLINE HRESULT DXGISetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetSourceRect(decode_swap_chain, rect);
|
||||
}
|
||||
static inline HRESULT DXGISetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
static INLINE HRESULT DXGISetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetTargetRect(decode_swap_chain, rect);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGISetDestSize(DXGIDecodeSwapChain decode_swap_chain, UINT width, UINT height)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetDestSize(decode_swap_chain, width, height);
|
||||
}
|
||||
static inline HRESULT DXGIGetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
static INLINE HRESULT DXGIGetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetSourceRect(decode_swap_chain, rect);
|
||||
}
|
||||
static inline HRESULT DXGIGetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
static INLINE HRESULT DXGIGetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetTargetRect(decode_swap_chain, rect);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetDestSize(DXGIDecodeSwapChain decode_swap_chain, UINT* width, UINT* height)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetDestSize(decode_swap_chain, width, height);
|
||||
}
|
||||
static inline HRESULT DXGISetColorSpace(
|
||||
static INLINE HRESULT DXGISetColorSpace(
|
||||
DXGIDecodeSwapChain decode_swap_chain, DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS color_space)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetColorSpace(decode_swap_chain, color_space);
|
||||
}
|
||||
static inline DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
|
||||
static INLINE DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
|
||||
DXGIGetColorSpace(DXGIDecodeSwapChain decode_swap_chain)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetColorSpace(decode_swap_chain);
|
||||
}
|
||||
static inline ULONG DXGIReleaseFactoryMedia(DXGIFactoryMedia factory_media)
|
||||
static INLINE ULONG DXGIReleaseFactoryMedia(DXGIFactoryMedia factory_media)
|
||||
{
|
||||
return factory_media->lpVtbl->Release(factory_media);
|
||||
}
|
||||
static inline HRESULT DXGICreateSwapChainForCompositionSurfaceHandle(
|
||||
static INLINE HRESULT DXGICreateSwapChainForCompositionSurfaceHandle(
|
||||
DXGIFactoryMedia factory_media,
|
||||
void* device,
|
||||
HANDLE h_surface,
|
||||
@ -357,7 +359,7 @@ static inline HRESULT DXGICreateSwapChainForCompositionSurfaceHandle(
|
||||
factory_media, (IUnknown*)device, h_surface, desc, restrict_to_output,
|
||||
(IDXGISwapChain1**)swap_chain);
|
||||
}
|
||||
static inline HRESULT DXGICreateDecodeSwapChainForCompositionSurfaceHandle(
|
||||
static INLINE HRESULT DXGICreateDecodeSwapChainForCompositionSurfaceHandle(
|
||||
DXGIFactoryMedia factory_media,
|
||||
void* device,
|
||||
HANDLE h_surface,
|
||||
@ -370,20 +372,20 @@ static inline HRESULT DXGICreateDecodeSwapChainForCompositionSurfaceHandle(
|
||||
factory_media, (IUnknown*)device, h_surface, desc, (IDXGIResource*)yuv_decode_buffers,
|
||||
restrict_to_output, swap_chain);
|
||||
}
|
||||
static inline ULONG DXGIReleaseSwapChainMedia(DXGISwapChainMedia swap_chain_media)
|
||||
static INLINE ULONG DXGIReleaseSwapChainMedia(DXGISwapChainMedia swap_chain_media)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->Release(swap_chain_media);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetFrameStatisticsMedia(DXGISwapChainMedia swap_chain_media, DXGI_FRAME_STATISTICS_MEDIA* stats)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->GetFrameStatisticsMedia(swap_chain_media, stats);
|
||||
}
|
||||
static inline HRESULT DXGISetPresentDuration(DXGISwapChainMedia swap_chain_media, UINT duration)
|
||||
static INLINE HRESULT DXGISetPresentDuration(DXGISwapChainMedia swap_chain_media, UINT duration)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->SetPresentDuration(swap_chain_media, duration);
|
||||
}
|
||||
static inline HRESULT DXGICheckPresentDurationSupport(
|
||||
static INLINE HRESULT DXGICheckPresentDurationSupport(
|
||||
DXGISwapChainMedia swap_chain_media,
|
||||
UINT desired_present_duration,
|
||||
UINT* closest_smaller_present_duration,
|
||||
@ -393,29 +395,29 @@ static inline HRESULT DXGICheckPresentDurationSupport(
|
||||
swap_chain_media, desired_present_duration, closest_smaller_present_duration,
|
||||
closest_larger_present_duration);
|
||||
}
|
||||
static inline ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
|
||||
static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->Release(swap_chain);
|
||||
}
|
||||
static inline HRESULT DXGIPresent(DXGISwapChain swap_chain, UINT sync_interval, UINT flags)
|
||||
static INLINE HRESULT DXGIPresent(DXGISwapChain swap_chain, UINT sync_interval, UINT flags)
|
||||
{
|
||||
return swap_chain->lpVtbl->Present(swap_chain, sync_interval, flags);
|
||||
}
|
||||
static inline HRESULT DXGIGetBuffer(DXGISwapChain swap_chain, UINT buffer, IDXGISurface** out)
|
||||
static INLINE HRESULT DXGIGetBuffer(DXGISwapChain swap_chain, UINT buffer, IDXGISurface** out)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetBuffer(swap_chain, buffer, __uuidof(IDXGISurface), (void**)out);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGISetFullscreenState(DXGISwapChain swap_chain, BOOL fullscreen, DXGIOutput target)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetFullscreenState(swap_chain, fullscreen, target);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetFullscreenState(DXGISwapChain swap_chain, BOOL* fullscreen, DXGIOutput* target)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetFullscreenState(swap_chain, fullscreen, target);
|
||||
}
|
||||
static inline HRESULT DXGIResizeBuffers(
|
||||
static INLINE HRESULT DXGIResizeBuffers(
|
||||
DXGISwapChain swap_chain,
|
||||
UINT buffer_count,
|
||||
UINT width,
|
||||
@ -426,37 +428,37 @@ static inline HRESULT DXGIResizeBuffers(
|
||||
return swap_chain->lpVtbl->ResizeBuffers(
|
||||
swap_chain, buffer_count, width, height, new_format, swap_chain_flags);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIResizeTarget(DXGISwapChain swap_chain, DXGI_MODE_DESC* new_target_parameters)
|
||||
{
|
||||
return swap_chain->lpVtbl->ResizeTarget(swap_chain, new_target_parameters);
|
||||
}
|
||||
static inline HRESULT DXGIGetContainingOutput(DXGISwapChain swap_chain, DXGIOutput* output)
|
||||
static INLINE HRESULT DXGIGetContainingOutput(DXGISwapChain swap_chain, DXGIOutput* output)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetContainingOutput(swap_chain, output);
|
||||
}
|
||||
static inline HRESULT DXGIGetFrameStatistics(DXGISwapChain swap_chain, DXGI_FRAME_STATISTICS* stats)
|
||||
static INLINE HRESULT DXGIGetFrameStatistics(DXGISwapChain swap_chain, DXGI_FRAME_STATISTICS* stats)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetFrameStatistics(swap_chain, stats);
|
||||
}
|
||||
static inline HRESULT DXGIGetLastPresentCount(DXGISwapChain swap_chain, UINT* last_present_count)
|
||||
static INLINE HRESULT DXGIGetLastPresentCount(DXGISwapChain swap_chain, UINT* last_present_count)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetLastPresentCount(swap_chain, last_present_count);
|
||||
}
|
||||
static inline HRESULT DXGIGetSwapChainDesc1(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_DESC1* desc)
|
||||
static INLINE HRESULT DXGIGetSwapChainDesc1(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_DESC1* desc)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetDesc1(swap_chain, desc);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetFullscreenDesc(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_FULLSCREEN_DESC* desc)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetFullscreenDesc(swap_chain, desc);
|
||||
}
|
||||
static inline HRESULT DXGIGetHwnd(DXGISwapChain swap_chain, HWND* hwnd)
|
||||
static INLINE HRESULT DXGIGetHwnd(DXGISwapChain swap_chain, HWND* hwnd)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetHwnd(swap_chain, hwnd);
|
||||
}
|
||||
static inline HRESULT DXGIPresent1(
|
||||
static INLINE HRESULT DXGIPresent1(
|
||||
DXGISwapChain swap_chain,
|
||||
UINT sync_interval,
|
||||
UINT present_flags,
|
||||
@ -465,69 +467,69 @@ static inline HRESULT DXGIPresent1(
|
||||
return swap_chain->lpVtbl->Present1(
|
||||
swap_chain, sync_interval, present_flags, present_parameters);
|
||||
}
|
||||
static inline BOOL DXGIIsTemporaryMonoSupported(DXGISwapChain swap_chain)
|
||||
static INLINE BOOL DXGIIsTemporaryMonoSupported(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->IsTemporaryMonoSupported(swap_chain);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGIGetRestrictToOutput(DXGISwapChain swap_chain, DXGIOutput* restrict_to_output)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetRestrictToOutput(swap_chain, restrict_to_output);
|
||||
}
|
||||
static inline HRESULT DXGISetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA* color)
|
||||
static INLINE HRESULT DXGISetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA* color)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetBackgroundColor(swap_chain, color);
|
||||
}
|
||||
static inline HRESULT DXGIGetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA* color)
|
||||
static INLINE HRESULT DXGIGetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA* color)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetBackgroundColor(swap_chain, color);
|
||||
}
|
||||
static inline HRESULT DXGISetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION rotation)
|
||||
static INLINE HRESULT DXGISetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION rotation)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetRotation(swap_chain, rotation);
|
||||
}
|
||||
static inline HRESULT DXGIGetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION* rotation)
|
||||
static INLINE HRESULT DXGIGetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION* rotation)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetRotation(swap_chain, rotation);
|
||||
}
|
||||
static inline HRESULT DXGISetSourceSize(DXGISwapChain swap_chain, UINT width, UINT height)
|
||||
static INLINE HRESULT DXGISetSourceSize(DXGISwapChain swap_chain, UINT width, UINT height)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetSourceSize(swap_chain, width, height);
|
||||
}
|
||||
static inline HRESULT DXGIGetSourceSize(DXGISwapChain swap_chain, UINT* width, UINT* height)
|
||||
static INLINE HRESULT DXGIGetSourceSize(DXGISwapChain swap_chain, UINT* width, UINT* height)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetSourceSize(swap_chain, width, height);
|
||||
}
|
||||
static inline HRESULT DXGISetMaximumFrameLatency(DXGISwapChain swap_chain, UINT max_latency)
|
||||
static INLINE HRESULT DXGISetMaximumFrameLatency(DXGISwapChain swap_chain, UINT max_latency)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetMaximumFrameLatency(swap_chain, max_latency);
|
||||
}
|
||||
static inline HRESULT DXGIGetMaximumFrameLatency(DXGISwapChain swap_chain, UINT* max_latency)
|
||||
static INLINE HRESULT DXGIGetMaximumFrameLatency(DXGISwapChain swap_chain, UINT* max_latency)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetMaximumFrameLatency(swap_chain, max_latency);
|
||||
}
|
||||
static inline HANDLE DXGIGetFrameLatencyWaitableObject(DXGISwapChain swap_chain)
|
||||
static INLINE HANDLE DXGIGetFrameLatencyWaitableObject(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetFrameLatencyWaitableObject(swap_chain);
|
||||
}
|
||||
static inline HRESULT DXGISetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F* matrix)
|
||||
static INLINE HRESULT DXGISetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F* matrix)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetMatrixTransform(swap_chain, matrix);
|
||||
}
|
||||
static inline HRESULT DXGIGetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F* matrix)
|
||||
static INLINE HRESULT DXGIGetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F* matrix)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetMatrixTransform(swap_chain, matrix);
|
||||
}
|
||||
static inline UINT DXGIGetCurrentBackBufferIndex(DXGISwapChain swap_chain)
|
||||
static INLINE UINT DXGIGetCurrentBackBufferIndex(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetCurrentBackBufferIndex(swap_chain);
|
||||
}
|
||||
static inline HRESULT DXGICheckColorSpaceSupport(
|
||||
static INLINE HRESULT DXGICheckColorSpaceSupport(
|
||||
DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space, UINT* color_space_support)
|
||||
{
|
||||
return swap_chain->lpVtbl->CheckColorSpaceSupport(swap_chain, color_space, color_space_support);
|
||||
}
|
||||
static inline HRESULT
|
||||
static INLINE HRESULT
|
||||
DXGISetColorSpace1(DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetColorSpace1(swap_chain, color_space);
|
||||
@ -535,7 +537,7 @@ DXGISetColorSpace1(DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space)
|
||||
|
||||
/* end of auto-generated */
|
||||
|
||||
static inline HRESULT DXGICreateFactory(DXGIFactory* factory)
|
||||
static INLINE HRESULT DXGICreateFactory(DXGIFactory* factory)
|
||||
{
|
||||
return CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)factory);
|
||||
}
|
||||
@ -561,7 +563,8 @@ void dxgi_copy(
|
||||
void* dst_data);
|
||||
|
||||
#if 1
|
||||
#include <performance_counters.h>
|
||||
#include "../../performance_counters.h"
|
||||
|
||||
#ifndef PERF_START
|
||||
#define PERF_START() \
|
||||
static struct retro_perf_counter perfcounter = { __FUNCTION__ }; \
|
||||
|
@ -685,13 +685,14 @@ static void d3d11_gfx_set_osd_msg(
|
||||
static uintptr_t d3d11_gfx_load_texture(
|
||||
void* video_data, void* data, bool threaded, enum texture_filter_type filter_type)
|
||||
{
|
||||
d3d11_texture_t *texture = NULL;
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)video_data;
|
||||
struct texture_image* image = (struct texture_image*)data;
|
||||
|
||||
if (!d3d11)
|
||||
return 0;
|
||||
|
||||
d3d11_texture_t* texture = calloc(1, sizeof(*texture));
|
||||
texture = (d3d11_texture_t*)calloc(1, sizeof(*texture));
|
||||
|
||||
switch (filter_type)
|
||||
{
|
||||
|
@ -19,11 +19,11 @@
|
||||
#include <math.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#include "gfx/font_driver.h"
|
||||
#include "gfx/video_driver.h"
|
||||
#include "gfx/common/d3d11_common.h"
|
||||
#include "../font_driver.h"
|
||||
#include "../video_driver.h"
|
||||
#include "../common/d3d11_common.h"
|
||||
|
||||
#include "verbosity.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -93,6 +93,7 @@ static int d3d11_font_get_message_width(void* data, const char* msg, unsigned ms
|
||||
|
||||
for (i = 0; i < msg_len; i++)
|
||||
{
|
||||
const struct font_glyph *glyph;
|
||||
const char* msg_tmp = &msg[i];
|
||||
unsigned code = utf8_walk(&msg_tmp);
|
||||
unsigned skip = msg_tmp - &msg[i];
|
||||
@ -100,7 +101,7 @@ static int d3d11_font_get_message_width(void* data, const char* msg, unsigned ms
|
||||
if (skip > 1)
|
||||
i += skip - 1;
|
||||
|
||||
const struct font_glyph* glyph = font->font_driver->get_glyph(font->font_data, code);
|
||||
glyph = font->font_driver->get_glyph(font->font_data, code);
|
||||
|
||||
if (!glyph) /* Do something smarter here ... */
|
||||
glyph = font->font_driver->get_glyph(font->font_data, '?');
|
||||
|
@ -19,12 +19,12 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "menu/menu_driver.h"
|
||||
#include "../menu_driver.h"
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "gfx/font_driver.h"
|
||||
#include "gfx/video_driver.h"
|
||||
#include "gfx/common/d3d11_common.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../gfx/font_driver.h"
|
||||
#include "../../gfx/video_driver.h"
|
||||
#include "../../gfx/common/d3d11_common.h"
|
||||
|
||||
static const float* menu_display_d3d11_get_default_vertices(void) { return NULL; }
|
||||
|
||||
@ -197,10 +197,13 @@ static bool menu_display_d3d11_font_init_first(
|
||||
float font_size,
|
||||
bool is_threaded)
|
||||
{
|
||||
font_data_t** handle = (font_data_t**)font_handle;
|
||||
*handle = font_driver_init_first(
|
||||
video_data, font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D11_API);
|
||||
return *handle;
|
||||
font_data_t** handle = (font_data_t**)font_handle;
|
||||
font_data_t *new_handle = font_driver_init_first(
|
||||
video_data, font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_D3D11_API);
|
||||
if (!new_handle)
|
||||
return false;
|
||||
*handle = new_handle;
|
||||
return true;
|
||||
}
|
||||
|
||||
menu_display_ctx_driver_t menu_display_ctx_d3d11 = {
|
||||
|
@ -84,7 +84,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;_DEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -114,7 +114,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_MENU;HAVE_XMB;HAVE_RGUI;HAVE_MATERIALUI;NDEBUG;_WINDOWS;HAVE_XAUDIO;HAVE_DSOUND;HAVE_DINPUT;HAVE_D3D;HAVE_D3D9;HAVE_D3D11;HAVE_OPENGL;HAVE_GLSL;HAVE_THREADS;RARCH_INTERNAL;HAVE_CC_RESAMPLER;HAVE_GRIFFIN;HAVE_RJPEG;HAVE_RPNG;HAVE_ZLIB;WANT_ZLIB;HAVE_NETWORKING;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_OVERLAY;HAVE_7ZIP;HAVE_LIBRETRODB;HAVE_STB_FONT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)\..\..\gfx\include\dxsdk;$(SolutionDir)\..\..\gfx\include;$(SolutionDir)\..\..\libretro-common\include;$(SolutionDir)\..\..\deps;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -154,4 +154,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user