Skip to content

Commit f7297ce

Browse files
D3D12: Fixes for latest SDK. (#65)
Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
1 parent 61e19e1 commit f7297ce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plume_d3d12.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1890,6 +1890,10 @@ namespace plume {
18901890
auto makeBarrier = [&](ID3D12Resource *resource, D3D12_RESOURCE_STATES stateBefore, D3D12_RESOURCE_STATES stateAfter, bool supportsUAV, D3D12_RESOURCE_BARRIER &resourceBarrier) {
18911891
resourceBarrier = {};
18921892

1893+
if (queue->type == RenderCommandListType::COPY) {
1894+
return false;
1895+
}
1896+
18931897
if (stateBefore != stateAfter) {
18941898
resourceBarrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
18951899
resourceBarrier.Transition.StateBefore = stateBefore;
@@ -2581,11 +2585,13 @@ namespace plume {
25812585

25822586
this->device = device;
25832587

2584-
HRESULT res = device->d3d->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&d3d));
2588+
HRESULT res = device->d3d->CreateFence(1, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&d3d));
25852589
if (FAILED(res)) {
25862590
fprintf(stderr, "CreateFence failed with error code 0x%lX.\n", res);
25872591
return;
25882592
}
2593+
2594+
semaphoreValue = 1;
25892595
}
25902596

25912597
D3D12CommandSemaphore::~D3D12CommandSemaphore() {

0 commit comments

Comments
 (0)