mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Implement GetResourceAllocationInfo2().
This commit is contained in:
parent
2ed36efcb5
commit
6edba86a26
Notes:
Alexandre Julliard
2024-03-08 23:47:57 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/683
@ -4521,11 +4521,15 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour
|
|||||||
D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count,
|
D3D12_RESOURCE_ALLOCATION_INFO *info, UINT visible_mask, UINT count,
|
||||||
const D3D12_RESOURCE_DESC1 *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO1 *info1)
|
const D3D12_RESOURCE_DESC1 *resource_descs, D3D12_RESOURCE_ALLOCATION_INFO1 *info1)
|
||||||
{
|
{
|
||||||
FIXME("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p stub!\n",
|
struct d3d12_device *device = impl_from_ID3D12Device8(iface);
|
||||||
|
|
||||||
|
TRACE("iface %p, info %p, visible_mask 0x%08x, count %u, resource_descs %p, info1 %p.\n",
|
||||||
iface, info, visible_mask, count, resource_descs, info1);
|
iface, info, visible_mask, count, resource_descs, info1);
|
||||||
|
|
||||||
info->Alignment = 0;
|
debug_ignored_node_mask(visible_mask);
|
||||||
info->SizeInBytes = ~(uint64_t)0;
|
|
||||||
|
d3d12_device_get_resource1_allocation_info(device, info1, count, resource_descs, info);
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1857,6 +1857,7 @@ static bool d3d12_resource_validate_texture_alignment(const D3D12_RESOURCE_DESC1
|
|||||||
|
|
||||||
HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3d12_device *device)
|
HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3d12_device *device)
|
||||||
{
|
{
|
||||||
|
const D3D12_MIP_REGION *mip_region = &desc->SamplerFeedbackMipRegion;
|
||||||
const struct vkd3d_format *format;
|
const struct vkd3d_format *format;
|
||||||
|
|
||||||
switch (desc->Dimension)
|
switch (desc->Dimension)
|
||||||
@ -1926,6 +1927,12 @@ HRESULT d3d12_resource_validate_desc(const D3D12_RESOURCE_DESC1 *desc, struct d3
|
|||||||
|
|
||||||
d3d12_validate_resource_flags(desc->Flags);
|
d3d12_validate_resource_flags(desc->Flags);
|
||||||
|
|
||||||
|
if (mip_region->Width && mip_region->Height && mip_region->Depth)
|
||||||
|
{
|
||||||
|
FIXME("Unhandled sampler feedback mip region size (%u, %u, %u).\n", mip_region->Width, mip_region->Height,
|
||||||
|
mip_region->Depth);
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32428,10 +32428,8 @@ static void test_resource_allocation_info(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
info = ID3D12Device8_GetResourceAllocationInfo2(device8, 0, ARRAY_SIZE(desc_array1), desc_array1, infos1);
|
info = ID3D12Device8_GetResourceAllocationInfo2(device8, 0, ARRAY_SIZE(desc_array1), desc_array1, infos1);
|
||||||
todo
|
|
||||||
ok(info.Alignment >= D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT,
|
ok(info.Alignment >= D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT,
|
||||||
"Got unexpected alignment %"PRIu64".\n", info.Alignment);
|
"Got unexpected alignment %"PRIu64".\n", info.Alignment);
|
||||||
todo
|
|
||||||
check_alignment(info.SizeInBytes, info.Alignment);
|
check_alignment(info.SizeInBytes, info.Alignment);
|
||||||
ok(info.SizeInBytes >= total, "Got unexpected size %"PRIu64".\n", info.SizeInBytes);
|
ok(info.SizeInBytes >= total, "Got unexpected size %"PRIu64".\n", info.SizeInBytes);
|
||||||
ok(!infos1[0].Offset, "Got unexpected offset %"PRIu64".\n", infos1[0].Offset);
|
ok(!infos1[0].Offset, "Got unexpected offset %"PRIu64".\n", infos1[0].Offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user