Path: blob/master/thirdparty/directx_headers/include/directx/d3dx12_render_pass.h
21733 views
//*********************************************************1//2// Copyright (c) Microsoft Corporation.3// Licensed under the MIT License (MIT).4//5//*********************************************************67#pragma once89#ifndef __cplusplus10#error D3DX12 requires C++11#endif1213#include "d3d12.h"14#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)15inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept16{17return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));18}1920inline bool operator==(const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept21{22return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));23}2425inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& a, const D3D12_RENDER_PASS_ENDING_ACCESS_PRESERVE_LOCAL_PARAMETERS& b) noexcept26{27return ((a.AdditionalWidth == b.AdditionalWidth) && (a.AdditionalHeight == b.AdditionalHeight));28}29#endif3031inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS &b) noexcept32{33return a.ClearValue == b.ClearValue;34}3536inline bool operator==( const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &a, const D3D12_RENDER_PASS_ENDING_ACCESS_RESOLVE_PARAMETERS &b) noexcept37{38if (a.pSrcResource != b.pSrcResource) return false;39if (a.pDstResource != b.pDstResource) return false;40if (a.SubresourceCount != b.SubresourceCount) return false;41if (a.Format != b.Format) return false;42if (a.ResolveMode != b.ResolveMode) return false;43if (a.PreserveResolveSource != b.PreserveResolveSource) return false;44return true;45}4647inline bool operator==( const D3D12_RENDER_PASS_BEGINNING_ACCESS &a, const D3D12_RENDER_PASS_BEGINNING_ACCESS &b) noexcept48{49if (a.Type != b.Type) return false;50switch (a.Type)51{52case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR:53if (!(a.Clear == b.Clear)) return false;54break;55#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)56case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:57case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:58case D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:59if (!(a.PreserveLocal == b.PreserveLocal)) return false;60break;61#endif62default:63break;64}65return true;66}6768inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b) noexcept69{70if (a.Type != b.Type) return false;71switch (a.Type)72{73case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE:74if (!(a.Resolve == b.Resolve)) return false;75break;76#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)77case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:78case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:79case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:80if (!(a.PreserveLocal == b.PreserveLocal)) return false;81break;82#endif83default:84break;85}86return true;87}8889inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC &a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC &b) noexcept90{91if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;92if (!(a.BeginningAccess == b.BeginningAccess)) return false;93if (!(a.EndingAccess == b.EndingAccess)) return false;94return true;95}96inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &b) noexcept97{98if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;99if (!(a.DepthBeginningAccess == b.DepthBeginningAccess)) return false;100if (!(a.StencilBeginningAccess == b.StencilBeginningAccess)) return false;101if (!(a.DepthEndingAccess == b.DepthEndingAccess)) return false;102if (!(a.StencilEndingAccess == b.StencilEndingAccess)) return false;103return true;104}105106107