vkd3d: Sort bounded descriptor ranges after unbounded ones of equal offset.

Enables the bounded range to be mapped to the unbounded one, instead of
being mapped to a separate binding which will be populated from the same
d3d12 descriptors as the unbounded one.
This commit is contained in:
Conor McCarthy 2024-09-21 13:43:20 +10:00 committed by Henri Verbeet
parent 966e627733
commit 945e8a9024
Notes: Henri Verbeet 2024-09-23 15:57:24 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1100

View File

@ -1107,7 +1107,9 @@ static int compare_descriptor_range(const void *a, const void *b)
if ((ret = vkd3d_u32_compare(range_a->offset, range_b->offset)))
return ret;
return (range_a->descriptor_count == UINT_MAX) - (range_b->descriptor_count == UINT_MAX);
/* Place bounded ranges after unbounded ones of equal offset,
* so the bounded range can be mapped to the unbounded one. */
return (range_b->descriptor_count == UINT_MAX) - (range_a->descriptor_count == UINT_MAX);
}
static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_root_signature *root_signature,