Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/directx_headers/include/directx/d3dx12_render_pass.h
9906 views
1
//*********************************************************
2
//
3
// Copyright (c) Microsoft Corporation.
4
// Licensed under the MIT License (MIT).
5
//
6
//*********************************************************
7
8
#pragma once
9
10
#ifndef __cplusplus
11
#error D3DX12 requires C++
12
#endif
13
14
#include "d3d12.h"
15
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
16
inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
17
{
18
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
19
}
20
21
inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
22
{
23
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
24
}
25
26
inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept
27
{
28
return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));
29
}
30
#endif
31
32
inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &b) noexcept
33
{
34
return a.ClearValue == b.ClearValue;
35
}
36
37
inline bool operator==( const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &a, const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &b) noexcept
38
{
39
if (a.pSrcResource != b.pSrcResource) return false;
40
if (a.pDstResource != b.pDstResource) return false;
41
if (a.SubresourceCount != b.SubresourceCount) return false;
42
if (a.Format != b.Format) return false;
43
if (a.ResolveMode != b.ResolveMode) return false;
44
if (a.PreserveResolveSource != b.PreserveResolveSource) return false;
45
return true;
46
}
47
48
inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS &b) noexcept
49
{
50
if (a.Type != b.Type) return false;
51
switch (a.Type)
52
{
53
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR:
54
if (!(a.Clear == b.Clear)) return false;
55
break;
56
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
57
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:
58
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:
59
case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:
60
if (!(a.PreserveLocal == b.PreserveLocal)) return false;
61
break;
62
#endif
63
}
64
return true;
65
}
66
67
inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b) noexcept
68
{
69
if (a.Type != b.Type) return false;
70
switch (a.Type)
71
{
72
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE:
73
if (!(a.Resolve == b.Resolve)) return false;
74
break;
75
#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
76
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:
77
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:
78
case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:
79
if (!(a.PreserveLocal == b.PreserveLocal)) return false;
80
break;
81
#endif
82
}
83
84
return true;
85
}
86
87
inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC &a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC &b) noexcept
88
{
89
if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
90
if (!(a.BeginningAccess == b.BeginningAccess)) return false;
91
if (!(a.EndingAccess == b.EndingAccess)) return false;
92
return true;
93
}
94
inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &b) noexcept
95
{
96
if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
97
if (!(a.DepthBeginningAccess == b.DepthBeginningAccess)) return false;
98
if (!(a.StencilBeginningAccess == b.StencilBeginningAccess)) return false;
99
if (!(a.DepthEndingAccess == b.DepthEndingAccess)) return false;
100
if (!(a.StencilEndingAccess == b.StencilEndingAccess)) return false;
101
return true;
102
}
103
104