mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d: Reject empty descriptor ranges.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
36f6af1570
commit
8239064826
@@ -344,6 +344,12 @@ static HRESULT d3d12_root_signature_info_count_descriptors(struct d3d12_root_sig
|
|||||||
const D3D12_DESCRIPTOR_RANGE *range = &table->pDescriptorRanges[i];
|
const D3D12_DESCRIPTOR_RANGE *range = &table->pDescriptorRanges[i];
|
||||||
unsigned int binding_count;
|
unsigned int binding_count;
|
||||||
|
|
||||||
|
if (!range->NumDescriptors)
|
||||||
|
{
|
||||||
|
WARN("A descriptor range is empty.\n");
|
||||||
|
return E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
if (unbounded && range->OffsetInDescriptorsFromTableStart == D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
|
if (unbounded && range->OffsetInDescriptorsFromTableStart == D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
|
||||||
{
|
{
|
||||||
WARN("An unbounded range with offset D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND occurs after "
|
WARN("An unbounded range with offset D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND occurs after "
|
||||||
|
@@ -2707,10 +2707,7 @@ static void test_create_root_signature(void)
|
|||||||
descriptor_ranges[0].NumDescriptors = 0;
|
descriptor_ranges[0].NumDescriptors = 0;
|
||||||
root_parameters[0].DescriptorTable.NumDescriptorRanges = 1;
|
root_parameters[0].DescriptorTable.NumDescriptorRanges = 1;
|
||||||
hr = create_root_signature(device, &root_signature_desc, &root_signature);
|
hr = create_root_signature(device, &root_signature_desc, &root_signature);
|
||||||
todo
|
|
||||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
|
||||||
if (SUCCEEDED(hr))
|
|
||||||
ID3D12RootSignature_Release(root_signature);
|
|
||||||
|
|
||||||
/* descriptor range overflow
|
/* descriptor range overflow
|
||||||
* Windows results vary for overflowing to zero, but anything beyond that is invalid. */
|
* Windows results vary for overflowing to zero, but anything beyond that is invalid. */
|
||||||
|
Reference in New Issue
Block a user