mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-28 18:31:40 +00:00
Add a D3D12MarkerRegion for future use
* Not used yet, as I need to figure out how to apply list markers when we record multiple individual lists. Doing open/close of a list just for the marker seems wasteful. It could be fired directly at the queue
This commit is contained in:
@@ -28,6 +28,32 @@
|
||||
#include "d3d12_manager.h"
|
||||
#include "d3d12_resources.h"
|
||||
|
||||
D3D12MarkerRegion::D3D12MarkerRegion(ID3D12GraphicsCommandList *l, const std::string &marker)
|
||||
{
|
||||
list = l;
|
||||
|
||||
if(list)
|
||||
{
|
||||
std::wstring text = StringFormat::UTF82Wide(marker);
|
||||
list->BeginEvent(0, text.c_str(), (UINT)text.size());
|
||||
}
|
||||
}
|
||||
|
||||
void D3D12MarkerRegion::Set(ID3D12GraphicsCommandList *list, const std::string &marker)
|
||||
{
|
||||
if(list)
|
||||
{
|
||||
std::wstring text = StringFormat::UTF82Wide(marker);
|
||||
list->SetMarker(0, text.c_str(), (UINT)text.size());
|
||||
}
|
||||
}
|
||||
|
||||
D3D12MarkerRegion::~D3D12MarkerRegion()
|
||||
{
|
||||
if(list)
|
||||
list->EndEvent();
|
||||
}
|
||||
|
||||
static ShaderConstant MakeConstantBufferVariable(const DXBC::CBufferVariable &var, uint32_t &offset);
|
||||
|
||||
static ShaderVariableType MakeShaderVariableType(DXBC::CBufferVariableType type, uint32_t &offset)
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
#include "driver/shaders/dxbc/dxbc_compile.h"
|
||||
#include "serialise/serialiser.h"
|
||||
|
||||
// replay only class for handling marker regions
|
||||
struct D3D12MarkerRegion
|
||||
{
|
||||
D3D12MarkerRegion(ID3D12GraphicsCommandList *list, const std::string &marker);
|
||||
~D3D12MarkerRegion();
|
||||
static void Set(ID3D12GraphicsCommandList *list, const std::string &marker);
|
||||
|
||||
ID3D12GraphicsCommandList *list;
|
||||
};
|
||||
|
||||
void MakeShaderReflection(DXBC::DXBCFile *dxbc, ShaderReflection *refl,
|
||||
ShaderBindpointMapping *mapping);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user