mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 11:28:11 +00:00
[host] d12: pass frame information in a description structure
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
|
||||
typedef struct D12Backend D12Backend;
|
||||
|
||||
typedef struct D12FetchDesc D12FetchDesc;
|
||||
|
||||
struct D12Backend
|
||||
{
|
||||
// friendly name
|
||||
@@ -58,12 +60,15 @@ struct D12Backend
|
||||
CaptureResult (*sync)(D12Backend * instance,
|
||||
ID3D12CommandQueue * commandQueue);
|
||||
|
||||
ID3D12Resource * (*fetch)(
|
||||
D12Backend * instance,
|
||||
unsigned frameBufferIndex,
|
||||
RECT ** dirtyRects,
|
||||
unsigned * nbDirtyRects,
|
||||
CaptureRotation * rotation);
|
||||
ID3D12Resource * (*fetch)(D12Backend * instance, unsigned frameBufferIndex,
|
||||
D12FetchDesc * meta);
|
||||
};
|
||||
|
||||
struct D12FetchDesc
|
||||
{
|
||||
CaptureRotation rotation;
|
||||
RECT * dirtyRects;
|
||||
unsigned nbDirtyRects;
|
||||
};
|
||||
|
||||
static inline bool d12_backendCreate(const D12Backend * backend,
|
||||
@@ -98,10 +103,8 @@ static inline CaptureResult d12_backendSync(D12Backend * instance,
|
||||
{ return instance->sync(instance, commandQueue); }
|
||||
|
||||
static inline ID3D12Resource * d12_backendFetch(D12Backend * instance,
|
||||
unsigned frameBufferIndex, RECT ** dirtyRects, unsigned * nbDirtyRects,
|
||||
CaptureRotation * rotation)
|
||||
{ return instance->fetch(instance, frameBufferIndex, dirtyRects,
|
||||
nbDirtyRects, rotation); }
|
||||
unsigned frameBufferIndex, D12FetchDesc * desc)
|
||||
{ return instance->fetch(instance, frameBufferIndex, desc); }
|
||||
|
||||
// Backend defines
|
||||
|
||||
|
Reference in New Issue
Block a user