2020-02-18 19:34:38 +00:00
|
|
|
/*
|
2020-02-24 16:36:15 +00:00
|
|
|
* Copyright 2020 Google LLC
|
2020-02-18 19:34:38 +00:00
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GrD3DBackendContext_DEFINED
|
|
|
|
#define GrD3DBackendContext_DEFINED
|
|
|
|
|
2020-04-01 14:13:48 +00:00
|
|
|
// GrD3DTypes.h includes d3d12.h, which in turn includes windows.h, which redefines many
|
|
|
|
// common identifiers such as:
|
|
|
|
// * interface
|
|
|
|
// * small
|
|
|
|
// * near
|
|
|
|
// * far
|
|
|
|
// * CreateSemaphore
|
|
|
|
// * MemoryBarrier
|
|
|
|
//
|
|
|
|
// You should only include GrD3DBackendContext.h if you are prepared to rename those identifiers.
|
|
|
|
#include "include/gpu/d3d/GrD3DTypes.h"
|
2020-02-24 16:36:15 +00:00
|
|
|
|
|
|
|
#include "include/gpu/GrTypes.h"
|
2020-02-18 19:34:38 +00:00
|
|
|
|
|
|
|
// The BackendContext contains all of the base D3D objects needed by the GrD3DGpu. The assumption
|
|
|
|
// is that the client will set these up and pass them to the GrD3DGpu constructor.
|
|
|
|
struct SK_API GrD3DBackendContext {
|
2020-09-21 21:18:04 +00:00
|
|
|
gr_cp<IDXGIAdapter1> fAdapter;
|
|
|
|
gr_cp<ID3D12Device> fDevice;
|
|
|
|
gr_cp<ID3D12CommandQueue> fQueue;
|
2020-09-23 20:29:51 +00:00
|
|
|
sk_sp<GrD3DMemoryAllocator> fMemoryAllocator;
|
2020-02-24 16:36:15 +00:00
|
|
|
GrProtected fProtectedContext = GrProtected::kNo;
|
2020-02-18 19:34:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|