mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-09 16:18:20 +00:00
[host] d12: don't attempt to use realtime priority
Some GPUs such as the RX580 seem to completely crash when attempting to use `D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME`.
This commit is contained in:
parent
778c21070c
commit
d5b32225f4
@ -291,28 +291,18 @@ static bool d12_init(void * ivshmemBase, unsigned * alignSize)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make this static as we downgrade the priority on failure and we want to
|
D3D12_COMMAND_QUEUE_DESC copyQueueDesc =
|
||||||
remember it */
|
|
||||||
static D3D12_COMMAND_QUEUE_DESC queueDesc =
|
|
||||||
{
|
{
|
||||||
.Type = D3D12_COMMAND_LIST_TYPE_COPY,
|
.Type = D3D12_COMMAND_LIST_TYPE_COPY,
|
||||||
.Priority = D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME,
|
.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH,
|
||||||
.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE,
|
.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
comRef_defineLocal(ID3D12CommandQueue, copyQueue);
|
comRef_defineLocal(ID3D12CommandQueue, copyQueue);
|
||||||
retryCreateCommandQueue:
|
|
||||||
hr = ID3D12Device3_CreateCommandQueue(
|
hr = ID3D12Device3_CreateCommandQueue(
|
||||||
*device, &queueDesc, &IID_ID3D12CommandQueue, (void **)copyQueue);
|
*device, ©QueueDesc, &IID_ID3D12CommandQueue, (void **)copyQueue);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
if (queueDesc.Priority == D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME)
|
|
||||||
{
|
|
||||||
DEBUG_WARN("Failed to create queue with real time priority");
|
|
||||||
queueDesc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH;
|
|
||||||
goto retryCreateCommandQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_WINERROR("Failed to create ID3D12CommandQueue (copy)", hr);
|
DEBUG_WINERROR("Failed to create ID3D12CommandQueue (copy)", hr);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
@ -321,10 +311,10 @@ retryCreateCommandQueue:
|
|||||||
// create the compute queue
|
// create the compute queue
|
||||||
D3D12_COMMAND_QUEUE_DESC computeQueueDesc =
|
D3D12_COMMAND_QUEUE_DESC computeQueueDesc =
|
||||||
{
|
{
|
||||||
.Type = D3D12_COMMAND_LIST_TYPE_COMPUTE,
|
.Type = D3D12_COMMAND_LIST_TYPE_COMPUTE,
|
||||||
.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE,
|
.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH,
|
||||||
|
.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE
|
||||||
};
|
};
|
||||||
queueDesc.Priority = queueDesc.Priority;
|
|
||||||
|
|
||||||
comRef_defineLocal(ID3D12CommandQueue, computeQueue);
|
comRef_defineLocal(ID3D12CommandQueue, computeQueue);
|
||||||
hr = ID3D12Device3_CreateCommandQueue(
|
hr = ID3D12Device3_CreateCommandQueue(
|
||||||
|
Loading…
Reference in New Issue
Block a user