mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Store a D3D12_RESOURCE_DESC structure in struct vkd3d_image_resource_create_info.
Like we did before commit 6d4782ed7f
. That
commit somehow managed to change the "desc" field from
D3D12_RESOURCE_DESC to D3D12_RESOURCE_DESC1, but that breaks the ABI.
This commit is contained in:
parent
7e27ae73af
commit
0914561f85
Notes:
Alexandre Julliard
2024-02-26 23:11:00 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/678
@ -182,7 +182,7 @@ struct vkd3d_image_resource_create_info
|
||||
const void *next;
|
||||
|
||||
VkImage vk_image;
|
||||
D3D12_RESOURCE_DESC1 desc;
|
||||
D3D12_RESOURCE_DESC desc;
|
||||
unsigned int flags;
|
||||
D3D12_RESOURCE_STATES present_state;
|
||||
};
|
||||
|
@ -3733,14 +3733,6 @@ static void STDMETHODCALLTYPE d3d12_device_CopyDescriptorsSimple(ID3D12Device7 *
|
||||
1, &src_descriptor_range_offset, &descriptor_count, descriptor_heap_type);
|
||||
}
|
||||
|
||||
static void d3d12_resource_desc1_from_desc(D3D12_RESOURCE_DESC1 *desc1, const D3D12_RESOURCE_DESC *desc)
|
||||
{
|
||||
memcpy(desc1, desc, sizeof(*desc));
|
||||
desc1->SamplerFeedbackMipRegion.Width = 0;
|
||||
desc1->SamplerFeedbackMipRegion.Height = 0;
|
||||
desc1->SamplerFeedbackMipRegion.Depth = 0;
|
||||
}
|
||||
|
||||
static void d3d12_resource_allocation_info1_from_vkd3d(D3D12_RESOURCE_ALLOCATION_INFO1 *result,
|
||||
const struct vkd3d_resource_allocation_info *info)
|
||||
{
|
||||
|
@ -2277,8 +2277,8 @@ HRESULT vkd3d_create_image_resource(ID3D12Device *device,
|
||||
object->ID3D12Resource2_iface.lpVtbl = &d3d12_resource_vtbl;
|
||||
object->refcount = 1;
|
||||
object->internal_refcount = 1;
|
||||
object->desc = create_info->desc;
|
||||
object->format = vkd3d_format_from_d3d12_resource_desc(d3d12_device, &create_info->desc, 0);
|
||||
d3d12_resource_desc1_from_desc(&object->desc, &create_info->desc);
|
||||
object->format = vkd3d_format_from_d3d12_resource_desc(d3d12_device, &object->desc, 0);
|
||||
object->u.vk_image = create_info->vk_image;
|
||||
object->flags = VKD3D_RESOURCE_EXTERNAL;
|
||||
object->flags |= create_info->flags & VKD3D_RESOURCE_PUBLIC_FLAGS;
|
||||
|
@ -769,6 +769,14 @@ HRESULT d3d12_reserved_resource_create(struct d3d12_device *device,
|
||||
const D3D12_CLEAR_VALUE *optimized_clear_value, struct d3d12_resource **resource);
|
||||
struct d3d12_resource *unsafe_impl_from_ID3D12Resource(ID3D12Resource *iface);
|
||||
|
||||
static inline void d3d12_resource_desc1_from_desc(D3D12_RESOURCE_DESC1 *desc1, const D3D12_RESOURCE_DESC *desc)
|
||||
{
|
||||
memcpy(desc1, desc, sizeof(*desc));
|
||||
desc1->SamplerFeedbackMipRegion.Width = 0;
|
||||
desc1->SamplerFeedbackMipRegion.Height = 0;
|
||||
desc1->SamplerFeedbackMipRegion.Depth = 0;
|
||||
}
|
||||
|
||||
HRESULT vkd3d_allocate_buffer_memory(struct d3d12_device *device, VkBuffer vk_buffer,
|
||||
const D3D12_HEAP_PROPERTIES *heap_properties, D3D12_HEAP_FLAGS heap_flags,
|
||||
VkDeviceMemory *vk_memory, uint32_t *vk_memory_type, VkDeviceSize *vk_memory_size);
|
||||
|
Loading…
Reference in New Issue
Block a user