Program Listing for File d3d12-resolve-multisample.h
↰ Return to documentation for file (include\d3d12-resource-extraction\d3d12-resolve-multisample.h
)
/******************************************************************************
Copyright 2021 - 2021 Intel Corporation.
This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.
This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.
******************************************************************************/
#pragma once
#include <cstdint>
#include <memory>
#include <functional>
#include <d3d12.h>
#include <d3dx12.h>
#include <gpgmm_d3d12.h>
#include <atlbase.h>
namespace gpa {
namespace resource_utilities {
namespace d3d12 {
class ResolveMultisample;
class ResolvedTexture
{
public:
ResolvedTexture(
gpgmm::d3d12::IResourceAllocator* allocator,
ID3D12Resource* resource,
ID3D12GraphicsCommandList* commandList,
D3D12_RESOURCE_STATES state,
DXGI_FORMAT viewFormat,
const std::function<void()>& restoreState);
~ResolvedTexture();
gpgmm::d3d12::IResourceAllocation* GetResolvedResource();
D3D12_RESOURCE_STATES GetResolvedResourceState() const;
static bool ResolveRequired(ID3D12Resource* resource);
private:
CComPtr<gpgmm::d3d12::IResourceAllocation> mResolveResource;
D3D12_RESOURCE_STATES mResolveResourceState{};
std::unique_ptr<ResolveMultisample> mResolveMultisample;
};
} // namespace d3d12
} // namespace resource_utilities
} // namespace gpa