mirror of
https://github.com/libretro/RetroArch
synced 2025-01-28 06:35:23 +00:00
Remove unused DXGI inline functions
This commit is contained in:
parent
da094eeb2f
commit
75757d7d02
@ -156,7 +156,7 @@ typedef struct
|
||||
#ifdef __WINRT__
|
||||
DXGIFactory2 factory;
|
||||
#else
|
||||
DXGIFactory factory;
|
||||
DXGIFactory1 factory;
|
||||
#endif
|
||||
DXGIAdapter adapter;
|
||||
|
||||
|
@ -216,7 +216,7 @@ typedef struct
|
||||
#ifdef __WINRT__
|
||||
DXGIFactory2 factory;
|
||||
#else
|
||||
DXGIFactory factory;
|
||||
DXGIFactory1 factory;
|
||||
#endif
|
||||
DXGIAdapter adapter;
|
||||
|
||||
|
@ -141,7 +141,7 @@ typedef struct
|
||||
#ifdef __WINRT__
|
||||
DXGIFactory2 factory;
|
||||
#else
|
||||
DXGIFactory factory;
|
||||
DXGIFactory1 factory;
|
||||
#endif
|
||||
DXGIAdapter adapter;
|
||||
D3D12Device device;
|
||||
|
@ -429,7 +429,7 @@ inline static int dxgi_compute_intersection_area(
|
||||
#ifdef __WINRT__
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory2 factory, HWND hwnd)
|
||||
#else
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory factory, HWND hwnd)
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory1 factory, HWND hwnd)
|
||||
#endif
|
||||
{
|
||||
DXGIOutput6 output6 = NULL;
|
||||
@ -470,7 +470,7 @@ bool dxgi_check_display_hdr_support(DXGIFactory factory, HWND hwnd)
|
||||
if (!factory->lpVtbl->IsCurrent(factory))
|
||||
#endif
|
||||
{
|
||||
if (FAILED(DXGICreateFactory(&factory)))
|
||||
if (FAILED(DXGICreateFactory1(&factory)))
|
||||
{
|
||||
RARCH_ERR("[DXGI]: Failed to create DXGI factory\n");
|
||||
return false;
|
||||
|
@ -324,7 +324,7 @@ typedef IDXGISurface1* DXGISurface;
|
||||
typedef IDXGIOutput* DXGIOutput;
|
||||
typedef IDXGIOutput6* DXGIOutput6;
|
||||
typedef IDXGIDevice* DXGIDevice;
|
||||
typedef IDXGIFactory1* DXGIFactory;
|
||||
typedef IDXGIFactory1* DXGIFactory1;
|
||||
#ifdef __WINRT__
|
||||
typedef IDXGIFactory2* DXGIFactory2;
|
||||
#endif
|
||||
@ -337,149 +337,23 @@ typedef IDXGISwapChainMedia* DXGISwapChainMedia;
|
||||
typedef IDXGISwapChain4* DXGISwapChain;
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
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)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetSharedHandle((IDXGIResource*)resource, shared_handle);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetUsage(void* resource, DXGI_USAGE* usage)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetUsage((IDXGIResource*)resource, usage);
|
||||
}
|
||||
static INLINE HRESULT DXGISetEvictionPriority(void* resource, UINT eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->SetEvictionPriority((IDXGIResource*)resource, eviction_priority);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetEvictionPriority(void* resource, UINT* eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetEvictionPriority((IDXGIResource*)resource, eviction_priority);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return keyed_mutex->lpVtbl->AcquireSync(keyed_mutex, key, dw_milliseconds);
|
||||
}
|
||||
static INLINE HRESULT DXGIReleaseSync(DXGIKeyedMutex keyed_mutex, UINT64 key)
|
||||
{
|
||||
return keyed_mutex->lpVtbl->ReleaseSync(keyed_mutex, key);
|
||||
}
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return surface->lpVtbl->GetDC(surface, discard, hdc);
|
||||
}
|
||||
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(
|
||||
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(
|
||||
DXGIOutput output,
|
||||
DXGI_MODE_DESC* mode_to_match,
|
||||
DXGI_MODE_DESC* closest_match,
|
||||
void* concerned_device)
|
||||
{
|
||||
return output->lpVtbl->FindClosestMatchingMode(
|
||||
output, mode_to_match, closest_match, (IUnknown*)concerned_device);
|
||||
}
|
||||
static INLINE HRESULT DXGIWaitForVBlank(DXGIOutput output)
|
||||
{
|
||||
return output->lpVtbl->WaitForVBlank(output);
|
||||
}
|
||||
static INLINE HRESULT DXGITakeOwnership(DXGIOutput output, void* device, BOOL exclusive)
|
||||
{
|
||||
return output->lpVtbl->TakeOwnership(output, (IUnknown*)device, exclusive);
|
||||
}
|
||||
static INLINE void DXGIReleaseOwnership(DXGIOutput output)
|
||||
{
|
||||
output->lpVtbl->ReleaseOwnership(output);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return output->lpVtbl->SetGammaControl(output, 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)
|
||||
{
|
||||
return output->lpVtbl->SetDisplaySurface(output, (IDXGISurface*)scanout_surface);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetDisplaySurfaceData(DXGIOutput output, DXGISurface destination)
|
||||
{
|
||||
return output->lpVtbl->GetDisplaySurfaceData(output, (IDXGISurface*)destination);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetOutputDesc(DXGIOutput output, DXGI_OUTPUT_DESC* desc)
|
||||
{
|
||||
return output->lpVtbl->GetDesc(output, desc);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetOutputDesc1(DXGIOutput6 output, DXGI_OUTPUT_DESC1* desc)
|
||||
{
|
||||
return output->lpVtbl->GetDesc1(output, desc);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseDevice(DXGIDevice device) { return device->lpVtbl->Release(device); }
|
||||
static INLINE HRESULT DXGICreateSurface(
|
||||
DXGIDevice device,
|
||||
DXGI_SURFACE_DESC* desc,
|
||||
UINT num_surfaces,
|
||||
DXGI_USAGE usage,
|
||||
DXGI_SHARED_RESOURCE* shared_resource,
|
||||
DXGISurface* surface)
|
||||
{
|
||||
return device->lpVtbl->CreateSurface(
|
||||
device, desc, num_surfaces, usage, shared_resource, (IDXGISurface**)surface);
|
||||
}
|
||||
static INLINE HRESULT DXGISetGPUThreadPriority(DXGIDevice device, INT priority)
|
||||
{
|
||||
return device->lpVtbl->SetGPUThreadPriority(device, priority);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetGPUThreadPriority(DXGIDevice device, INT* priority)
|
||||
{
|
||||
return device->lpVtbl->GetGPUThreadPriority(device, priority);
|
||||
}
|
||||
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(DXGIFactory1 factory, HWND window_handle, UINT flags)
|
||||
{
|
||||
return factory->lpVtbl->MakeWindowAssociation(factory, window_handle, flags);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetWindowAssociation(DXGIFactory factory, HWND* window_handle)
|
||||
{
|
||||
return factory->lpVtbl->GetWindowAssociation(factory, window_handle);
|
||||
}
|
||||
|
||||
static INLINE HRESULT DXGICreateSwapChain(
|
||||
DXGIFactory factory, void* device, DXGI_SWAP_CHAIN_DESC* desc, DXGISwapChain* swap_chain)
|
||||
DXGIFactory1 factory, void* device, DXGI_SWAP_CHAIN_DESC* desc, DXGISwapChain* swap_chain)
|
||||
{
|
||||
return factory->lpVtbl->CreateSwapChain(
|
||||
factory, (IUnknown*)device, desc, (IDXGISwapChain**)swap_chain);
|
||||
}
|
||||
|
||||
#ifdef __WINRT__
|
||||
static INLINE HRESULT DXGICreateSwapChainForCoreWindow(
|
||||
DXGIFactory2 factory, void* device, void* corewindow, DXGI_SWAP_CHAIN_DESC1* desc, DXGIOutput restrict_to, DXGISwapChain* swap_chain)
|
||||
@ -488,314 +362,28 @@ static INLINE HRESULT DXGICreateSwapChainForCoreWindow(
|
||||
factory, (IUnknown*)device, (IUnknown*)corewindow, desc, restrict_to, (IDXGISwapChain1**)swap_chain);
|
||||
}
|
||||
#endif
|
||||
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 DXGIEnumAdapters1(DXGIFactory1 factory, UINT id, DXGIAdapter* adapter)
|
||||
{
|
||||
return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
|
||||
}
|
||||
|
||||
#ifdef __WINRT__
|
||||
static INLINE HRESULT DXGIEnumAdapters2(DXGIFactory2 factory, UINT id, DXGIAdapter* adapter)
|
||||
{
|
||||
return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
|
||||
}
|
||||
#endif
|
||||
static INLINE BOOL DXGIIsCurrent(DXGIFactory factory)
|
||||
{
|
||||
return factory->lpVtbl->IsCurrent(factory);
|
||||
}
|
||||
#ifdef __WINRT__
|
||||
static INLINE BOOL DXGIIsCurrent2(DXGIFactory2 factory)
|
||||
{
|
||||
return factory->lpVtbl->IsCurrent(factory);
|
||||
}
|
||||
#endif
|
||||
static INLINE ULONG DXGIReleaseAdapter(DXGIAdapter adapter)
|
||||
{
|
||||
return adapter->lpVtbl->Release(adapter);
|
||||
}
|
||||
static INLINE HRESULT DXGIEnumOutputs(DXGIAdapter adapter, UINT id, DXGIOutput* output)
|
||||
{
|
||||
return adapter->lpVtbl->EnumOutputs(adapter, id, output);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return adapter->lpVtbl->GetDesc1(adapter, desc);
|
||||
}
|
||||
#ifndef __WINRT__
|
||||
static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
|
||||
{
|
||||
return display_control->lpVtbl->Release(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)
|
||||
{
|
||||
display_control->lpVtbl->SetStereoEnabled(display_control, enabled);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseOutputDuplication(DXGIOutputDuplication output_duplication)
|
||||
{
|
||||
return output_duplication->lpVtbl->Release(output_duplication);
|
||||
}
|
||||
static INLINE HRESULT DXGIAcquireNextFrame(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT timeout_in_milliseconds,
|
||||
DXGI_OUTDUPL_FRAME_INFO* frame_info,
|
||||
void* desktop_resource)
|
||||
{
|
||||
return output_duplication->lpVtbl->AcquireNextFrame(
|
||||
output_duplication, timeout_in_milliseconds, frame_info,
|
||||
(IDXGIResource**)desktop_resource);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetFrameDirtyRects(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT dirty_rects_buffer_size,
|
||||
RECT* dirty_rects_buffer,
|
||||
UINT* dirty_rects_buffer_size_required)
|
||||
{
|
||||
return output_duplication->lpVtbl->GetFrameDirtyRects(
|
||||
output_duplication, dirty_rects_buffer_size, dirty_rects_buffer,
|
||||
dirty_rects_buffer_size_required);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetFrameMoveRects(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT move_rects_buffer_size,
|
||||
DXGI_OUTDUPL_MOVE_RECT* move_rect_buffer,
|
||||
UINT* move_rects_buffer_size_required)
|
||||
{
|
||||
return output_duplication->lpVtbl->GetFrameMoveRects(
|
||||
output_duplication, move_rects_buffer_size, move_rect_buffer,
|
||||
move_rects_buffer_size_required);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetFramePointerShape(
|
||||
DXGIOutputDuplication output_duplication,
|
||||
UINT pointer_shape_buffer_size,
|
||||
void* pointer_shape_buffer,
|
||||
UINT* pointer_shape_buffer_size_required,
|
||||
DXGI_OUTDUPL_POINTER_SHAPE_INFO* pointer_shape_info)
|
||||
{
|
||||
return output_duplication->lpVtbl->GetFramePointerShape(
|
||||
output_duplication, pointer_shape_buffer_size, pointer_shape_buffer,
|
||||
pointer_shape_buffer_size_required, pointer_shape_info);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return output_duplication->lpVtbl->UnMapDesktopSurface(output_duplication);
|
||||
}
|
||||
static INLINE HRESULT DXGIReleaseFrame(DXGIOutputDuplication output_duplication)
|
||||
{
|
||||
return output_duplication->lpVtbl->ReleaseFrame(output_duplication);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseDecodeSwapChain(DXGIDecodeSwapChain decode_swap_chain)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->Release(decode_swap_chain);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetSourceRect(decode_swap_chain, rect);
|
||||
}
|
||||
static INLINE HRESULT DXGISetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->SetTargetRect(decode_swap_chain, rect);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetSourceRect(decode_swap_chain, rect);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetTargetRect(decode_swap_chain, rect);
|
||||
}
|
||||
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(
|
||||
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
|
||||
DXGIGetColorSpace(DXGIDecodeSwapChain decode_swap_chain)
|
||||
{
|
||||
return decode_swap_chain->lpVtbl->GetColorSpace(decode_swap_chain);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseFactoryMedia(DXGIFactoryMedia factory_media)
|
||||
{
|
||||
return factory_media->lpVtbl->Release(factory_media);
|
||||
}
|
||||
static INLINE HRESULT DXGICreateSwapChainForCompositionSurfaceHandle(
|
||||
DXGIFactoryMedia factory_media,
|
||||
void* device,
|
||||
HANDLE h_surface,
|
||||
DXGI_SWAP_CHAIN_DESC1* desc,
|
||||
DXGIOutput restrict_to_output,
|
||||
DXGISwapChain* swap_chain)
|
||||
{
|
||||
return factory_media->lpVtbl->CreateSwapChainForCompositionSurfaceHandle(
|
||||
factory_media, (IUnknown*)device, h_surface, desc, restrict_to_output,
|
||||
(IDXGISwapChain1**)swap_chain);
|
||||
}
|
||||
static INLINE HRESULT DXGICreateDecodeSwapChainForCompositionSurfaceHandle(
|
||||
DXGIFactoryMedia factory_media,
|
||||
void* device,
|
||||
HANDLE h_surface,
|
||||
DXGI_DECODE_SWAP_CHAIN_DESC* desc,
|
||||
void* yuv_decode_buffers,
|
||||
DXGIOutput restrict_to_output,
|
||||
DXGIDecodeSwapChain* swap_chain)
|
||||
{
|
||||
return factory_media->lpVtbl->CreateDecodeSwapChainForCompositionSurfaceHandle(
|
||||
factory_media, (IUnknown*)device, h_surface, desc, (IDXGIResource*)yuv_decode_buffers,
|
||||
restrict_to_output, swap_chain);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseSwapChainMedia(DXGISwapChainMedia swap_chain_media)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->Release(swap_chain_media);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->SetPresentDuration(swap_chain_media, duration);
|
||||
}
|
||||
static INLINE HRESULT DXGICheckPresentDurationSupport(
|
||||
DXGISwapChainMedia swap_chain_media,
|
||||
UINT desired_present_duration,
|
||||
UINT* closest_smaller_present_duration,
|
||||
UINT* closest_larger_present_duration)
|
||||
{
|
||||
return swap_chain_media->lpVtbl->CheckPresentDurationSupport(
|
||||
swap_chain_media, desired_present_duration, closest_smaller_present_duration,
|
||||
closest_larger_present_duration);
|
||||
}
|
||||
#endif
|
||||
static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->Release(swap_chain);
|
||||
}
|
||||
|
||||
#define DXGIPresent(swap_chain, sync_interval, flags) ((swap_chain)->lpVtbl->Present((swap_chain), (UINT)(sync_interval), flags))
|
||||
|
||||
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
|
||||
DXGISetFullscreenState(DXGISwapChain swap_chain, BOOL fullscreen, DXGIOutput target)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetFullscreenState(swap_chain, fullscreen, target);
|
||||
}
|
||||
static INLINE HRESULT
|
||||
DXGIGetFullscreenState(DXGISwapChain swap_chain, BOOL* fullscreen, DXGIOutput* target)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetFullscreenState(swap_chain, fullscreen, target);
|
||||
}
|
||||
|
||||
#define DXGIResizeBuffers(swap_chain, buffer_count, width, height, new_format, swap_chain_flags) ((swap_chain)->lpVtbl->ResizeBuffers((swap_chain), buffer_count, width, height, new_format, swap_chain_flags))
|
||||
|
||||
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)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetContainingOutput(swap_chain, output);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetLastPresentCount(swap_chain, last_present_count);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetSwapChainDesc1(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_DESC1* desc)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetDesc1(swap_chain, desc);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetHwnd(swap_chain, hwnd);
|
||||
}
|
||||
static INLINE HRESULT DXGIPresent1(
|
||||
DXGISwapChain swap_chain,
|
||||
UINT sync_interval,
|
||||
UINT present_flags,
|
||||
DXGI_PRESENT_PARAMETERS* present_parameters)
|
||||
{
|
||||
return swap_chain->lpVtbl->Present1(
|
||||
swap_chain, sync_interval, present_flags, present_parameters);
|
||||
}
|
||||
static INLINE BOOL DXGIIsTemporaryMonoSupported(DXGISwapChain swap_chain)
|
||||
{
|
||||
return swap_chain->lpVtbl->IsTemporaryMonoSupported(swap_chain);
|
||||
}
|
||||
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)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetBackgroundColor(swap_chain, 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)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetRotation(swap_chain, 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)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetSourceSize(swap_chain, width, 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)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetMaximumFrameLatency(swap_chain, max_latency);
|
||||
@ -808,35 +396,14 @@ 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)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetMatrixTransform(swap_chain, 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)
|
||||
{
|
||||
return swap_chain->lpVtbl->GetCurrentBackBufferIndex(swap_chain);
|
||||
}
|
||||
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 DXGISetColorSpace1(DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetColorSpace1(swap_chain, color_space);
|
||||
}
|
||||
static INLINE HRESULT DXGISetHDRMetaData(DXGISwapChain swap_chain, DXGI_HDR_METADATA_TYPE type, UINT size, void *metaData)
|
||||
{
|
||||
return swap_chain->lpVtbl->SetHDRMetaData(swap_chain, type, size, metaData);
|
||||
}
|
||||
#endif
|
||||
/* end of auto-generated */
|
||||
|
||||
static INLINE HRESULT DXGICreateFactory(DXGIFactory* factory)
|
||||
static INLINE HRESULT DXGICreateFactory1(DXGIFactory1* factory)
|
||||
{
|
||||
return CreateDXGIFactory1(uuidof(IDXGIFactory1), (void**)factory);
|
||||
}
|
||||
@ -849,7 +416,6 @@ static INLINE HRESULT DXGICreateFactory2(DXGIFactory2* factory)
|
||||
|
||||
/* internal */
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../drivers_shader/glslang_util.h"
|
||||
|
||||
#define DXGI_COLOR_RGBA(r, g, b, a) (((UINT32)(a) << 24) | ((UINT32)(b) << 16) | ((UINT32)(g) << 8) | ((UINT32)(r) << 0))
|
||||
@ -884,7 +450,7 @@ void dxgi_copy(
|
||||
#ifdef __WINRT__
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory2 factory, HWND hwnd);
|
||||
#else
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory factory, HWND hwnd);
|
||||
bool dxgi_check_display_hdr_support(DXGIFactory1 factory, HWND hwnd);
|
||||
#endif
|
||||
void dxgi_swapchain_color_space(DXGISwapChain handle, DXGI_COLOR_SPACE_TYPE
|
||||
*chain_color_space, DXGI_COLOR_SPACE_TYPE color_space);
|
||||
|
@ -1063,7 +1063,7 @@ static void *d3d10_gfx_init(const video_info_t* video,
|
||||
#ifdef __WINRT__
|
||||
DXGICreateFactory2(&d3d10->factory);
|
||||
#else
|
||||
DXGICreateFactory(&d3d10->factory);
|
||||
DXGICreateFactory1(&d3d10->factory);
|
||||
#endif
|
||||
|
||||
{
|
||||
@ -1087,7 +1087,7 @@ static void *d3d10_gfx_init(const video_info_t* video,
|
||||
if (FAILED(DXGIEnumAdapters2(d3d10->factory, i, &d3d10->adapter)))
|
||||
break;
|
||||
#else
|
||||
if (FAILED(DXGIEnumAdapters(d3d10->factory, i, &d3d10->adapter)))
|
||||
if (FAILED(DXGIEnumAdapters1(d3d10->factory, i, &d3d10->adapter)))
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -1193,7 +1193,7 @@ static void *d3d11_gfx_init(const video_info_t* video,
|
||||
#ifdef __WINRT__
|
||||
DXGICreateFactory2(&d3d11->factory);
|
||||
#else
|
||||
DXGICreateFactory(&d3d11->factory);
|
||||
DXGICreateFactory1(&d3d11->factory);
|
||||
#endif
|
||||
#ifdef HAVE_DXGI_HDR
|
||||
d3d11->hdr.enable = settings->bools.video_hdr_enable;
|
||||
@ -1651,7 +1651,7 @@ static void *d3d11_gfx_init(const video_info_t* video,
|
||||
if (FAILED(DXGIEnumAdapters2(d3d11->factory, i, &d3d11->adapter)))
|
||||
break;
|
||||
#else
|
||||
if (FAILED(DXGIEnumAdapters(d3d11->factory, i, &d3d11->adapter)))
|
||||
if (FAILED(DXGIEnumAdapters1(d3d11->factory, i, &d3d11->adapter)))
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -1382,7 +1382,7 @@ static void d3d12_init_base(d3d12_video_t* d3d12)
|
||||
#ifdef __WINRT__
|
||||
DXGICreateFactory2(&d3d12->factory);
|
||||
#else
|
||||
DXGICreateFactory(&d3d12->factory);
|
||||
DXGICreateFactory1(&d3d12->factory);
|
||||
#endif
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -1406,7 +1406,7 @@ static void d3d12_init_base(d3d12_video_t* d3d12)
|
||||
if (FAILED(DXGIEnumAdapters2(d3d12->factory, i, &adapter)))
|
||||
break;
|
||||
#else
|
||||
if (FAILED(DXGIEnumAdapters(d3d12->factory, i, &adapter)))
|
||||
if (FAILED(DXGIEnumAdapters1(d3d12->factory, i, &adapter)))
|
||||
break;
|
||||
#endif
|
||||
adapter->lpVtbl->GetDesc(adapter, &desc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user