| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 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 |
default: |
| 64 |
break; |
| 65 |
} |
| 66 |
return true; |
| 67 |
} |
| 68 |
|
| 69 |
inline 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 |
|
| 90 |
inline 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 |
} |
| 97 |
inline 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 |
} |