webgpu/dawn/include/dawn/native/D3D12Backend.h
1// Copyright 2018 The Dawn Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
16#define INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_
17
18#include <DXGI1_4.h>
19#include <d3d12.h>
20#include <windows.h>
21#include <wrl/client.h>
22
23#include "dawn/native/D3DBackend.h"
24
25struct ID3D12Device;
26struct ID3D12Resource;
27
28namespace dawn::native::d3d12 {
29
30class Device;
31
32enum MemorySegment {
33 Local,
34 NonLocal,
35};
36
37DAWN_NATIVE_EXPORT uint64_t SetExternalMemoryReservation(WGPUDevice device,
38 uint64_t requestedReservationSize,
39 MemorySegment memorySegment);
40
41struct DAWN_NATIVE_EXPORT PhysicalDeviceDiscoveryOptions
42 : public d3d::PhysicalDeviceDiscoveryOptions {
43 PhysicalDeviceDiscoveryOptions();
44 explicit PhysicalDeviceDiscoveryOptions(Microsoft::WRL::ComPtr<IDXGIAdapter> adapter);
45};
46
47// TODO(dawn:1774): Deprecated.
48using AdapterDiscoveryOptions = PhysicalDeviceDiscoveryOptions;
49
50} // namespace dawn::native::d3d12
51
52#endif // INCLUDE_DAWN_NATIVE_D3D12BACKEND_H_