Program Listing for File d3d12-state-tacking-support.h

Return to documentation for file (include\d3d12-state-tracking-support\d3d12-state-tacking-support.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 "igpa-config.h"
#include <stdint.h>

namespace gpa {
namespace d3d12_state_tracker {

enum D3D12StateTrackerFeature : uint32_t {
    D3D12ST_FEATURE_TRACK_DESCRIPTORS = 0x1,
    D3D12ST_ALL_FEATURES = (uint32_t)-1
};

GPA_EXPORT void EnableStateTrackerFeature(D3D12StateTrackerFeature feature);
GPA_EXPORT bool IsStateTrackerFeatureEnabled(D3D12StateTrackerFeature feature);

class D3D12DescriptorHeapState;
class D3D12ResourceState;

GPA_EXPORT D3D12DescriptorHeapState* GetDescriptorHeapStateFromHeapIndex(size_t heapIndex);
GPA_EXPORT D3D12DescriptorHeapState* GetDescriptorHeapStateFromGpuAddress(uint64_t gpuAddress);
GPA_EXPORT void RegisterDescriptorHeap(D3D12DescriptorHeapState* stateObj, uint64_t gpuAddress, uint32_t heapUniqueID);

GPA_EXPORT D3D12ResourceState* GetResourceStateFromGpuVirtualAddress(uint64_t gpuVirtualAddress);
GPA_EXPORT void RegisterResource(D3D12ResourceState* stateObj, uint64_t gpuVirtualAddress, uint64_t size);
GPA_EXPORT void EraseResource(D3D12ResourceState* stateObj, uint64_t gpuVirtualAddress, uint64_t size);

}  // namespace d3d12_state_tracker
}  // namespace gpa