Path: blob/master/thirdparty/directx_headers/include/directx/d3dx12_render_pass.h
9906 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#endif62}63return true;64}6566inline bool operator==(const D3D12_RENDER_PASS_ENDING_ACCESS& a, const D3D12_RENDER_PASS_ENDING_ACCESS& b) noexcept67{68if (a.Type != b.Type) return false;69switch (a.Type)70{71case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_RESOLVE:72if (!(a.Resolve == b.Resolve)) return false;73break;74#if defined(D3D12_SDK_VERSION) && (D3D12_SDK_VERSION >= 609)75case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_RENDER:76case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_SRV:77case D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE_LOCAL_UAV:78if (!(a.PreserveLocal == b.PreserveLocal)) return false;79break;80#endif81}8283return true;84}8586inline bool operator==( const D3D12_RENDER_PASS_RENDER_TARGET_DESC &a, const D3D12_RENDER_PASS_RENDER_TARGET_DESC &b) noexcept87{88if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;89if (!(a.BeginningAccess == b.BeginningAccess)) return false;90if (!(a.EndingAccess == b.EndingAccess)) return false;91return true;92}93inline bool operator==( const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &a, const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC &b) noexcept94{95if (a.cpuDescriptor.ptr != b.cpuDescriptor.ptr) return false;96if (!(a.DepthBeginningAccess == b.DepthBeginningAccess)) return false;97if (!(a.StencilBeginningAccess == b.StencilBeginningAccess)) return false;98if (!(a.DepthEndingAccess == b.DepthEndingAccess)) return false;99if (!(a.StencilEndingAccess == b.StencilEndingAccess)) return false;100return true;101}102103104