Skip to content

Commit

Permalink
dx12 fix for when video queue couldn't be created
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Mar 7, 2024
1 parent 303d49c commit ae86e8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion WickedEngine/wiGraphicsDevice_DX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2526,7 +2526,6 @@ using namespace dx12_internal;
}
}


if (SUCCEEDED(device.As(&video_device)))
{
queues[QUEUE_VIDEO_DECODE].desc.Type = D3D12_COMMAND_LIST_TYPE_VIDEO_DECODE;
Expand Down Expand Up @@ -5345,6 +5344,8 @@ using namespace dx12_internal;
for (int q = 0; q < QUEUE_COUNT; ++q)
{
CommandQueue& queue = queues[q];
if (queue.queue == nullptr)
continue;

if (!queue.submit_cmds.empty())
{
Expand Down Expand Up @@ -5413,6 +5414,8 @@ using namespace dx12_internal;
const uint32_t bufferindex = GetBufferIndex();
for (int queue = 0; queue < QUEUE_COUNT; ++queue)
{
if (queues[queue].queue == nullptr)
continue;
if (FRAMECOUNT >= BUFFERCOUNT && frame_fence[bufferindex][queue]->GetCompletedValue() < 1)
{
// NULL event handle will simply wait immediately:
Expand Down Expand Up @@ -5663,6 +5666,8 @@ using namespace dx12_internal;

for (auto& queue : queues)
{
if (queue.queue == nullptr)
continue;
hr = queue.queue->Signal(fence.Get(), 1);
assert(SUCCEEDED(hr));
if (fence->GetCompletedValue() < 1)
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 392;
const int revision = 393;

const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);

Expand Down

0 comments on commit ae86e8b

Please sign in to comment.