Program Listing for File d3d12-heap.h

Return to documentation for file (include\d3d12-state-tracking\d3d12-heap.h)

/******************************************************************************
© 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 "d3d12-object.h"

namespace gpa {
namespace d3d12_state_tracker {

class D3D12HeapState : public D3D12ObjectState
{
public:
    static constexpr GUID sGUID = {0xb0c339d3, 0xdc6b, 0x491d, {0xa3, 0xa7, 0x77, 0x6e, 0xba, 0x2a, 0xd3, 0xc3}};

private:
    uint32_t mResidencyRefCount = 1;

public:
    D3D12HeapState(ID3D12Heap* pHeap);

    GUID GetGUID() override;

    void OnEvict();
    void OnMakeResident();

    bool IsResident();
};

}  // namespace d3d12_state_tracker
}  // namespace gpa