aboutsummaryrefslogtreecommitdiff
path: root/contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-12-02 16:39:36 -0800
committer3gg <3gg@shellblade.net>2025-12-02 16:39:36 -0800
commit6c8ae19be66cee247980a48e736a4e05d14de179 (patch)
treed860767907bf0cbe17ec66422e11bea700cf56d9 /contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h
parent8f594c8ebd11f0e5f8a0c6369c3fe7383d250cbe (diff)
Immediate-mode renderer, triangle demo, shader compilation in cmake, Agility SDKHEADmain
Diffstat (limited to 'contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h')
-rw-r--r--contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h b/contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h
new file mode 100644
index 0000000..c88fbdf
--- /dev/null
+++ b/contrib/microsoft.direct3d.d3d12.1.618.4/build/native/include/d3dx12/d3dx12_render_pass.h
@@ -0,0 +1,105 @@
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)
16inline 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
21inline 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
26inline 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
32inline 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
37inline 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
48inline 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 default:
64 break;
65 }
66 return true;
67}
68
69inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b) noexcept
70{
71 if (a.Type != b.Type) return false;
72 switch (a.Type)
73 {
74 case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE:
75 if (!(a.Resolve == b.Resolve)) return false;
76 break;
77#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)
78 case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:
79 case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:
80 case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:
81 if (!(a.PreserveLocal == b.PreserveLocal)) return false;
82 break;
83#endif
84 default:
85 break;
86 }
87 return true;
88}
89
90inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC &a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC &b) noexcept
91{
92 if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
93 if (!(a.BeginningAccess == b.BeginningAccess)) return false;
94 if (!(a.EndingAccess == b.EndingAccess)) return false;
95 return true;
96}
97inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &b) noexcept
98{
99 if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;
100 if (!(a.DepthBeginningAccess == b.DepthBeginningAccess)) return false;
101 if (!(a.StencilBeginningAccess == b.StencilBeginningAccess)) return false;
102 if (!(a.DepthEndingAccess == b.DepthEndingAccess)) return false;
103 if (!(a.StencilEndingAccess == b.StencilEndingAccess)) return false;
104 return true;
105}