Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2019
- 73 participants
- 1394 messages
[PATCH vkd3d 3/6] vkd3d: Add stub for ID3D12GraphicsCommandList2::WriteBufferImmediate().
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
ID3D12GraphicsCommandList2 and WriteBufferImmediate() are used by
Hitman 2, but implementing the function on top of an AMD extension has
no effect on game behaviour. It's commonly used to write debug info.
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This supersedes patch 174173.
libs/vkd3d/command.c | 272 ++++++++++++++++++++++++---------------------
libs/vkd3d/device.c | 4 +-
libs/vkd3d/vkd3d_private.h | 2 +-
tests/d3d12.c | 10 +-
4 files changed, 154 insertions(+), 134 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index d6feecf..8a7ff66 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -1807,9 +1807,9 @@ HRESULT d3d12_command_allocator_create(struct d3d12_device *device,
}
/* ID3D12CommandList */
-static inline struct d3d12_command_list *impl_from_ID3D12GraphicsCommandList1(ID3D12GraphicsCommandList1 *iface)
+static inline struct d3d12_command_list *impl_from_ID3D12GraphicsCommandList2(ID3D12GraphicsCommandList2 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList1_iface);
+ return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList2_iface);
}
static void d3d12_command_list_invalidate_current_framebuffer(struct d3d12_command_list *list)
@@ -2159,19 +2159,20 @@ static void d3d12_command_list_track_resource_usage(struct d3d12_command_list *l
}
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12GraphicsCommandList2 *iface,
REFIID iid, void **object)
{
TRACE("iface %p, iid %s, object %p.\n", iface, debugstr_guid(iid), object);
- if (IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList1)
+ if (IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList2)
+ || IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList1)
|| IsEqualGUID(iid, &IID_ID3D12GraphicsCommandList)
|| IsEqualGUID(iid, &IID_ID3D12CommandList)
|| IsEqualGUID(iid, &IID_ID3D12DeviceChild)
|| IsEqualGUID(iid, &IID_ID3D12Object)
|| IsEqualGUID(iid, &IID_IUnknown))
{
- ID3D12GraphicsCommandList1_AddRef(iface);
+ ID3D12GraphicsCommandList2_AddRef(iface);
*object = iface;
return S_OK;
}
@@ -2182,9 +2183,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12Graphic
return E_NOINTERFACE;
}
-static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList1 *iface)
+static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
ULONG refcount = InterlockedIncrement(&list->refcount);
TRACE("%p increasing refcount to %u.\n", list, refcount);
@@ -2192,9 +2193,9 @@ static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandLi
return refcount;
}
-static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList1 *iface)
+static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
ULONG refcount = InterlockedDecrement(&list->refcount);
TRACE("%p decreasing refcount to %u.\n", list, refcount);
@@ -2217,66 +2218,66 @@ static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandL
return refcount;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetPrivateData(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetPrivateData(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, UINT *data_size, void *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return vkd3d_get_private_data(&list->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateData(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateData(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, UINT data_size, const void *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return vkd3d_set_private_data(&list->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateDataInterface(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetPrivateDataInterface(ID3D12GraphicsCommandList2 *iface,
REFGUID guid, const IUnknown *data)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
return vkd3d_set_private_data_interface(&list->private_store, guid, data);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetName(ID3D12GraphicsCommandList1 *iface, const WCHAR *name)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_SetName(ID3D12GraphicsCommandList2 *iface, const WCHAR *name)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, name %s.\n", iface, debugstr_w(name, list->device->wchar_size));
return name ? S_OK : E_INVALIDARG;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetDevice(ID3D12GraphicsCommandList1 *iface, REFIID iid, void **device)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_GetDevice(ID3D12GraphicsCommandList2 *iface, REFIID iid, void **device)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, iid %s, device %p.\n", iface, debugstr_guid(iid), device);
return d3d12_device_query_interface(list->device, iid, device);
}
-static D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE d3d12_command_list_GetType(ID3D12GraphicsCommandList1 *iface)
+static D3D12_COMMAND_LIST_TYPE STDMETHODCALLTYPE d3d12_command_list_GetType(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p.\n", iface);
return list->type;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandList1 *iface)
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandList2 *iface)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
VkResult vr;
@@ -2320,7 +2321,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Close(ID3D12GraphicsCommandL
static void d3d12_command_list_reset_state(struct d3d12_command_list *list,
ID3D12PipelineState *initial_pipeline_state)
{
- ID3D12GraphicsCommandList1 *iface = &list->ID3D12GraphicsCommandList1_iface;
+ ID3D12GraphicsCommandList2 *iface = &list->ID3D12GraphicsCommandList2_iface;
memset(list->strides, 0, sizeof(list->strides));
list->primitive_topology = D3D_PRIMITIVE_TOPOLOGY_POINTLIST;
@@ -2350,14 +2351,14 @@ static void d3d12_command_list_reset_state(struct d3d12_command_list *list,
memset(list->so_counter_buffers, 0, sizeof(list->so_counter_buffers));
memset(list->so_counter_buffer_offsets, 0, sizeof(list->so_counter_buffer_offsets));
- ID3D12GraphicsCommandList1_SetPipelineState(iface, initial_pipeline_state);
+ ID3D12GraphicsCommandList2_SetPipelineState(iface, initial_pipeline_state);
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandList2 *iface,
ID3D12CommandAllocator *allocator, ID3D12PipelineState *initial_pipeline_state)
{
struct d3d12_command_allocator *allocator_impl = unsafe_impl_from_ID3D12CommandAllocator(allocator);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
HRESULT hr;
TRACE("iface %p, allocator %p, initial_pipeline_state %p.\n",
@@ -2384,7 +2385,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandL
return hr;
}
-static HRESULT STDMETHODCALLTYPE d3d12_command_list_ClearState(ID3D12GraphicsCommandList1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d12_command_list_ClearState(ID3D12GraphicsCommandList2 *iface,
ID3D12PipelineState *pipeline_state)
{
FIXME("iface %p, pipline_state %p stub!\n", iface, pipeline_state);
@@ -2987,11 +2988,11 @@ static void d3d12_command_list_check_index_buffer_strip_cut_value(struct d3d12_c
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCommandList2 *iface,
UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location,
UINT start_instance_location)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, vertex_count_per_instance %u, instance_count %u, "
@@ -3011,11 +3012,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_DrawInstanced(ID3D12GraphicsCom
instance_count, start_vertex_location, start_instance_location));
}
-static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12GraphicsCommandList2 *iface,
UINT index_count_per_instance, UINT instance_count, UINT start_vertex_location,
INT base_vertex_location, UINT start_instance_location)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, index_count_per_instance %u, instance_count %u, start_vertex_location %u, "
@@ -3037,10 +3038,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_DrawIndexedInstanced(ID3D12Grap
instance_count, start_vertex_location, base_vertex_location, start_instance_location));
}
-static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandList2 *iface,
UINT x, UINT y, UINT z)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, x %u, y %u, z %u.\n", iface, x, y, z);
@@ -3056,10 +3057,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandL
VK_CALL(vkCmdDispatch(list->vk_command_buffer, x, y, z));
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyBufferRegion(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, UINT64 dst_offset, ID3D12Resource *src, UINT64 src_offset, UINT64 byte_count)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_vk_device_procs *vk_procs;
VkBufferCopy buffer_copy;
@@ -3339,11 +3340,11 @@ static bool validate_d3d12_box(const D3D12_BOX *box)
&& box->back > box->front;
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12GraphicsCommandList2 *iface,
const D3D12_TEXTURE_COPY_LOCATION *dst, UINT dst_x, UINT dst_y, UINT dst_z,
const D3D12_TEXTURE_COPY_LOCATION *src, const D3D12_BOX *src_box)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_format *src_format, *dst_format;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3474,10 +3475,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTextureRegion(ID3D12Graphic
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, ID3D12Resource *src)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_format *src_format, *dst_format;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3544,7 +3545,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyResource(ID3D12GraphicsComm
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *tiled_resource, const D3D12_TILED_RESOURCE_COORDINATE *tile_region_start_coordinate,
const D3D12_TILE_REGION_SIZE *tile_region_size, ID3D12Resource *buffer, UINT64 buffer_offset,
D3D12_TILE_COPY_FLAGS flags)
@@ -3555,11 +3556,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_CopyTiles(ID3D12GraphicsCommand
buffer, buffer_offset, flags);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst, UINT dst_sub_resource_idx,
ID3D12Resource *src, UINT src_sub_resource_idx, DXGI_FORMAT format)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_format *src_format, *dst_format, *vk_format;
struct d3d12_resource *dst_resource, *src_resource;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -3630,10 +3631,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresource(ID3D12Graphi
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &vk_image_resolve));
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12GraphicsCommandList2 *iface,
D3D12_PRIMITIVE_TOPOLOGY topology)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, topology %#x.\n", iface, topology);
@@ -3650,11 +3651,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetPrimitiveTopology(ID3D12Gr
d3d12_command_list_invalidate_current_pipeline(list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCommandList2 *iface,
UINT viewport_count, const D3D12_VIEWPORT *viewports)
{
VkViewport vk_viewports[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -3686,10 +3687,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
VK_CALL(vkCmdSetViewport(list->vk_command_buffer, 0, viewport_count, vk_viewports));
}
-static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList2 *iface,
UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
VkRect2D vk_rects[D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -3714,10 +3715,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12Graphic
VK_CALL(vkCmdSetScissor(list->vk_command_buffer, 0, rect_count, vk_rects));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList2 *iface,
const FLOAT blend_factor[4])
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, blend_factor %p.\n", iface, blend_factor);
@@ -3726,10 +3727,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12Graphics
VK_CALL(vkCmdSetBlendConstants(list->vk_command_buffer, blend_factor));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsCommandList2 *iface,
UINT stencil_ref)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
TRACE("iface %p, stencil_ref %u.\n", iface, stencil_ref);
@@ -3738,11 +3739,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_OMSetStencilRef(ID3D12GraphicsC
VK_CALL(vkCmdSetStencilReference(list->vk_command_buffer, VK_STENCIL_FRONT_AND_BACK, stencil_ref));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12GraphicsCommandList2 *iface,
ID3D12PipelineState *pipeline_state)
{
struct d3d12_pipeline_state *state = unsafe_impl_from_ID3D12PipelineState(pipeline_state);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, pipeline_state %p.\n", iface, pipeline_state);
@@ -3793,10 +3794,10 @@ static unsigned int d3d12_find_ds_multiplanar_transition(const D3D12_RESOURCE_BA
return 0;
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsCommandList2 *iface,
UINT barrier_count, const D3D12_RESOURCE_BARRIER *barriers)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
bool have_aliasing_barriers = false, have_split_barriers = false;
const struct vkd3d_vk_device_procs *vk_procs;
const struct vkd3d_vulkan_info *vk_info;
@@ -4026,13 +4027,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC
WARN("Issuing split barrier(s) on D3D12_RESOURCE_BARRIER_FLAG_END_ONLY.\n");
}
-static void STDMETHODCALLTYPE d3d12_command_list_ExecuteBundle(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ExecuteBundle(ID3D12GraphicsCommandList2 *iface,
ID3D12GraphicsCommandList *command_list)
{
FIXME("iface %p, command_list %p stub!\n", iface, command_list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetDescriptorHeaps(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetDescriptorHeaps(ID3D12GraphicsCommandList2 *iface,
UINT heap_count, ID3D12DescriptorHeap *const *heaps)
{
TRACE("iface %p, heap_count %u, heaps %p.\n", iface, heap_count, heaps);
@@ -4056,10 +4057,10 @@ static void d3d12_command_list_set_root_signature(struct d3d12_command_list *lis
d3d12_command_list_invalidate_root_parameters(list, bind_point);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12GraphicsCommandList2 *iface,
ID3D12RootSignature *root_signature)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_signature %p.\n", iface, root_signature);
@@ -4067,10 +4068,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootSignature(ID3D12G
unsafe_impl_from_ID3D12RootSignature(root_signature));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootSignature(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootSignature(ID3D12GraphicsCommandList2 *iface,
ID3D12RootSignature *root_signature)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_signature %p.\n", iface, root_signature);
@@ -4092,10 +4093,10 @@ static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *l
bindings->descriptor_table_active_mask |= (uint64_t)1 << index;
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
@@ -4104,10 +4105,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootDescriptorTable(I
root_parameter_index, base_descriptor);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootDescriptorTable(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, D3D12_GPU_DESCRIPTOR_HANDLE base_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, base_descriptor %#"PRIx64".\n",
iface, root_parameter_index, base_descriptor.ptr);
@@ -4129,10 +4130,10 @@ static void d3d12_command_list_set_root_constants(struct d3d12_command_list *lis
c->stage_flags, c->offset + offset * sizeof(uint32_t), count * sizeof(uint32_t), data));
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
iface, root_parameter_index, data, dst_offset);
@@ -4141,10 +4142,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstant(ID3
root_parameter_index, dst_offset, 1, &data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, data 0x%08x, dst_offset %u.\n",
iface, root_parameter_index, data, dst_offset);
@@ -4153,10 +4154,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstant(ID
root_parameter_index, dst_offset, 1, &data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
iface, root_parameter_index, constant_count, data, dst_offset);
@@ -4165,10 +4166,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRoot32BitConstants(ID
root_parameter_index, dst_offset, constant_count, data);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstants(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRoot32BitConstants(ID3D12GraphicsCommandList2 *iface,
UINT root_parameter_index, UINT constant_count, const void *data, UINT dst_offset)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, constant_count %u, data %p, dst_offset %u.\n",
iface, root_parameter_index, constant_count, data, dst_offset);
@@ -4221,9 +4222,9 @@ static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list,
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootConstantBufferView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4232,9 +4233,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootConstantBufferVie
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootConstantBufferView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4293,9 +4294,9 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootShaderResourceView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4305,9 +4306,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootShaderResourceVie
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootShaderResourceView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4317,9 +4318,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootShaderResourceVi
}
static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootUnorderedAccessView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4329,9 +4330,9 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetComputeRootUnorderedAccessVi
}
static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessView(
- ID3D12GraphicsCommandList1 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
+ ID3D12GraphicsCommandList2 *iface, UINT root_parameter_index, D3D12_GPU_VIRTUAL_ADDRESS address)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
TRACE("iface %p, root_parameter_index %u, address %#"PRIx64".\n",
iface, root_parameter_index, address);
@@ -4340,10 +4341,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetGraphicsRootUnorderedAccessV
root_parameter_index, address);
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12GraphicsCommandList2 *iface,
const D3D12_INDEX_BUFFER_VIEW *view)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_vk_device_procs *vk_procs;
struct d3d12_resource *resource;
enum VkIndexType index_type;
@@ -4378,10 +4379,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetIndexBuffer(ID3D12Graphics
view->BufferLocation - resource->gpu_address, index_type));
}
-static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12GraphicsCommandList2 *iface,
UINT start_slot, UINT view_count, const D3D12_VERTEX_BUFFER_VIEW *views)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct vkd3d_null_resources *null_resources;
struct vkd3d_gpu_va_allocator *gpu_va_allocator;
VkDeviceSize offsets[ARRAY_SIZE(list->strides)];
@@ -4430,10 +4431,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_IASetVertexBuffers(ID3D12Graphi
d3d12_command_list_invalidate_current_pipeline(list);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsCommandList2 *iface,
UINT start_slot, UINT view_count, const D3D12_STREAM_OUTPUT_BUFFER_VIEW *views)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
VkDeviceSize offsets[ARRAY_SIZE(list->so_counter_buffers)];
VkDeviceSize sizes[ARRAY_SIZE(list->so_counter_buffers)];
VkBuffer buffers[ARRAY_SIZE(list->so_counter_buffers)];
@@ -4495,11 +4496,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_SOSetTargets(ID3D12GraphicsComm
VK_CALL(vkCmdBindTransformFeedbackBuffersEXT(list->vk_command_buffer, first, count, buffers, offsets, sizes));
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetRenderTargets(ID3D12GraphicsCommandList2 *iface,
UINT render_target_descriptor_count, const D3D12_CPU_DESCRIPTOR_HANDLE *render_target_descriptors,
BOOL single_descriptor_handle, const D3D12_CPU_DESCRIPTOR_HANDLE *depth_stencil_descriptor)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_rtv_desc *rtv_desc;
const struct d3d12_dsv_desc *dsv_desc;
VkFormat prev_dsv_format;
@@ -4700,12 +4701,12 @@ static void d3d12_command_list_clear(struct d3d12_command_list *list,
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12GraphicsCommandList2 *iface,
D3D12_CPU_DESCRIPTOR_HANDLE dsv, D3D12_CLEAR_FLAGS flags, float depth, UINT8 stencil,
UINT rect_count, const D3D12_RECT *rects)
{
const union VkClearValue clear_value = {.depthStencil = {depth, stencil}};
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_dsv_desc *dsv_desc = d3d12_dsv_desc_from_cpu_handle(dsv);
struct VkAttachmentDescription attachment_desc;
struct VkAttachmentReference ds_reference;
@@ -4749,10 +4750,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearDepthStencilView(ID3D12Gra
&clear_value, rect_count, rects);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearRenderTargetView(ID3D12GraphicsCommandList2 *iface,
D3D12_CPU_DESCRIPTOR_HANDLE rtv, const FLOAT color[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const struct d3d12_rtv_desc *rtv_desc = d3d12_rtv_desc_from_cpu_handle(rtv);
struct VkAttachmentDescription attachment_desc;
struct VkAttachmentReference color_reference;
@@ -4995,11 +4996,11 @@ static const struct vkd3d_format *vkd3d_fixup_clear_uav_uint_colour(struct d3d12
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID3D12GraphicsCommandList2 *iface,
D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource,
const UINT values[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_device *device = list->device;
struct vkd3d_view *view, *uint_view = NULL;
struct vkd3d_texture_view_desc view_desc;
@@ -5057,11 +5058,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID
vkd3d_view_decref(uint_view, device);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(ID3D12GraphicsCommandList2 *iface,
D3D12_GPU_DESCRIPTOR_HANDLE gpu_handle, D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle, ID3D12Resource *resource,
const float values[4], UINT rect_count, const D3D12_RECT *rects)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *resource_impl;
VkClearColorValue colour;
struct vkd3d_view *view;
@@ -5076,16 +5077,16 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewFloat(I
d3d12_command_list_clear_uav(list, resource_impl, view, &colour, rect_count, rects);
}
-static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_DiscardResource(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *resource, const D3D12_DISCARD_REGION *region)
{
FIXME_ONCE("iface %p, resource %p, region %p stub!\n", iface, resource, region);
}
-static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
const struct vkd3d_vk_device_procs *vk_procs;
VkQueryControlFlags flags = 0;
@@ -5112,10 +5113,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_BeginQuery(ID3D12GraphicsComman
VK_CALL(vkCmdBeginQuery(list->vk_command_buffer, query_heap->vk_query_pool, index, flags));
}
-static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_EndQuery(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT index)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
const struct vkd3d_vk_device_procs *vk_procs;
@@ -5157,12 +5158,12 @@ static size_t get_query_stride(D3D12_QUERY_TYPE type)
return sizeof(uint64_t);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12GraphicsCommandList2 *iface,
ID3D12QueryHeap *heap, D3D12_QUERY_TYPE type, UINT start_index, UINT query_count,
ID3D12Resource *dst_buffer, UINT64 aligned_dst_buffer_offset)
{
const struct d3d12_query_heap *query_heap = unsafe_impl_from_ID3D12QueryHeap(heap);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *buffer = unsafe_impl_from_ID3D12Resource(dst_buffer);
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i, first, count;
@@ -5238,10 +5239,10 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveQueryData(ID3D12Graphics
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *buffer, UINT64 aligned_buffer_offset, D3D12_PREDICATION_OP operation)
{
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
struct d3d12_resource *resource = unsafe_impl_from_ID3D12Resource(buffer);
const struct vkd3d_vulkan_info *vk_info = &list->device->vk_info;
const struct vkd3d_vk_device_procs *vk_procs;
@@ -5310,19 +5311,19 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetPredication(ID3D12GraphicsCo
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetMarker(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetMarker(ID3D12GraphicsCommandList2 *iface,
UINT metadata, const void *data, UINT size)
{
FIXME("iface %p, metadata %#x, data %p, size %u stub!\n", iface, metadata, data, size);
}
-static void STDMETHODCALLTYPE d3d12_command_list_BeginEvent(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_BeginEvent(ID3D12GraphicsCommandList2 *iface,
UINT metadata, const void *data, UINT size)
{
FIXME("iface %p, metadata %#x, data %p, size %u stub!\n", iface, metadata, data, size);
}
-static void STDMETHODCALLTYPE d3d12_command_list_EndEvent(ID3D12GraphicsCommandList1 *iface)
+static void STDMETHODCALLTYPE d3d12_command_list_EndEvent(ID3D12GraphicsCommandList2 *iface)
{
FIXME("iface %p stub!\n", iface);
}
@@ -5331,14 +5332,14 @@ STATIC_ASSERT(sizeof(VkDispatchIndirectCommand) == sizeof(D3D12_DISPATCH_ARGUMEN
STATIC_ASSERT(sizeof(VkDrawIndexedIndirectCommand) == sizeof(D3D12_DRAW_INDEXED_ARGUMENTS));
STATIC_ASSERT(sizeof(VkDrawIndirectCommand) == sizeof(D3D12_DRAW_ARGUMENTS));
-static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsCommandList2 *iface,
ID3D12CommandSignature *command_signature, UINT max_command_count, ID3D12Resource *arg_buffer,
UINT64 arg_buffer_offset, ID3D12Resource *count_buffer, UINT64 count_buffer_offset)
{
struct d3d12_command_signature *sig_impl = unsafe_impl_from_ID3D12CommandSignature(command_signature);
struct d3d12_resource *count_impl = unsafe_impl_from_ID3D12Resource(count_buffer);
struct d3d12_resource *arg_impl = unsafe_impl_from_ID3D12Resource(arg_buffer);
- struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface);
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
const D3D12_COMMAND_SIGNATURE_DESC *signature_desc;
const struct vkd3d_vk_device_procs *vk_procs;
unsigned int i;
@@ -5432,7 +5433,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsC
}
}
-static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_buffer, UINT64 dst_offset,
ID3D12Resource *src_buffer, UINT64 src_offset,
UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
@@ -5445,7 +5446,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT(ID3D12Grap
dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
}
-static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_buffer, UINT64 dst_offset,
ID3D12Resource *src_buffer, UINT64 src_offset,
UINT dependent_resource_count, ID3D12Resource * const *dependent_resources,
@@ -5458,20 +5459,20 @@ static void STDMETHODCALLTYPE d3d12_command_list_AtomicCopyBufferUINT64(ID3D12Gr
dependent_resource_count, dependent_resources, dependent_sub_resource_ranges);
}
-static void STDMETHODCALLTYPE d3d12_command_list_OMSetDepthBounds(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_OMSetDepthBounds(ID3D12GraphicsCommandList2 *iface,
FLOAT min, FLOAT max)
{
FIXME("iface %p, min %.8e, max %.8e stub!\n", iface, min, max);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetSamplePositions(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_SetSamplePositions(ID3D12GraphicsCommandList2 *iface,
UINT sample_count, UINT pixel_count, D3D12_SAMPLE_POSITION *sample_positions)
{
FIXME("iface %p, sample_count %u, pixel_count %u, sample_positions %p stub!\n",
iface, sample_count, pixel_count, sample_positions);
}
-static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12GraphicsCommandList1 *iface,
+static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12GraphicsCommandList2 *iface,
ID3D12Resource *dst_resource, UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
ID3D12Resource *src_resource, UINT src_sub_resource_idx,
D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode)
@@ -5483,12 +5484,29 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12
src_resource, src_sub_resource_idx, src_rect, format, mode);
}
-static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList1 *iface, UINT mask)
+static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList2 *iface, UINT mask)
{
FIXME("iface %p, mask %#x stub!\n", iface, mask);
}
-static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
+static void STDMETHODCALLTYPE d3d12_command_list_WriteBufferImmediate(ID3D12GraphicsCommandList2 *iface,
+ UINT count, const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
+ const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes)
+{
+ struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList2(iface);
+ struct d3d12_resource *resource;
+ unsigned int i;
+
+ FIXME("iface %p, count %u, parameters %p, modes %p stub!\n", iface, count, parameters, modes);
+
+ for (i = 0; i < count; ++i)
+ {
+ resource = vkd3d_gpu_va_allocator_dereference(&list->device->gpu_va_allocator, parameters[i].Dest);
+ d3d12_command_list_track_resource_usage(list, resource);
+ }
+}
+
+static const struct ID3D12GraphicsCommandList2Vtbl d3d12_command_list_vtbl =
{
/* IUnknown methods */
d3d12_command_list_QueryInterface,
@@ -5562,6 +5580,8 @@ static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
d3d12_command_list_SetSamplePositions,
d3d12_command_list_ResolveSubresourceRegion,
d3d12_command_list_SetViewInstanceMask,
+ /* ID3D12GraphicsCommandList2 methods */
+ d3d12_command_list_WriteBufferImmediate,
};
static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12CommandList *iface)
@@ -5569,7 +5589,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, ID3D12GraphicsCommandList1_iface);
+ return CONTAINING_RECORD(iface, struct d3d12_command_list, ID3D12GraphicsCommandList2_iface);
}
static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d3d12_device *device,
@@ -5578,7 +5598,7 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
{
HRESULT hr;
- list->ID3D12GraphicsCommandList1_iface.lpVtbl = &d3d12_command_list_vtbl;
+ list->ID3D12GraphicsCommandList2_iface.lpVtbl = &d3d12_command_list_vtbl;
list->refcount = 1;
list->type = type;
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index e3bb2aa..96ab6b7 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2308,8 +2308,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommandList(ID3D12Device *if
initial_pipeline_state, &object)))
return hr;
- return return_interface(&object->ID3D12GraphicsCommandList1_iface,
- &IID_ID3D12GraphicsCommandList1, riid, command_list);
+ return return_interface(&object->ID3D12GraphicsCommandList2_iface,
+ &IID_ID3D12GraphicsCommandList2, riid, command_list);
}
/* Direct3D feature levels restrict which formats can be optionally supported. */
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 9ff6bba..0c031d2 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -931,7 +931,7 @@ struct vkd3d_pipeline_bindings
/* ID3D12CommandList */
struct d3d12_command_list
{
- ID3D12GraphicsCommandList1 ID3D12GraphicsCommandList1_iface;
+ ID3D12GraphicsCommandList2 ID3D12GraphicsCommandList2_iface;
LONG refcount;
D3D12_COMMAND_LIST_TYPE type;
diff --git a/tests/d3d12.c b/tests/d3d12.c
index b08f115..323ef23 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -32776,9 +32776,9 @@ static void test_write_buffer_immediate(void)
get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
value = get_readback_uint(&rb, 0, 0, 0);
- ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ todo ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
value = get_readback_uint(&rb, 1, 0, 0);
- ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ todo ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
release_resource_readback(&rb);
reset_command_list(command_list, context.allocator);
@@ -32795,16 +32795,16 @@ static void test_write_buffer_immediate(void)
get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
value = get_readback_uint(&rb, 0, 0, 0);
- ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ todo ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
value = get_readback_uint(&rb, 1, 0, 0);
- ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ todo ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
release_resource_readback(&rb);
reset_command_list(command_list, context.allocator);
modes[0] = 0x7fffffff;
ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
hr = ID3D12GraphicsCommandList_Close(command_list);
- ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ todo ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ID3D12Resource_Release(buffer);
ID3D12GraphicsCommandList2_Release(command_list2);
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 2/6] vkd3d/tests: Add tests for ID3D12GraphicsCommandList2::WriteBufferImmediate().
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
This supersedes patch 174170.
include/vkd3d_d3d12.idl | 26 +++++++++++++++
tests/d3d12.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 110 insertions(+)
diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index b887480..3bfe47b 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -177,6 +177,13 @@ typedef enum D3D12_FORMAT_SUPPORT2
D3D12_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY = 0x00004000,
} D3D12_FORMAT_SUPPORT2;
+typedef enum D3D12_WRITEBUFFERIMMEDIATE_MODE
+{
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT = 0x0,
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN = 0x1,
+ D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT = 0x2,
+} D3D12_WRITEBUFFERIMMEDIATE_MODE;
+
interface ID3D12Fence;
interface ID3D12RootSignature;
interface ID3D12Heap;
@@ -1657,6 +1664,12 @@ typedef enum D3D12_RESIDENCY_PRIORITY
D3D12_RESIDENCY_PRIORITY_MAXIMUM = 0xc8000000,
} D3D12_RESIDENCY_PRIORITY;
+typedef struct D3D12_WRITEBUFFERIMMEDIATE_PARAMETER
+{
+ D3D12_GPU_VIRTUAL_ADDRESS Dest;
+ UINT32 Value;
+} D3D12_WRITEBUFFERIMMEDIATE_PARAMETER;
+
[
uuid(c4fec28f-7966-4e95-9f94-f431cb56c3b8),
object,
@@ -2004,6 +2017,19 @@ interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
void SetViewInstanceMask(UINT mask);
}
+[
+ uuid(38c3e585-ff17-412c-9150-4fc6f9d72a28),
+ object,
+ local,
+ pointer_default(unique)
+]
+interface ID3D12GraphicsCommandList2 : ID3D12GraphicsCommandList1
+{
+ void WriteBufferImmediate(UINT count,
+ const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER *parameters,
+ const D3D12_WRITEBUFFERIMMEDIATE_MODE *modes);
+}
+
typedef enum D3D12_TILE_RANGE_FLAGS
{
D3D12_TILE_RANGE_FLAG_NONE = 0x0,
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 578ae56..b08f115 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -32728,6 +32728,89 @@ static void test_bufinfo_instruction(void)
destroy_test_context(&context);
}
+static void test_write_buffer_immediate(void)
+{
+ D3D12_WRITEBUFFERIMMEDIATE_PARAMETER parameters[2];
+ ID3D12GraphicsCommandList2 *command_list2;
+ D3D12_WRITEBUFFERIMMEDIATE_MODE modes[2];
+ ID3D12GraphicsCommandList *command_list;
+ struct resource_readback rb;
+ struct test_context context;
+ ID3D12CommandQueue *queue;
+ ID3D12Resource *buffer;
+ ID3D12Device *device;
+ unsigned int value;
+ HRESULT hr;
+
+ static const unsigned int data_values[] = {0xdeadbeef, 0xf00baa};
+
+ if (!init_test_context(&context, NULL))
+ return;
+ device = context.device;
+ command_list = context.list;
+ queue = context.queue;
+
+ if (FAILED(hr = ID3D12GraphicsCommandList_QueryInterface(command_list,
+ &IID_ID3D12GraphicsCommandList2, (void **)&command_list2)))
+ {
+ skip("ID3D12GraphicsCommandList2 not implemented.\n");
+ destroy_test_context(&context);
+ return;
+ }
+
+ buffer = create_default_buffer(device, sizeof(data_values),
+ D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST);
+ upload_buffer_data(buffer, 0, sizeof(data_values), data_values, queue, command_list);
+ reset_command_list(command_list, context.allocator);
+
+ parameters[0].Dest = ID3D12Resource_GetGPUVirtualAddress(buffer);
+ parameters[0].Value = 0x1020304;
+ parameters[1].Dest = parameters[0].Dest + sizeof(data_values[0]);
+ parameters[1].Value = 0xc0d0e0f;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, NULL);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ exec_command_list(queue, command_list);
+ wait_queue_idle(device, queue);
+ reset_command_list(command_list, context.allocator);
+
+ get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
+ value = get_readback_uint(&rb, 0, 0, 0);
+ ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ value = get_readback_uint(&rb, 1, 0, 0);
+ ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ release_resource_readback(&rb);
+ reset_command_list(command_list, context.allocator);
+
+ parameters[0].Value = 0x2030405;
+ parameters[1].Value = 0xb0c0d0e;
+ modes[0] = D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN;
+ modes[1] = D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
+ exec_command_list(queue, command_list);
+ wait_queue_idle(device, queue);
+ reset_command_list(command_list, context.allocator);
+
+ get_buffer_readback_with_command_list(buffer, DXGI_FORMAT_R32_UINT, &rb, queue, command_list);
+ value = get_readback_uint(&rb, 0, 0, 0);
+ ok(value == parameters[0].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[0].Value);
+ value = get_readback_uint(&rb, 1, 0, 0);
+ ok(value == parameters[1].Value, "Got unexpected value %#x, expected %#x.\n", value, parameters[1].Value);
+ release_resource_readback(&rb);
+ reset_command_list(command_list, context.allocator);
+
+ modes[0] = 0x7fffffff;
+ ID3D12GraphicsCommandList2_WriteBufferImmediate(command_list2, ARRAY_SIZE(parameters), parameters, modes);
+ hr = ID3D12GraphicsCommandList_Close(command_list);
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+
+ ID3D12Resource_Release(buffer);
+ ID3D12GraphicsCommandList2_Release(command_list2);
+ destroy_test_context(&context);
+}
+
START_TEST(d3d12)
{
parse_args(argc, argv);
@@ -32891,4 +32974,5 @@ START_TEST(d3d12)
run_test(test_early_depth_stencil_tests);
run_test(test_conditional_rendering);
run_test(test_bufinfo_instruction);
+ run_test(test_write_buffer_immediate);
}
--
2.11.0
Dec. 6, 2019
[PATCH vkd3d 1/6] vkd3d: Add SetViewInstanceMask() to the ID3D12GraphicsCommandList1 interface.
by Henri Verbeet
From: Conor McCarthy <cmccarthy(a)codeweavers.com>
This method was missing in version 10.0.15063.0 of the SDK, but is
present in version 10.0.18362.0, without a UUID change. Presumably that
means this was simply an omission in the older header, rather than an
API change in the newer header.
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
include/vkd3d_d3d12.idl | 2 ++
libs/vkd3d/command.c | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/include/vkd3d_d3d12.idl b/include/vkd3d_d3d12.idl
index ec8b83d..b887480 100644
--- a/include/vkd3d_d3d12.idl
+++ b/include/vkd3d_d3d12.idl
@@ -2000,6 +2000,8 @@ interface ID3D12GraphicsCommandList1 : ID3D12GraphicsCommandList
UINT dst_sub_resource_idx, UINT dst_x, UINT dst_y,
ID3D12Resource *src_resource, UINT src_sub_resource_idx,
D3D12_RECT *src_rect, DXGI_FORMAT format, D3D12_RESOLVE_MODE mode);
+
+ void SetViewInstanceMask(UINT mask);
}
typedef enum D3D12_TILE_RANGE_FLAGS
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 75af27d..d6feecf 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -5483,6 +5483,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResolveSubresourceRegion(ID3D12
src_resource, src_sub_resource_idx, src_rect, format, mode);
}
+static void STDMETHODCALLTYPE d3d12_command_list_SetViewInstanceMask(ID3D12GraphicsCommandList1 *iface, UINT mask)
+{
+ FIXME("iface %p, mask %#x stub!\n", iface, mask);
+}
+
static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
{
/* IUnknown methods */
@@ -5556,6 +5561,7 @@ static const struct ID3D12GraphicsCommandList1Vtbl d3d12_command_list_vtbl =
d3d12_command_list_OMSetDepthBounds,
d3d12_command_list_SetSamplePositions,
d3d12_command_list_ResolveSubresourceRegion,
+ d3d12_command_list_SetViewInstanceMask,
};
static struct d3d12_command_list *unsafe_impl_from_ID3D12CommandList(ID3D12CommandList *iface)
--
2.11.0
Dec. 6, 2019
[PATCH] odbcbcp: add new stub dll
by Louis Lenders
https://bugs.winehq.org/show_bug.cgi?id=48234
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com>
---
configure | 2 ++
configure.ac | 1 +
dlls/odbcbcp/Makefile.in | 6 ++++++
dlls/odbcbcp/main.c | 40 +++++++++++++++++++++++++++++++++++++++
dlls/odbcbcp/odbcbcp.spec | 28 +++++++++++++++++++++++++++
5 files changed, 77 insertions(+)
create mode 100644 dlls/odbcbcp/Makefile.in
create mode 100644 dlls/odbcbcp/main.c
create mode 100644 dlls/odbcbcp/odbcbcp.spec
diff --git a/configure b/configure
index 822669da7e..576500d8af 100755
--- a/configure
+++ b/configure
@@ -1493,6 +1493,7 @@ enable_ntoskrnl_exe
enable_ntprint
enable_objsel
enable_odbc32
+enable_odbcbcp
enable_odbccp32
enable_odbccu32
enable_ole32
@@ -20702,6 +20703,7 @@ wine_fn_config_makefile dlls/ntprint enable_ntprint
wine_fn_config_makefile dlls/ntprint/tests enable_tests
wine_fn_config_makefile dlls/objsel enable_objsel
wine_fn_config_makefile dlls/odbc32 enable_odbc32
+wine_fn_config_makefile dlls/odbcbcp enable_odbcbcp
wine_fn_config_makefile dlls/odbccp32 enable_odbccp32
wine_fn_config_makefile dlls/odbccp32/tests enable_tests
wine_fn_config_makefile dlls/odbccu32 enable_odbccu32
diff --git a/configure.ac b/configure.ac
index 7f2c3cda23..a002788041 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3557,6 +3557,7 @@ WINE_CONFIG_MAKEFILE(dlls/ntprint)
WINE_CONFIG_MAKEFILE(dlls/ntprint/tests)
WINE_CONFIG_MAKEFILE(dlls/objsel)
WINE_CONFIG_MAKEFILE(dlls/odbc32)
+WINE_CONFIG_MAKEFILE(dlls/odbcbcp)
WINE_CONFIG_MAKEFILE(dlls/odbccp32)
WINE_CONFIG_MAKEFILE(dlls/odbccp32/tests)
WINE_CONFIG_MAKEFILE(dlls/odbccu32)
diff --git a/dlls/odbcbcp/Makefile.in b/dlls/odbcbcp/Makefile.in
new file mode 100644
index 0000000000..c0269cb5a9
--- /dev/null
+++ b/dlls/odbcbcp/Makefile.in
@@ -0,0 +1,6 @@
+MODULE = odbcbcp.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+
+C_SRCS = \
+ main.c
diff --git a/dlls/odbcbcp/main.c b/dlls/odbcbcp/main.c
new file mode 100644
index 0000000000..ef7920765d
--- /dev/null
+++ b/dlls/odbcbcp/main.c
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2019 Louis Lenders
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(odbcbcp);
+
+BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved)
+{
+ TRACE("(%p, %d, %p)\n", dll, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(dll);
+ break;
+ }
+ return TRUE;
+}
diff --git a/dlls/odbcbcp/odbcbcp.spec b/dlls/odbcbcp/odbcbcp.spec
new file mode 100644
index 0000000000..abaeff1003
--- /dev/null
+++ b/dlls/odbcbcp/odbcbcp.spec
@@ -0,0 +1,28 @@
+@ stub bcp_batch
+@ stub bcp_bind
+@ stub bcp_colfmt
+@ stub bcp_collen
+@ stub bcp_colptr
+@ stub bcp_columns
+@ stub bcp_control
+@ stub bcp_done
+@ stub bcp_exec
+@ stub bcp_getcolfmt
+@ stub bcp_initA
+@ stub bcp_initW
+@ stub bcp_moretext
+@ stub bcp_readfmtA
+@ stub bcp_readfmtW
+@ stub bcp_sendrow
+@ stub bcp_setcolfmt
+@ stub bcp_writefmtA
+@ stub bcp_writefmtW
+@ stub dbprtypeA
+@ stub dbprtypeW
+@ stub LibMain
+@ stub SQLCloseEnumServers
+@ stub SQLGetNextEnumeration
+@ stub SQLInitEnumServers
+@ stub SQLLinkedCatalogsA
+@ stub SQLLinkedCatalogsW
+@ stub SQLLinkedServers
--
2.24.0
Dec. 6, 2019
Re: [PATCH 4/4] d3d8: Update the primary stateblock in d3d8_device_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 3/4] d3d9: Update the primary stateblock in d3d9_device_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 2/4] ddraw: Update the primary stateblock in d3d_device7_MultiplyTransform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH 1/4] wined3d: Introduce wined3d_stateblock_multiply_transform().
by Henri Verbeet
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Dec. 6, 2019
Re: [PATCH v3 3/3] xmllite: Expand test for any unparsed data at end of XML.
by Nikolay Sivov
On 12/5/19 10:53 PM, Jeff Smith wrote:
> @@ -2662,7 +2663,7 @@ static HRESULT reader_parse_nextnode(xmlreader *reader)
> hr = reader_parse_misc(reader);
> if (hr != S_FALSE) return hr;
>
> - if (*reader_get_ptr(reader))
> + if (buffer->cur*sizeof(WCHAR) < buffer->written)
> {
> WARN("found garbage in the end of XML\n");
> return WC_E_SYNTAX;
That means we don't have enough data, it's another change not backed by
tests and potentially depending on current read-ahead buffer size/filled
level.
Dec. 6, 2019
Re: [PATCH v3 2/3] xmllite: Whitespace node not returned when followed by invalid character.
by Nikolay Sivov
On 12/5/19 10:53 PM, Jeff Smith wrote:
> Signed-off-by: Jeff Smith <whydoubt(a)gmail.com>
> ---
> dlls/xmllite/reader.c | 12 ++++++++++--
> dlls/xmllite/tests/reader.c | 2 --
> 2 files changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c
> index eddc4d8eec..79e5c2253a 100644
> --- a/dlls/xmllite/reader.c
> +++ b/dlls/xmllite/reader.c
> @@ -1113,8 +1113,8 @@ static inline UINT reader_get_cur(xmlreader *reader)
> static inline WCHAR *reader_get_ptr(xmlreader *reader)
> {
> encoded_buffer *buffer = &reader->input->buffer->utf16;
> - WCHAR *ptr = (WCHAR*)buffer->data + buffer->cur;
> - if (!*ptr) reader_more(reader);
> + if (buffer->cur*sizeof(WCHAR) >= buffer->written)
> + reader_more(reader);
> return (WCHAR*)buffer->data + buffer->cur;
> }
Why do you need to change that? It's used everywhere.
>
> @@ -1714,8 +1714,16 @@ static HRESULT reader_parse_whitespace(xmlreader *reader)
> {
> strval value;
> UINT start;
> + const encoded_buffer *buffer = &reader->input->buffer->utf16;
>
> reader_skipspaces(reader);
> +
> + /* Do NOT return Whitespace node if followed by a character other than '<'.
> + * The reader_skipspaces call should have already read in the character. */
> + if (buffer->cur*sizeof(WCHAR) < buffer->written &&
> + *reader_get_ptr2(reader, buffer->cur) != '<')
> + return WC_E_SYNTAX;
> +
Buffer access should not be exposed like that.
> if (is_reader_pending(reader)) return S_OK;
>
> start = reader->resume[XmlReadResume_Body];
> diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
> index 88b9103e1e..b02301907d 100644
> --- a/dlls/xmllite/tests/reader.c
> +++ b/dlls/xmllite/tests/reader.c
> @@ -1064,10 +1064,8 @@ todo_wine
>
> type = -1;
> hr = IXmlReader_Read(reader, &type);
> -todo_wine {
> ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "expected WC_E_SYNTAX, got 0x%08x\n", hr);
> ok(type == XmlNodeType_None, "expected XmlNodeType_None, got %s\n", type_to_str(type));
> -}
>
> stream = create_stream_on_data(xml_comment, sizeof(xml_comment));
> hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
Dec. 6, 2019
[PATCH] msiexec: Check registry value type again for consistency.
by Serge Gautherie
Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr>
---
programs/msiexec/msiexec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c
index 17d4bf8..c586a91 100644
--- a/programs/msiexec/msiexec.c
+++ b/programs/msiexec/msiexec.c
@@ -573,14 +573,14 @@ static BOOL process_args_from_reg( const WCHAR *ident, int *pargc, WCHAR ***parg
{
LONG r;
HKEY hkey;
- DWORD sz = 0, type = 0;
+ DWORD sz, type;
WCHAR *buf;
BOOL ret = FALSE;
r = RegOpenKeyW(HKEY_LOCAL_MACHINE, InstallRunOnce, &hkey);
if(r != ERROR_SUCCESS)
return FALSE;
- r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
+ r = RegQueryValueExW(hkey, ident, NULL, &type, NULL, &sz);
if(r == ERROR_SUCCESS && type == REG_SZ)
{
int len = lstrlenW( *pargv[0] );
@@ -591,8 +591,8 @@ static BOOL process_args_from_reg( const WCHAR *ident, int *pargc, WCHAR ***parg
}
memcpy( buf, *pargv[0], len * sizeof(WCHAR) );
buf[len++] = ' ';
- r = RegQueryValueExW(hkey, ident, 0, &type, (LPBYTE)(buf + len), &sz);
- if( r == ERROR_SUCCESS )
+ r = RegQueryValueExW(hkey, ident, NULL, &type, (LPBYTE)(buf + len), &sz);
+ if (r == ERROR_SUCCESS && type == REG_SZ)
{
process_args(buf, pargc, pargv);
ret = TRUE;
--
2.10.0.windows.1
Dec. 6, 2019
Re: [PATCH resend 2/2] user32/listbox: Set the selection if it's currently invalid in HandleTimer.
by Marvin
Hi,
While running your changed tests, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at:
https://testbot.winehq.org/JobDetails.pl?Key=61516
Your paranoid android.
=== debian10 (32 bit report) ===
user32:
msg.c:8782: Test failed: WaitForSingleObject failed 102
msg.c:8788: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead
msg.c:8788: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead
msg.c:8788: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
Dec. 6, 2019
[PATCH 3/3] dwmapi: Add partial implementation of DWMWA_EXTENDED_FRAME_BOUNDS.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
This stops Unity games like Variables (steam appid 1054800) from complaining
when changing full-screen mode.
dlls/dwmapi/Makefile.in | 1 +
dlls/dwmapi/dwmapi_main.c | 7 +++++++
dlls/dwmapi/tests/dwmapi.c | 14 ++++++++++++++
3 files changed, 22 insertions(+)
diff --git a/dlls/dwmapi/Makefile.in b/dlls/dwmapi/Makefile.in
index 3a36913..d273a22 100644
--- a/dlls/dwmapi/Makefile.in
+++ b/dlls/dwmapi/Makefile.in
@@ -1,5 +1,6 @@
MODULE = dwmapi.dll
IMPORTLIB = dwmapi
+IMPORTS = user32
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index e976fda..212c88c 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -217,6 +217,13 @@ HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attrib
*(BOOL*)(pv_attribute) = FALSE;
break;
+ case DWMWA_EXTENDED_FRAME_BOUNDS:
+ if (size < sizeof(RECT)) return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
+
+ WARN("DWMWA_EXTENDED_FRAME_BOUNDS: returning window rect.\n");
+ GetWindowRect(hwnd, pv_attribute);
+ break;
+
case DWMWA_CLOAKED:
if (size < sizeof(DWORD)) return E_INVALIDARG;
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
index a520991..1463140 100644
--- a/dlls/dwmapi/tests/dwmapi.c
+++ b/dlls/dwmapi/tests/dwmapi.c
@@ -31,6 +31,7 @@ static LRESULT WINAPI test_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARA
static void test_DwmGetWindowAttribute(void)
{
BOOL nc_rendering;
+ RECT rc, rc2;
HRESULT hr;
hr = pDwmGetWindowAttribute(NULL, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
@@ -47,6 +48,19 @@ static void test_DwmGetWindowAttribute(void)
hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) failed 0x%08x.\n", hr);
ok(nc_rendering == FALSE || nc_rendering == TRUE, "non-boolean value 0x%x.\n", nc_rendering);
+
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rc, sizeof(rc) - 1);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) || broken(hr == E_INVALIDARG) /* Vista */,
+ "DwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rc, sizeof(rc));
+ if (hr != E_HANDLE && broken(hr != DWM_E_COMPOSITIONDISABLED) /* Vista */) /* composition is on */
+ {
+ /* For top-level Windows, the returned rect is always at least as large as GetWindowRect */
+ GetWindowRect(test_wnd, &rc2);
+ ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_EXTENDED_FRAME_BOUNDS) failed 0x%08x.\n", hr);
+ ok(rc.left >= rc2.left && rc.right <= rc2.right && rc.top >= rc2.top && rc.bottom <= rc2.bottom,
+ "returned rect %s not enclosed in window rect %s.\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&rc2));
+ }
}
START_TEST(dwmapi)
--
2.21.0
Dec. 6, 2019
[PATCH 2/3] dwmapi: Add basic tests for DwmGetWindowAttribute.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
configure | 1 +
configure.ac | 1 +
dlls/dwmapi/tests/Makefile.in | 6 +++
dlls/dwmapi/tests/dwmapi.c | 88 +++++++++++++++++++++++++++++++++++
4 files changed, 96 insertions(+)
create mode 100644 dlls/dwmapi/tests/Makefile.in
create mode 100644 dlls/dwmapi/tests/dwmapi.c
diff --git a/configure b/configure
index 822669d..5cf03fd 100755
--- a/configure
+++ b/configure
@@ -20388,6 +20388,7 @@ wine_fn_config_makefile dlls/dssenh/tests enable_tests
wine_fn_config_makefile dlls/dswave enable_dswave
wine_fn_config_makefile dlls/dswave/tests enable_tests
wine_fn_config_makefile dlls/dwmapi enable_dwmapi
+wine_fn_config_makefile dlls/dwmapi/tests enable_tests
wine_fn_config_makefile dlls/dwrite enable_dwrite
wine_fn_config_makefile dlls/dwrite/tests enable_tests
wine_fn_config_makefile dlls/dx8vb enable_dx8vb
diff --git a/configure.ac b/configure.ac
index 7f2c3cd..a69e9df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3243,6 +3243,7 @@ WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
WINE_CONFIG_MAKEFILE(dlls/dswave)
WINE_CONFIG_MAKEFILE(dlls/dswave/tests)
WINE_CONFIG_MAKEFILE(dlls/dwmapi)
+WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
WINE_CONFIG_MAKEFILE(dlls/dwrite)
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
diff --git a/dlls/dwmapi/tests/Makefile.in b/dlls/dwmapi/tests/Makefile.in
new file mode 100644
index 0000000..778a40f
--- /dev/null
+++ b/dlls/dwmapi/tests/Makefile.in
@@ -0,0 +1,6 @@
+TESTDLL = dwmapi.dll
+IMPORTS = gdi32 user32
+
+
+C_SRCS = \
+ dwmapi.c
diff --git a/dlls/dwmapi/tests/dwmapi.c b/dlls/dwmapi/tests/dwmapi.c
new file mode 100644
index 0000000..a520991
--- /dev/null
+++ b/dlls/dwmapi/tests/dwmapi.c
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2019 Gabriel Ivăncescu for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "windows.h"
+#include <dwmapi.h>
+#include "wine/test.h"
+
+static HRESULT (WINAPI *pDwmGetWindowAttribute)(HWND, DWORD, PVOID, DWORD);
+
+static HWND test_wnd;
+static LRESULT WINAPI test_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ return DefWindowProcA(hwnd, message, wParam, lParam);
+}
+
+static void test_DwmGetWindowAttribute(void)
+{
+ BOOL nc_rendering;
+ HRESULT hr;
+
+ hr = pDwmGetWindowAttribute(NULL, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == E_HANDLE || broken(hr == E_INVALIDARG) /* Vista */, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, NULL, sizeof(nc_rendering));
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, 0);
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) returned 0x%08x.\n", hr);
+ nc_rendering = FALSE;
+ hr = pDwmGetWindowAttribute(test_wnd, 0xdeadbeef, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == E_INVALIDARG, "DwmGetWindowAttribute(0xdeadbeef) returned 0x%08x.\n", hr);
+
+ nc_rendering = 0xdeadbeef;
+ hr = pDwmGetWindowAttribute(test_wnd, DWMWA_NCRENDERING_ENABLED, &nc_rendering, sizeof(nc_rendering));
+ ok(hr == S_OK, "DwmGetWindowAttribute(DWMWA_NCRENDERING_ENABLED) failed 0x%08x.\n", hr);
+ ok(nc_rendering == FALSE || nc_rendering == TRUE, "non-boolean value 0x%x.\n", nc_rendering);
+}
+
+START_TEST(dwmapi)
+{
+ HINSTANCE inst = GetModuleHandleA(NULL);
+ HMODULE module;
+ WNDCLASSA cls;
+
+ module = LoadLibraryA("dwmapi.dll");
+ if (!module)
+ {
+ win_skip("dwmapi.dll not found\n");
+ return;
+ }
+
+ pDwmGetWindowAttribute = (void*)GetProcAddress(module, "DwmGetWindowAttribute");
+
+ cls.style = 0;
+ cls.lpfnWndProc = test_wndproc;
+ cls.cbClsExtra = 0;
+ cls.cbWndExtra = 0;
+ cls.hInstance = inst;
+ cls.hIcon = 0;
+ cls.hCursor = LoadCursorA(0, (LPCSTR)IDC_ARROW);
+ cls.hbrBackground = GetStockObject(WHITE_BRUSH);
+ cls.lpszMenuName = NULL;
+ cls.lpszClassName = "Test";
+ RegisterClassA(&cls);
+
+ test_wnd = CreateWindowExA(0, "Test", "Test Window", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
+ 100, 100, 200, 200, 0, 0, 0, NULL);
+ ok(test_wnd != NULL, "Failed to create test window.\n");
+
+ test_DwmGetWindowAttribute();
+
+ DestroyWindow(test_wnd);
+ UnregisterClassA("Test", inst);
+ FreeLibrary(module);
+}
--
2.21.0
Dec. 6, 2019
[PATCH 1/3] dwmapi: Improve DwmGetWindowAttribute stub.
by Gabriel Ivăncescu
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/dwmapi/dwmapi_main.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/dwmapi/dwmapi_main.c b/dlls/dwmapi/dwmapi_main.c
index 6378a09..e976fda 100644
--- a/dlls/dwmapi/dwmapi_main.c
+++ b/dlls/dwmapi/dwmapi_main.c
@@ -205,9 +205,31 @@ BOOL WINAPI DwmDefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam,
*/
HRESULT WINAPI DwmGetWindowAttribute(HWND hwnd, DWORD attribute, PVOID pv_attribute, DWORD size)
{
- FIXME("(%p %d %p %d) stub\n", hwnd, attribute, pv_attribute, size);
+ if (!hwnd) return E_HANDLE;
+ if (!pv_attribute) return E_INVALIDARG;
- return E_NOTIMPL;
+ switch (attribute)
+ {
+ case DWMWA_NCRENDERING_ENABLED:
+ if (size < sizeof(BOOL)) return E_INVALIDARG;
+
+ WARN("DWMWA_NCRENDERING_ENABLED: always returning FALSE.\n");
+ *(BOOL*)(pv_attribute) = FALSE;
+ break;
+
+ case DWMWA_CLOAKED:
+ if (size < sizeof(DWORD)) return E_INVALIDARG;
+
+ WARN("DWMWA_CLOAKED: always returning 0.\n");
+ *(DWORD*)(pv_attribute) = 0;
+ break;
+
+ default:
+ FIXME("unimplemented attribute %d, size %u, for hwnd %p.\n", attribute, size, hwnd);
+ return E_INVALIDARG;
+ }
+
+ return S_OK;
}
/**********************************************************************
--
2.21.0
Dec. 6, 2019
[PATCH resend 2/2] user32/listbox: Set the selection if it's currently invalid in HandleTimer.
by Gabriel Ivăncescu
Don't skip MoveCaret if it would actually change the selection when it is
invalid. This can happen, for example, in a combo box if the dropdown is shown
by a mouse click + release followed by the mouse being moved into the dropped
listbox, when the listbox has nothing selected. In this case, the item with
the index zero would not be selected the first time the mouse moves over it,
since the focus_item would be zero, despite the fact the item is not selected.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/user32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c
index 3949610..7051449 100644
--- a/dlls/user32/listbox.c
+++ b/dlls/user32/listbox.c
@@ -2347,7 +2347,7 @@ static LRESULT LISTBOX_HandleTimer( LB_DESCR *descr, INT index, TIMER_DIRECTION
case LB_TIMER_NONE:
break;
}
- if (index == descr->focus_item) return FALSE;
+ if (index == descr->focus_item && descr->selected_item != -1) return FALSE;
LISTBOX_MoveCaret( descr, index, FALSE );
return TRUE;
}
--
2.21.0
Dec. 6, 2019
[PATCH resend 1/2] comctl32/listbox: Set the selection if it's currently invalid in HandleTimer.
by Gabriel Ivăncescu
Don't skip MoveCaret if it would actually change the selection when it is
invalid. This can happen, for example, in a combo box if the dropdown is shown
by a mouse click + release followed by the mouse being moved into the dropped
listbox, when the listbox has nothing selected. In this case, the item with
the index zero would not be selected the first time the mouse moves over it,
since the focus_item would be zero, despite the fact the item is not selected.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/comctl32/listbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 0d6dcd6..7dcc431 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -2332,7 +2332,7 @@ static LRESULT LISTBOX_HandleTimer( LB_DESCR *descr, INT index, TIMER_DIRECTION
case LB_TIMER_NONE:
break;
}
- if (index == descr->focus_item) return FALSE;
+ if (index == descr->focus_item && descr->selected_item != -1) return FALSE;
LISTBOX_MoveCaret( descr, index, FALSE );
return TRUE;
}
--
2.21.0
Dec. 6, 2019
Re: [PATCH] configure.ac: disable -fcf-protection
by Zebediah Figura
On 12/6/19 7:33 AM, Austin English wrote:
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48161
> Signed-off-by: Austin English <austinenglish(a)gmail.com>
> ---
> configure.ac | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 7f2c3cda23..942585adfe 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2113,6 +2113,9 @@ then
> CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
> fi
>
> +dnl **** Disable fcf-protection, it breaks a ton of apps
> +WINE_TRY_CFLAGS([-fcf-protection=none])
> +
> dnl **** Check for CFI directives support ****
>
> AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_cfi_support,
>
Unfortunately this won't help, since WINE_TRY_CFLAGS puts the requested
options into EXTRACFLAGS, but that'll be overriden later by the option
in CFLAGS. We need that option to be removed from the build script.
Dec. 6, 2019
[PATCH resend 2/2] user32/combo: Don't redraw the Combo Box when dropped down if it has an editbox.
by Gabriel Ivăncescu
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child. There's no reason to redraw it in this case since the editbox is
supposed to cover it, anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/user32/combo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index ff5ed18..1b193e4 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -1011,7 +1011,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
SWP_NOACTIVATE | SWP_SHOWWINDOW );
- if( !(lphc->wState & CBF_NOREDRAW) )
+ if( !(lphc->wState & (CBF_NOREDRAW | CBF_EDIT)) )
RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
--
2.21.0
Dec. 6, 2019
[PATCH resend 1/2] comctl32/combo: Don't redraw the Combo Box when dropped down if it has an editbox.
by Gabriel Ivăncescu
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child. There's no reason to redraw it in this case since the editbox is
supposed to cover it, anyway.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
---
dlls/comctl32/combo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c
index 765fc63..c3de4f1 100644
--- a/dlls/comctl32/combo.c
+++ b/dlls/comctl32/combo.c
@@ -1007,7 +1007,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
SWP_NOACTIVATE | SWP_SHOWWINDOW );
- if( !(lphc->wState & CBF_NOREDRAW) )
+ if( !(lphc->wState & (CBF_NOREDRAW | CBF_EDIT)) )
RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
--
2.21.0
Dec. 6, 2019
[PATCH] po: Update German translation.
by Julian Rüger
Thanks Nikolay!
Signed-off-by: Julian Rüger <jr98(a)gmx.net>
Dec. 6, 2019
[PATCH] msvcrt: Support mixing length and width in scanf format.
by Piotr Caban
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45967
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/msvcrt/scanf.h | 13 +++++++------
dlls/msvcrt/tests/scanf.c | 24 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 6 deletions(-)
Dec. 6, 2019
[PATCH] oleaut32: Fix sharing options in TLB_ReadTypeLib.
by Jacek Caban
Spotted by Donna Whisnant and Kevin Puetz.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/oleaut32/typelib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Dec. 6, 2019
[PATCH v4 3/3] bcrypt: Add more BCryptSignHash tests.
by Hans Leidekker
From: Derek Lesho <dlesho(a)codeweavers.com>
v2: Verify signature.
Signed-off-by: Derek Lesho <dlesho(a)codeweavers.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/tests/bcrypt.c | 49 ++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index d125e0c89d..198acbf721 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2049,6 +2049,9 @@ static void test_BCryptSignHash(void)
{
static UCHAR hash[] =
{0x7e,0xe3,0x74,0xe7,0xc5,0x0b,0x6b,0x70,0xdb,0xab,0x32,0x6d,0x1d,0x51,0xd6,0x74,0x79,0x8e,0x5b,0x4b};
+ static UCHAR hash_sha256[] =
+ {0x25,0x2f,0x10,0xc8,0x36,0x10,0xeb,0xca,0x1a,0x05,0x9c,0x0b,0xae,0x82,0x55,0xeb,0xa2,0xf9,0x5b,0xe4,
+ 0xd1,0xd7,0xbC,0xfA,0x89,0xd7,0x24,0x8a,0x82,0xd9,0xf1,0x11};
BCRYPT_PKCS1_PADDING_INFO pad;
BCRYPT_ALG_HANDLE alg;
BCRYPT_KEY_HANDLE key;
@@ -2056,6 +2059,8 @@ static void test_BCryptSignHash(void)
NTSTATUS ret;
ULONG len;
+ /* RSA */
+
ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0);
if (ret)
{
@@ -2087,6 +2092,14 @@ static void test_BCryptSignHash(void)
len = 0;
memset(sig, 0, sizeof(sig));
+
+ /* inference of padding info on RSA not supported */
+ ret = pBCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
+ ok(ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+
+ ret = pBCryptSignHash(key, &pad, hash, sizeof(hash), sig, 0, &len, BCRYPT_PAD_PKCS1);
+ ok(ret == STATUS_BUFFER_TOO_SMALL, "got %08x\n", ret);
+
ret = pBCryptSignHash(key, &pad, hash, sizeof(hash), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
ok(!ret, "got %08x\n", ret);
ok(len == 64, "got %u\n", len);
@@ -2099,6 +2112,42 @@ static void test_BCryptSignHash(void)
ret = pBCryptCloseAlgorithmProvider(alg, 0);
ok(!ret, "got %08x\n", ret);
+
+ /* ECDSA */
+
+ ret = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0);
+ if (ret)
+ {
+ win_skip("failed to open ECDSA provider: %08x\n", ret);
+ return;
+ }
+
+ ret = pBCryptGenerateKeyPair(alg, &key, 256, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+
+ ret = pBCryptFinalizeKeyPair(key, 0);
+ ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
+
+ memset(sig, 0, sizeof(sig));
+ len = 0;
+
+ /* automatically detects padding info */
+ ret = pBCryptSignHash(key, NULL, hash, sizeof(hash), sig, sizeof(sig), &len, 0);
+ ok (!ret, "got %08x\n", ret);
+ ok (len == 64, "got %u\n", len);
+
+ ret = pBCryptVerifySignature(key, NULL, hash, sizeof(hash), sig, len, 0);
+ ok(!ret, "got %08x\n", ret);
+
+ /* mismatch info (SHA-1 != SHA-256) */
+ ret = pBCryptSignHash(key, &pad, hash_sha256, sizeof(hash_sha256), sig, sizeof(sig), &len, BCRYPT_PAD_PKCS1);
+ ok (ret == STATUS_INVALID_PARAMETER, "got %08x\n", ret);
+
+ ret = pBCryptDestroyKey(key);
+ ok(!ret, "got %08x\n", ret);
+
+ ret = pBCryptCloseAlgorithmProvider(alg, 0);
+ ok(!ret, "got %08x\n", ret);
}
static void test_BCryptEnumAlgorithms(void)
--
2.20.1
Dec. 6, 2019
[PATCH v4 2/3] bcrypt: Handle SHA1 hash in key_asymmetric_verify.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/bcrypt/gnutls.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 28a14e9b85..1c31b5625f 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1064,6 +1064,7 @@ NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULO
/* only the hash size must match, not the actual hash function */
switch (hash_len)
{
+ case 20: hash_alg = GNUTLS_DIG_SHA1; break;
case 32: hash_alg = GNUTLS_DIG_SHA256; break;
case 48: hash_alg = GNUTLS_DIG_SHA384; break;
--
2.20.1
Dec. 6, 2019