[host] dxgi: move and document dxgi_* exposed functions for backends

This commit is contained in:
Geoffrey McRae 2023-11-07 20:50:22 +11:00
parent c2e3c37bab
commit fa561c121e
3 changed files with 17 additions and 10 deletions

View file

@ -21,10 +21,11 @@
#ifndef _H_DXGI_BACKEND_
#define _H_DXGI_BACKEND_
#include "dxgi_capture.h"
#include "common/types.h"
#include "interface/capture.h"
struct DXGIInterface;
struct Texture;
#include <stdbool.h>
#include <d3d11.h>
struct DXGICopyBackend
{
@ -71,4 +72,16 @@ struct DXGICopyBackend
void (*preRelease)(void);
};
// these are functions exported by dxgi.c for use by the backends
IDXGIAdapter1 * dxgi_getAdapter(void);
ID3D11Device * dxgi_getDevice(void);
ID3D11DeviceContext * dxgi_getContext(void);
// lock and unlock the context lock
void dxgi_contextLock(void);
void dxgi_contextUnlock(void);
/* returns true if dxgi:debug is enabled */
bool dxgi_debug(void);
#endif

View file

@ -21,6 +21,7 @@
#include "com_ref.h"
#include <assert.h>
#include <dxgi1_2.h>
#include <d3d12.h>
#include <d3d12sdklayers.h>
#include "common/time.h"

View file

@ -120,11 +120,4 @@ struct DXGIInterface
struct FrameDamage frameDamage[LGMP_Q_FRAME_LEN];
};
IDXGIAdapter1 * dxgi_getAdapter(void);
ID3D11Device * dxgi_getDevice(void);
ID3D11DeviceContext * dxgi_getContext(void);
void dxgi_contextLock(void);
void dxgi_contextUnlock(void);
bool dxgi_debug(void);
#endif