Skip to content

Commit

Permalink
Refactor methods in Dx12ResourceDataUtil
Browse files Browse the repository at this point in the history
Refactor common code for reading or writing resource data into static
functions. The existing functions work the same. The new functions can
be used to allow more control for reading and writing resources.
  • Loading branch information
davidd-lunarg committed Feb 22, 2024
1 parent 55519c1 commit cec58f6
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 262 deletions.
3 changes: 1 addition & 2 deletions framework/decode/dx12_replay_consumer_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,7 @@ void Dx12ReplayConsumerBase::ApplyBatchedResourceInitInfo(
resource_info.second.data,
resource_info.second.subresource_offsets,
resource_info.second.subresource_sizes,
resource_info.second.staging_resource,
true);
resource_info.second.staging_resource);
}
}
resource_data_util_->CloseCommandList();
Expand Down
8 changes: 4 additions & 4 deletions framework/decode/dx12_resource_value_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1333,8 +1333,8 @@ void Dx12ResourceValueMapper::MapResources(const ResourceValueInfoMap&
temp_resource_states,
temp_resource_states,
temp_resource_data,
temp_resource_sizes,
temp_resource_offsets);
temp_resource_offsets,
temp_resource_sizes);

if (SUCCEEDED(hr))
{
Expand Down Expand Up @@ -1367,8 +1367,8 @@ void Dx12ResourceValueMapper::MapResources(const ResourceValueInfoMap&
temp_resource_states,
temp_resource_states,
temp_resource_data,
temp_resource_sizes,
temp_resource_offsets);
temp_resource_offsets,
temp_resource_sizes);
}

if (FAILED(hr))
Expand Down
Loading

0 comments on commit cec58f6

Please sign in to comment.