Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions framework/decode/custom_dx12_replay_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,26 @@ struct CustomReplayPostCall<format::ApiCallId::ApiCall_ID3D12Device_CopyDescript
}
};

template <>
struct CustomReplayPostCall<format::ApiCallId::ApiCall_ID3D12Object_SetPrivateDataInterface>
{
template <typename... Args>
static void Dispatch(Dx12ReplayConsumerBase* replay, Args... args)
{
replay->PostCall_ID3D12Object_SetPrivateDataInterface(args...);
}
};

template <>
struct CustomReplayPostCall<format::ApiCallId::ApiCall_IDXGIObject_SetPrivateDataInterface>
{
template <typename... Args>
static void Dispatch(Dx12ReplayConsumerBase* replay, Args... args)
{
replay->PostCall_IDXGIObject_SetPrivateDataInterface(args...);
}
};

GFXRECON_END_NAMESPACE(decode)
GFXRECON_END_NAMESPACE(gfxrecon)

Expand Down
41 changes: 23 additions & 18 deletions framework/decode/dx12_acceleration_structure_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ void UpdateBufferSize(ID3D12Device* device,
// Create an upload resource of the required size.
if (!buffer || (buffer_size < required_size))
{
buffer = nullptr;
buffer = graphics::dx12::CreateBufferResource(device, required_size, heap_type, initial_state, flags);
if (!buffer)
{
Expand Down Expand Up @@ -81,27 +82,31 @@ Dx12AccelerationStructureBuilder::Dx12AccelerationStructureBuilder(graphics::dx1
queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
queue_desc.Type = list_type;
result = device5_->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&command_queue_));

if (SUCCEEDED(result))
{
result = device5_->CreateCommandAllocator(list_type, IID_PPV_ARGS(&command_allocator_));
if (SUCCEEDED(result))
{
graphics::dx12::ID3D12GraphicsCommandListComPtr command_list;
result =
device5_->CreateCommandList(0, list_type, command_allocator_, nullptr, IID_PPV_ARGS(&command_list));
if (SUCCEEDED(result))
{
result = command_list->Close();
if (SUCCEEDED(result))
{
result = command_list->QueryInterface(IID_PPV_ARGS(&command_list4_));
if (SUCCEEDED(result))
{
result = device5_->CreateFence(fence_value_, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence_));
}
}
}
}
}

graphics::dx12::ID3D12GraphicsCommandListComPtr command_list;
if (SUCCEEDED(result))
{
result = device5_->CreateCommandList(0, list_type, command_allocator_, nullptr, IID_PPV_ARGS(&command_list));
}

if (SUCCEEDED(result))
{
result = command_list->Close();
}

if (SUCCEEDED(result))
{
result = command_list->QueryInterface(IID_PPV_ARGS(&command_list4_));
}

if (SUCCEEDED(result))
{
result = device5_->CreateFence(fence_value_, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence_));
}

if (FAILED(result))
Expand Down
4 changes: 2 additions & 2 deletions framework/decode/dx12_descriptor_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class Dx12DescriptorMap
static const size_t kNullCpuAddress = 0;
static const uint64_t kNullGpuAddress = 0;

Dx12DescriptorMap(const Dx12DescriptorMap&) = delete;
Dx12DescriptorMap(const Dx12DescriptorMap&) = delete;
Dx12DescriptorMap& operator=(const Dx12DescriptorMap&) = delete;

Dx12DescriptorMap() = default;

Dx12DescriptorMap(Dx12DescriptorMap&&) noexcept = default;
Dx12DescriptorMap(Dx12DescriptorMap&&) noexcept = default;
Dx12DescriptorMap& operator=(Dx12DescriptorMap&&) noexcept = default;

void AddCpuDescriptorHeap(const D3D12_CPU_DESCRIPTOR_HANDLE& capture_cpu_start,
Expand Down
1 change: 1 addition & 0 deletions framework/decode/dx12_object_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ struct D3D12HeapInfo : DxObjectExtraInfo
D3D12HeapInfo() : DxObjectExtraInfo(kType) {}

void* external_allocation{ nullptr };
void* external_handle{ nullptr };
};

struct D3D12ResourceInfo : DxObjectExtraInfo
Expand Down
25 changes: 12 additions & 13 deletions framework/decode/dx12_pre_process_consumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_type = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
it->second.current_graphics_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(const ApiCallInfo& call_info,
Expand Down Expand Up @@ -577,7 +577,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_type = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
it->second.current_graphics_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(
Expand All @@ -596,7 +596,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_compute_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(
Expand All @@ -615,7 +615,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_graphics_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(
Expand All @@ -634,7 +634,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_compute_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(
Expand All @@ -653,7 +653,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_graphics_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(
Expand All @@ -667,12 +667,12 @@ class Dx12PreProcessConsumer : public Dx12Consumer
auto it = track_commandlist_infos_.find(object_id);
if (it != track_commandlist_infos_.end())
{
TrackRootParameter param = {};
param.cmd_bind_type = D3D12_ROOT_PARAMETER_TYPE_UAV;
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_compute_root_parameters[RootParameterIndex] = param;
TrackRootParameter param = {};
param.cmd_bind_type = D3D12_ROOT_PARAMETER_TYPE_UAV;
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_compute_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(
Expand All @@ -691,7 +691,7 @@ class Dx12PreProcessConsumer : public Dx12Consumer
param.cmd_bind_captured_buffer_location = BufferLocation;
it->second.current_graphics_root_parameters[RootParameterIndex] = param;
}
}
}
}

virtual void Process_ID3D12GraphicsCommandList_DrawInstanced(const ApiCallInfo& call_info,
Expand Down Expand Up @@ -991,7 +991,6 @@ class Dx12PreProcessConsumer : public Dx12Consumer
track_draw_call.graphics_root_parameters = it->second.current_graphics_root_parameters;
track_draw_call.compute_root_signature_handle_id = it->second.current_compute_root_signature_handle_id;
track_draw_call.compute_root_parameters = it->second.current_compute_root_parameters;


it->second.track_dump_draw_calls.emplace_back(
std::make_shared<TrackDumpDrawCall>(std::move(track_draw_call)));
Expand Down
Loading
Loading