mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d: Reject OFFSET_APPEND after unbounded ranges in d3d12_root_signature_info_count_descriptors().
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:
parent
441d8e24b2
commit
c5fdd2f404
@ -325,6 +325,7 @@ struct d3d12_root_signature_info
|
|||||||
static HRESULT d3d12_root_signature_info_count_descriptors(struct d3d12_root_signature_info *info,
|
static HRESULT d3d12_root_signature_info_count_descriptors(struct d3d12_root_signature_info *info,
|
||||||
const D3D12_ROOT_DESCRIPTOR_TABLE *table, bool use_array)
|
const D3D12_ROOT_DESCRIPTOR_TABLE *table, bool use_array)
|
||||||
{
|
{
|
||||||
|
bool unbounded = false;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < table->NumDescriptorRanges; ++i)
|
for (i = 0; i < table->NumDescriptorRanges; ++i)
|
||||||
@ -332,12 +333,16 @@ 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 == 0xffffffff)
|
if (unbounded && range->OffsetInDescriptorsFromTableStart == D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
|
||||||
{
|
{
|
||||||
FIXME("Unhandled unbound descriptor range.\n");
|
WARN("An unbounded range with offset D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND occurs after "
|
||||||
return E_NOTIMPL;
|
"another unbounded range.\n");
|
||||||
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (range->NumDescriptors == UINT_MAX)
|
||||||
|
unbounded = true;
|
||||||
|
|
||||||
binding_count = use_array ? 1 : range->NumDescriptors;
|
binding_count = use_array ? 1 : range->NumDescriptors;
|
||||||
|
|
||||||
switch (range->RangeType)
|
switch (range->RangeType)
|
||||||
@ -365,6 +370,12 @@ static HRESULT d3d12_root_signature_info_count_descriptors(struct d3d12_root_sig
|
|||||||
info->binding_count += binding_count;
|
info->binding_count += binding_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (unbounded)
|
||||||
|
{
|
||||||
|
FIXME("Unhandled unbounded descriptor range.\n");
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2814,7 +2814,7 @@ static void test_create_root_signature(void)
|
|||||||
* D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND. */
|
* D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND. */
|
||||||
descriptor_ranges[1].OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
|
descriptor_ranges[1].OffsetInDescriptorsFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND;
|
||||||
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);
|
||||||
|
|
||||||
/* A bounded range overlapping an unbounded one, mapped to the same
|
/* A bounded range overlapping an unbounded one, mapped to the same
|
||||||
* register space and type. */
|
* register space and type. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user