Skip to content

Commit

Permalink
Fix D3D12_RESOURCE_STATE
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkClinton committed Oct 23, 2023
1 parent 0a77bc6 commit e36cab9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion raytracings/accleration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ wrapper::directx12::raytracing_geometry wrapper::directx12::raytracing_geometry:
build_info.ResultDataMaxSizeInBytes);

geometry.mScratch = buffer::create(device, resource_info::common(
D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS),
D3D12_RESOURCE_STATE_COMMON, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS),
build_info.ScratchDataSizeInBytes);

D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC acceleration_desc = {};
Expand Down
7 changes: 4 additions & 3 deletions resources/resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ namespace wrapper::directx12 {
const D3D12_RESOURCE_FLAGS& flags = D3D12_RESOURCE_FLAG_NONE);

static resource_info common(
const D3D12_RESOURCE_STATES& state = D3D12_RESOURCE_STATE_GENERIC_READ,
const D3D12_RESOURCE_STATES& state = D3D12_RESOURCE_STATE_COMMON,
const D3D12_RESOURCE_FLAGS& flags = D3D12_RESOURCE_FLAG_NONE);

static resource_info common(const D3D12_RESOURCE_FLAGS& flags,
const D3D12_RESOURCE_STATES& state = D3D12_RESOURCE_STATE_GENERIC_READ);
static resource_info common(
const D3D12_RESOURCE_FLAGS& flags,
const D3D12_RESOURCE_STATES& state = D3D12_RESOURCE_STATE_COMMON);

static resource_info readback(
const D3D12_RESOURCE_STATES& state = D3D12_RESOURCE_STATE_COPY_DEST,
Expand Down

0 comments on commit e36cab9

Please sign in to comment.