dzn: Only support high/normal queue priorities
D3D uses an int which seems like it'd support value between 0 and 100, but in reality it only accepts values of exactly 0, or 100. The space is left in case future values were to be added, so that comparisons would work (e.g. MEDIUM_HIGH < HIGH). Treat higher than 0.5 to be HIGH, and anything less to be NORMAL. Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17406>
This commit is contained in:
parent
638b22354e
commit
b16f9f8ba4
|
@ -1813,8 +1813,9 @@ dzn_queue_init(struct dzn_queue *queue,
|
|||
D3D12_COMMAND_QUEUE_DESC queue_desc =
|
||||
pdev->queue_families[pCreateInfo->queueFamilyIndex].desc;
|
||||
|
||||
float priority_in = pCreateInfo->pQueuePriorities[index_in_family];
|
||||
queue_desc.Priority =
|
||||
(INT)(pCreateInfo->pQueuePriorities[index_in_family] * (float)D3D12_COMMAND_QUEUE_PRIORITY_HIGH);
|
||||
priority_in > 0.5f ? D3D12_COMMAND_QUEUE_PRIORITY_HIGH : D3D12_COMMAND_QUEUE_PRIORITY_NORMAL;
|
||||
queue_desc.NodeMask = 0;
|
||||
|
||||
if (FAILED(ID3D12Device1_CreateCommandQueue(device->dev, &queue_desc,
|
||||
|
|
Loading…
Reference in New Issue