Updated vkd3d-latest patchset

This commit is contained in:
Alistair Leslie-Hughes 2024-05-19 13:40:18 +10:00
parent 31a5df0839
commit 3ab6d734c0

View File

@ -0,0 +1,48 @@
From 6f535c99883038e60fe42060961a6f1e6bb1b310 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 19 May 2024 13:39:07 +1000
Subject: [PATCH] vkd3d: Fix Compiler warning for CONTAINING_RECORD
---
libs/vkd3d/libs/vkd3d/command.c | 2 +-
libs/vkd3d/libs/vkd3d/vkd3d_private.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/libs/vkd3d/command.c b/libs/vkd3d/libs/vkd3d/command.c
index 95366d3441b..1ca92d7173d 100644
--- a/libs/vkd3d/libs/vkd3d/command.c
+++ b/libs/vkd3d/libs/vkd3d/command.c
@@ -6135,7 +6135,7 @@ static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12Comma
if (!iface)
return NULL;
assert(iface->lpVtbl == (struct ID3D12CommandListVtbl *)&d3d12_command_list_vtbl);
- return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList5_iface);
+ return CONTAINING_RECORD((ID3D12GraphicsCommandList5*)iface, struct d3d12_command_list, ID3D12GraphicsCommandList5_iface);
}
static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d3d12_device *device,
diff --git a/libs/vkd3d/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
index 5f60c8d90ad..90d456a05c9 100644
--- a/libs/vkd3d/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/libs/vkd3d/vkd3d_private.h
@@ -576,7 +576,7 @@ struct d3d12_resource
static inline struct d3d12_resource *impl_from_ID3D12Resource(ID3D12Resource *iface)
{
- return CONTAINING_RECORD(iface, struct d3d12_resource, ID3D12Resource2_iface);
+ return CONTAINING_RECORD((ID3D12Resource2*)iface, struct d3d12_resource, ID3D12Resource2_iface);
}
static inline struct d3d12_resource *impl_from_ID3D12Resource2(ID3D12Resource2 *iface)
@@ -908,7 +908,7 @@ void d3d12_desc_flush_vk_heap_updates_locked(struct d3d12_descriptor_heap *descr
static inline struct d3d12_descriptor_heap *d3d12_desc_get_descriptor_heap(const struct d3d12_desc *descriptor)
{
- return CONTAINING_RECORD(descriptor - descriptor->index, struct d3d12_descriptor_heap, descriptors);
+ return CONTAINING_RECORD( (void*)(descriptor - descriptor->index), struct d3d12_descriptor_heap, descriptors);
}
static inline unsigned int d3d12_desc_heap_range_size(const struct d3d12_desc *descriptor)
--
2.43.0