3 #include "renderer/d3d12_includes.h" 4 #include "util/string.h" 6 #define D3D12_RESOURCE_STATE_INVALID ((D3D12_RESOURCE_STATES)-1) 23 friend class CompareGpuResourceByName;
24 friend class CompareGpuResourceBySize;
25 friend class CompareGpuResourceByFormat;
26 friend class CompareGpuResourceByNameReverted;
27 friend class CompareGpuResourceBySizeReverted;
28 friend class CompareGpuResourceByFormatReverted;
38 GpuResource(ID3D12Resource* resource, D3D12_RESOURCE_STATES current_state);
48 void Associate(ID3D12Resource* resource, D3D12_RESOURCE_STATES current_state);
const D3D12_RESOURCE_STATES & GetTransitionState() const
Returns the current transition state of the resource.
Definition: gpu_resource.h:79
Wrapper around D3D12 command lists.
Definition: command_context.h:77
void AddToMemoryProfiler()
Adds this GpuResource to the MemoryProfiler.
Definition: gpu_resource.cc:51
const D3D12_RESOURCE_STATES & GetState() const
Returns the current resource state of the resource.
Definition: gpu_resource.h:69
ID3D12Resource * operator->()
Pointer operator that returns the underlying resource.
Definition: gpu_resource.h:54
GpuResource()
Constructs an empty GpuResource.
Definition: gpu_resource.cc:10
D3D12_RESOURCE_STATES transition_state_
The current transition state of the GpuResource.
Definition: gpu_resource.h:91
virtual ~GpuResource()
Destructs a GpuResource.
Definition: gpu_resource.cc:29
ID3D12Resource * resource_
The ID3D12Resource that is being wrapped by the GpuResource.
Definition: gpu_resource.h:89
void Destroy()
Destroys the underlying GpuResource.
Definition: gpu_resource.cc:45
const ID3D12Resource * operator->() const
Pointer operator that returns the underlying resource.
Definition: gpu_resource.h:57
Wraps ID3D12Resource objects.
Definition: gpu_resource.h:19
eastl::wstring WString
Typedef for wrapping the EASTL wstring.
Definition: string.h:20
ID3D12Resource * Get()
Returns the underlying ID3D12Resource.
Definition: gpu_resource.h:63
WString name_
The name of this resource.
Definition: gpu_resource.h:88
void Associate(ID3D12Resource *resource, D3D12_RESOURCE_STATES current_state)
Associate this GpuResource with another ID3D12Resource.
Definition: gpu_resource.cc:36
The main Blowbox namespace.
Definition: image.cc:8
D3D12_RESOURCE_STATES usage_state_
The current resource state of the ID3D12Resource.
Definition: gpu_resource.h:90
Provides memory profiling statistics.
Definition: memory_profiler.h:23
D3D12_GPU_VIRTUAL_ADDRESS gpu_virtual_address_
The virtual address of the ID3D12Resource in VRAM.
Definition: gpu_resource.h:92
void RemoveFromMemoryProfiler()
Removes this GpuResource from the MemoryProfiler.
Definition: gpu_resource.cc:57