winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
November 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
895 discussions
Start a n
N
ew thread
Philip Rebohle : vkd3d: Defer compute pipeline update to Dispatch time.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: vkd3d Branch: master Commit: 79da30adc7ce92425ba32a3e86ef856acda70429 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=79da30adc7ce92425ba32a3…
Author: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Date: Mon Nov 11 17:03:38 2019 +0100 vkd3d: Defer compute pipeline update to Dispatch time. Needed to support compute-based clear and copy operations. Signed-off-by: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 73 ++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 34 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index f88f05d..5db2007 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2480,7 +2480,26 @@ static bool d3d12_command_list_update_current_framebuffer(struct d3d12_command_l return true; } -static bool d3d12_command_list_update_current_pipeline(struct d3d12_command_list *list) +static bool d3d12_command_list_update_compute_pipeline(struct d3d12_command_list *list) +{ + const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; + + if (list->current_pipeline != VK_NULL_HANDLE) + return true; + + if (!d3d12_pipeline_state_is_compute(list->state)) + { + WARN("Pipeline state %p is not a compute pipeline.\n", list->state); + return false; + } + + VK_CALL(vkCmdBindPipeline(list->vk_command_buffer, list->state->vk_bind_point, list->state->u.compute.vk_pipeline)); + list->current_pipeline = list->state->u.compute.vk_pipeline; + + return true; +} + +static bool d3d12_command_list_update_graphics_pipeline(struct d3d12_command_list *list) { const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; VkRenderPass vk_render_pass; @@ -2869,6 +2888,18 @@ static void d3d12_command_list_update_descriptors(struct d3d12_command_list *lis d3d12_command_list_update_uav_counter_descriptors(list, bind_point); } +static bool d3d12_command_list_update_compute_state(struct d3d12_command_list *list) +{ + d3d12_command_list_end_current_render_pass(list); + + if (!d3d12_command_list_update_compute_pipeline(list)) + return false; + + d3d12_command_list_update_descriptors(list, VK_PIPELINE_BIND_POINT_COMPUTE); + + return true; +} + static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list) { const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; @@ -2876,13 +2907,7 @@ static bool d3d12_command_list_begin_render_pass(struct d3d12_command_list *list struct VkRenderPassBeginInfo begin_desc; VkRenderPass vk_render_pass; - if (!list->state) - { - WARN("Pipeline state is NULL.\n"); - return false; - } - - if (!d3d12_command_list_update_current_pipeline(list)) + if (!d3d12_command_list_update_graphics_pipeline(list)) return false; if (!d3d12_command_list_update_current_framebuffer(list)) return false; @@ -3007,18 +3032,14 @@ static void STDMETHODCALLTYPE d3d12_command_list_Dispatch(ID3D12GraphicsCommandL TRACE("iface %p, x %u, y %u, z %u.\n", iface, x, y, z); - if (list->state->vk_bind_point != VK_PIPELINE_BIND_POINT_COMPUTE) + if (!d3d12_command_list_update_compute_state(list)) { - WARN("Pipeline state %p has bind point %#x.\n", list->state, list->state->vk_bind_point); + WARN("Failed to update compute state, ignoring dispatch.\n"); return; } vk_procs = &list->device->vk_procs; - d3d12_command_list_end_current_render_pass(list); - - d3d12_command_list_update_descriptors(list, VK_PIPELINE_BIND_POINT_COMPUTE); - VK_CALL(vkCmdDispatch(list->vk_command_buffer, x, y, z)); } @@ -3709,25 +3730,14 @@ static void STDMETHODCALLTYPE d3d12_command_list_SetPipelineState(ID3D12Graphics { struct d3d12_pipeline_state *state = unsafe_impl_from_ID3D12PipelineState(pipeline_state); struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface); - const struct vkd3d_vk_device_procs *vk_procs; TRACE("iface %p, pipeline_state %p.\n", iface, pipeline_state); if (list->state == state) return; - vk_procs = &list->device->vk_procs; - d3d12_command_list_invalidate_bindings(list, state); - - if (d3d12_pipeline_state_is_compute(state)) - { - VK_CALL(vkCmdBindPipeline(list->vk_command_buffer, state->vk_bind_point, state->u.compute.vk_pipeline)); - } - else - { - d3d12_command_list_invalidate_current_pipeline(list); - } + d3d12_command_list_invalidate_current_pipeline(list); list->state = state; } @@ -5232,17 +5242,12 @@ static void STDMETHODCALLTYPE d3d12_command_list_ExecuteIndirect(ID3D12GraphicsC break; } - if (list->state->vk_bind_point != VK_PIPELINE_BIND_POINT_COMPUTE) + if (!d3d12_command_list_update_compute_state(list)) { - WARN("Pipeline state %p has bind point %#x, ignoring dispatch.\n", - list->state, list->state->vk_bind_point); - break; + WARN("Failed to update compute state, ignoring dispatch.\n"); + return; } - d3d12_command_list_end_current_render_pass(list); - - d3d12_command_list_update_descriptors(list, VK_PIPELINE_BIND_POINT_COMPUTE); - VK_CALL(vkCmdDispatchIndirect(list->vk_command_buffer, arg_impl->u.vk_buffer, arg_buffer_offset)); break;
1
0
0
0
Philip Rebohle : vkd3d: Store view object type in vkd3d_view.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: vkd3d Branch: master Commit: 1bfacf3727e977341f193c28c7fd4177fc6b50c6 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=1bfacf3727e977341f193c2…
Author: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Date: Mon Nov 11 17:03:37 2019 +0100 vkd3d: Store view object type in vkd3d_view. Currently, vkd3d_view_destroy_descriptor assumes image views by default, but we need to be able to attach buffer views to command allocators for UAV clears. Signed-off-by: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/resource.c | 44 +++++++++++++++++++++----------------------- libs/vkd3d/vkd3d_private.h | 8 ++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index b4ad846..8615464 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1976,13 +1976,14 @@ ULONG vkd3d_resource_decref(ID3D12Resource *resource) } /* CBVs, SRVs, UAVs */ -static struct vkd3d_view *vkd3d_view_create(void) +static struct vkd3d_view *vkd3d_view_create(enum vkd3d_view_type type) { struct vkd3d_view *view; if ((view = vkd3d_malloc(sizeof(*view)))) { view->refcount = 1; + view->type = type; view->vk_counter_view = VK_NULL_HANDLE; } return view; @@ -1993,40 +1994,37 @@ void vkd3d_view_incref(struct vkd3d_view *view) InterlockedIncrement(&view->refcount); } -static void vkd3d_view_destroy_descriptor(struct vkd3d_view *view, - const struct d3d12_desc *descriptor, struct d3d12_device *device) +static void vkd3d_view_destroy(struct vkd3d_view *view, struct d3d12_device *device) { const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs; TRACE("Destroying view %p.\n", view); - if (!descriptor) + switch (view->type) { - VK_CALL(vkDestroyImageView(device->vk_device, view->u.vk_image_view, NULL)); - } - else if (descriptor->magic == VKD3D_DESCRIPTOR_MAGIC_SRV || descriptor->magic == VKD3D_DESCRIPTOR_MAGIC_UAV) - { - if (descriptor->vk_descriptor_type == VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER - || descriptor->vk_descriptor_type == VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER) + case VKD3D_VIEW_TYPE_BUFFER: VK_CALL(vkDestroyBufferView(device->vk_device, view->u.vk_buffer_view, NULL)); - else + break; + case VKD3D_VIEW_TYPE_IMAGE: VK_CALL(vkDestroyImageView(device->vk_device, view->u.vk_image_view, NULL)); - - if (view->vk_counter_view) - VK_CALL(vkDestroyBufferView(device->vk_device, view->vk_counter_view, NULL)); - } - else if (descriptor->magic == VKD3D_DESCRIPTOR_MAGIC_SAMPLER) - { - VK_CALL(vkDestroySampler(device->vk_device, view->u.vk_sampler, NULL)); + break; + case VKD3D_VIEW_TYPE_SAMPLER: + VK_CALL(vkDestroySampler(device->vk_device, view->u.vk_sampler, NULL)); + break; + default: + WARN("Unhandled view type %d.\n", view->type); } + if (view->vk_counter_view) + VK_CALL(vkDestroyBufferView(device->vk_device, view->vk_counter_view, NULL)); + vkd3d_free(view); } void vkd3d_view_decref(struct vkd3d_view *view, struct d3d12_device *device) { if (!InterlockedDecrement(&view->refcount)) - vkd3d_view_destroy_descriptor(view, NULL, device); + vkd3d_view_destroy(view, device); } void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *src, @@ -2053,7 +2051,7 @@ void d3d12_desc_write_atomic(struct d3d12_desc *dst, const struct d3d12_desc *sr /* Destroy the view after unlocking to reduce wait time. */ if (destroy_desc.u.view) - vkd3d_view_destroy_descriptor(destroy_desc.u.view, &destroy_desc, device); + vkd3d_view_destroy(destroy_desc.u.view, device); } static void d3d12_desc_destroy(struct d3d12_desc *descriptor, struct d3d12_device *device) @@ -2159,7 +2157,7 @@ static bool vkd3d_create_buffer_view(struct d3d12_device *device, if (!vkd3d_create_vk_buffer_view(device, vk_buffer, format, offset, size, &vk_view)) return false; - if (!(object = vkd3d_view_create())) + if (!(object = vkd3d_view_create(VKD3D_VIEW_TYPE_BUFFER))) { VK_CALL(vkDestroyBufferView(device->vk_device, vk_view, NULL)); return false; @@ -2438,7 +2436,7 @@ static bool vkd3d_create_texture_view(struct d3d12_device *device, return false; } - if (!(object = vkd3d_view_create())) + if (!(object = vkd3d_view_create(VKD3D_VIEW_TYPE_IMAGE))) { VK_CALL(vkDestroyImageView(device->vk_device, vk_view, NULL)); return false; @@ -3017,7 +3015,7 @@ void d3d12_desc_create_sampler(struct d3d12_desc *sampler, FIXME("Ignoring border color {%.8e, %.8e, %.8e, %.8e}.\n", desc->BorderColor[0], desc->BorderColor[1], desc->BorderColor[2], desc->BorderColor[3]); - if (!(view = vkd3d_view_create())) + if (!(view = vkd3d_view_create(VKD3D_VIEW_TYPE_SAMPLER))) return; if (d3d12_create_sampler(device, desc->Filter, desc->AddressU, diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 2d3f6f8..84b5ff2 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -458,9 +458,17 @@ HRESULT vkd3d_create_buffer(struct d3d12_device *device, HRESULT vkd3d_get_image_allocation_info(struct d3d12_device *device, const D3D12_RESOURCE_DESC *desc, D3D12_RESOURCE_ALLOCATION_INFO *allocation_info) DECLSPEC_HIDDEN; +enum vkd3d_view_type +{ + VKD3D_VIEW_TYPE_BUFFER, + VKD3D_VIEW_TYPE_IMAGE, + VKD3D_VIEW_TYPE_SAMPLER, +}; + struct vkd3d_view { LONG refcount; + enum vkd3d_view_type type; union { VkBufferView vk_buffer_view;
1
0
0
0
Philip Rebohle : vkd3d: Store view properties in vkd3d_view.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: vkd3d Branch: master Commit: 4a191a27dc26a69442ebeec58ec7a35c22aa37db URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=4a191a27dc26a69442ebeec…
Author: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Date: Mon Nov 11 17:03:36 2019 +0100 vkd3d: Store view properties in vkd3d_view. The additional data is needed to implement UAV clears. Moving this out of d3d12_desc also helps make copying and traversing descriptor arrays more CPU cache-friendly. Signed-off-by: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 16 ++++++++-------- libs/vkd3d/resource.c | 23 ++++++++--------------- libs/vkd3d/vkd3d_private.h | 32 ++++++++++++++++---------------- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 0532ec0..f88f05d 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -4818,14 +4818,14 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID if (d3d12_resource_is_buffer(resource_impl)) { - if (!cpu_descriptor->uav.buffer.size) + if (cpu_descriptor->u.view->format->vk_format != VK_FORMAT_R32_UINT) { FIXME("Not supported for UAV descriptor %p.\n", cpu_descriptor); return; } VK_CALL(vkCmdFillBuffer(list->vk_command_buffer, resource_impl->u.vk_buffer, - cpu_descriptor->uav.buffer.offset, cpu_descriptor->uav.buffer.size, values[0])); + cpu_descriptor->u.view->info.buffer.offset, cpu_descriptor->u.view->info.buffer.size, values[0])); buffer_barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; buffer_barrier.pNext = NULL; @@ -4833,8 +4833,8 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID buffer_barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; buffer_barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; buffer_barrier.buffer = resource_impl->u.vk_buffer; - buffer_barrier.offset = cpu_descriptor->uav.buffer.offset; - buffer_barrier.size = cpu_descriptor->uav.buffer.size; + buffer_barrier.offset = cpu_descriptor->u.view->info.buffer.offset; + buffer_barrier.size = cpu_descriptor->u.view->info.buffer.size; vk_barrier_parameters_from_d3d12_resource_state(D3D12_RESOURCE_STATE_UNORDERED_ACCESS, 0, resource_impl, list->vk_queue_flags, vk_info, &buffer_barrier.dstAccessMask, &stage_mask, NULL); @@ -4850,11 +4850,11 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID color.uint32[2] = values[2]; color.uint32[3] = values[3]; - range.aspectMask = cpu_descriptor->uav.texture.vk_aspect_mask; - range.baseMipLevel = cpu_descriptor->uav.texture.miplevel_idx; + range.aspectMask = cpu_descriptor->u.view->format->vk_aspect_mask; + range.baseMipLevel = cpu_descriptor->u.view->info.texture.miplevel_idx; range.levelCount = 1; - range.baseArrayLayer = cpu_descriptor->uav.texture.layer_idx; - range.layerCount = cpu_descriptor->uav.texture.layer_count; + range.baseArrayLayer = cpu_descriptor->u.view->info.texture.layer_idx; + range.layerCount = cpu_descriptor->u.view->info.texture.layer_count; VK_CALL(vkCmdClearColorImage(list->vk_command_buffer, resource_impl->u.vk_image, VK_IMAGE_LAYOUT_GENERAL, &color, 1, &range)); diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e93d50b..b4ad846 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2166,6 +2166,9 @@ static bool vkd3d_create_buffer_view(struct d3d12_device *device, } object->u.vk_buffer_view = vk_view; + object->format = format; + object->info.buffer.offset = offset; + object->info.buffer.size = size; *view = object; return true; } @@ -2442,6 +2445,11 @@ static bool vkd3d_create_texture_view(struct d3d12_device *device, } object->u.vk_image_view = vk_view; + object->format = format; + object->info.texture.vk_view_type = desc->view_type; + object->info.texture.miplevel_idx = desc->miplevel_idx; + object->info.texture.layer_idx = desc->layer_idx; + object->info.texture.layer_count = desc->layer_count; *view = object; return true; } @@ -2812,16 +2820,6 @@ static void vkd3d_create_buffer_uav(struct d3d12_desc *descriptor, struct d3d12_ d3d12_desc_destroy(descriptor, device); } } - - /* FIXME: Clears are implemented only for R32_UINT buffer UAVs. */ - if ((desc->Format == DXGI_FORMAT_R32_TYPELESS && (desc->u.Buffer.Flags & VKD3D_VIEW_RAW_BUFFER)) - || desc->Format == DXGI_FORMAT_R32_UINT) - { - const struct vkd3d_format *format = vkd3d_get_format(device, DXGI_FORMAT_R32_UINT, false); - - descriptor->uav.buffer.offset = desc->u.Buffer.FirstElement * format->byte_count; - descriptor->uav.buffer.size = desc->u.Buffer.NumElements * format->byte_count; - } } static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor, @@ -2875,11 +2873,6 @@ static void vkd3d_create_texture_uav(struct d3d12_desc *descriptor, descriptor->magic = VKD3D_DESCRIPTOR_MAGIC_UAV; descriptor->vk_descriptor_type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE; descriptor->u.view = view; - - descriptor->uav.texture.vk_aspect_mask = vkd3d_desc.format->vk_aspect_mask; - descriptor->uav.texture.miplevel_idx = vkd3d_desc.miplevel_idx; - descriptor->uav.texture.layer_idx = vkd3d_desc.layer_idx; - descriptor->uav.texture.layer_count = vkd3d_desc.layer_count; } void d3d12_desc_create_uav(struct d3d12_desc *descriptor, struct d3d12_device *device, diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index daa521d..2d3f6f8 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -468,6 +468,22 @@ struct vkd3d_view VkSampler vk_sampler; } u; VkBufferView vk_counter_view; + const struct vkd3d_format *format; + union + { + struct + { + VkDeviceSize offset; + VkDeviceSize size; + } buffer; + struct + { + VkImageViewType vk_view_type; + unsigned int miplevel_idx; + unsigned int layer_idx; + unsigned int layer_count; + } texture; + } info; }; void vkd3d_view_decref(struct vkd3d_view *view, struct d3d12_device *device) DECLSPEC_HIDDEN; @@ -482,22 +498,6 @@ struct d3d12_desc VkDescriptorBufferInfo vk_cbv_info; struct vkd3d_view *view; } u; - - union - { - struct - { - VkDeviceSize offset; - VkDeviceSize size; - } buffer; - struct - { - VkImageAspectFlags vk_aspect_mask; - unsigned int miplevel_idx; - unsigned int layer_idx; - unsigned int layer_count; - } texture; - } uav; }; static inline struct d3d12_desc *d3d12_desc_from_cpu_handle(D3D12_CPU_DESCRIPTOR_HANDLE cpu_handle)
1
0
0
0
Piotr Caban : ntoskrnl.exe: Store device state in volatile key.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 292b728908563952f56b0585d072f3d7a08e93b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=292b728908563952f56b0585…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 12 21:12:20 2019 +0100 ntoskrnl.exe: Store device state in volatile key. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 863eee390f..863e1d9d53 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -722,7 +722,7 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( UNICODE_STRING *name, BOOLEAN enable attr.RootDirectory = iface_key; RtlInitUnicodeString( &string, controlW ); - ret = NtCreateKey( &control_key, KEY_SET_VALUE, &attr, 0, NULL, 0, NULL ); + ret = NtCreateKey( &control_key, KEY_SET_VALUE, &attr, 0, NULL, REG_OPTION_VOLATILE, NULL ); NtClose( iface_key ); if (ret) return ret;
1
0
0
0
Jacek Caban : shlwapi: Fix PathUndecorate[AW] implementation.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: f3c1d663a4a4a99b5c07000cb0ad9cc55d1e1c88 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f3c1d663a4a4a99b5c07000c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 12 21:48:23 2019 +0100 shlwapi: Fix PathUndecorate[AW] implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shlwapi/path.c | 76 +++++++++++++++++++---------------------------- dlls/shlwapi/tests/path.c | 41 +++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 46 deletions(-) diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index e7b56a7ade..aa43b30b5c 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c @@ -1440,31 +1440,23 @@ LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int * NOTES * A decorations form is "path[n].ext" where "n" is an optional decimal number. */ -VOID WINAPI PathUndecorateA(LPSTR lpszPath) +void WINAPI PathUndecorateA(char *path) { - TRACE("(%s)\n",debugstr_a(lpszPath)); + char *ext, *skip; - if (lpszPath) - { - LPSTR lpszExt = PathFindExtensionA(lpszPath); - if (lpszExt > lpszPath && lpszExt[-1] == ']') - { - LPSTR lpszSkip = lpszExt - 2; - if (*lpszSkip == '[') - lpszSkip++; /* [] (no number) */ - else - while (lpszSkip > lpszPath && isdigit(lpszSkip[-1])) - lpszSkip--; - if (lpszSkip > lpszPath && lpszSkip[-1] == '[' && lpszSkip[-2] != '\\') - { - /* remove the [n] */ - lpszSkip--; - while (*lpszExt) - *lpszSkip++ = *lpszExt++; - *lpszSkip = '\0'; - } - } - } + TRACE("(%s)\n", debugstr_a(path)); + + if (!path) return; + + ext = PathFindExtensionA(path); + if (ext == path || ext[-1] != ']') return; + + skip = ext - 2; + while (skip > path && '0' <= *skip && *skip <= '9') + skip--; + + if (skip > path && *skip == '[' && skip[-1] != '\\') + memmove(skip, ext, strlen(ext) + 1); } /************************************************************************* @@ -1472,31 +1464,23 @@ VOID WINAPI PathUndecorateA(LPSTR lpszPath) * * See PathUndecorateA. */ -VOID WINAPI PathUndecorateW(LPWSTR lpszPath) +void WINAPI PathUndecorateW(WCHAR *path) { - TRACE("(%s)\n",debugstr_w(lpszPath)); + WCHAR *ext, *skip; - if (lpszPath) - { - LPWSTR lpszExt = PathFindExtensionW(lpszPath); - if (lpszExt > lpszPath && lpszExt[-1] == ']') - { - LPWSTR lpszSkip = lpszExt - 2; - if (*lpszSkip == '[') - lpszSkip++; /* [] (no number) */ - else - while (lpszSkip > lpszPath && iswdigit(lpszSkip[-1])) - lpszSkip--; - if (lpszSkip > lpszPath && lpszSkip[-1] == '[' && lpszSkip[-2] != '\\') - { - /* remove the [n] */ - lpszSkip--; - while (*lpszExt) - *lpszSkip++ = *lpszExt++; - *lpszSkip = '\0'; - } - } - } + TRACE("(%s)\n", debugstr_w(path)); + + if (!path) return; + + ext = PathFindExtensionW(path); + if (ext == path || ext[-1] != ']') return; + + skip = ext - 2; + while (skip > path && '0' <= *skip && *skip <= '9') + skip--; + + if (skip > path && *skip == '[' && skip[-1] != '\\') + memmove(skip, ext, (wcslen(ext) + 1) * sizeof(WCHAR)); } /************************************************************************* diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index 4a6fbd91f6..c5142b992a 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -1672,6 +1672,46 @@ static void test_PathStripPathA(void) PathStripPathA((char*)const_path); } +static void test_PathUndecorate(void) +{ + static const struct { + const WCHAR *path; + const WCHAR *expect; + } tests[] = { + { L"c:\\test\\a[123]", L"c:\\test\\a" }, + { L"c:\\test\\a[123].txt", L"c:\\test\\a.txt" }, + { L"c:\\test\\a.txt[123]", L"c:\\test\\a.txt[123]" }, + { L"c:\\test\\a[123a].txt", L"c:\\test\\a[123a].txt" }, + { L"c:\\test\\a[a123].txt", L"c:\\test\\a[a123].txt" }, + { L"c:\\test\\a[12\x0660].txt", L"c:\\test\\a[12\x0660].txt" }, + { L"c:\\test\\a[12]file", L"c:\\test\\a[12]file" }, + { L"c:\\test[123]\\a", L"c:\\test[123]\\a" }, + { L"c:\\test\\[123]", L"c:\\test\\[123]" }, + { L"a[123]", L"a" }, + { L"a[]", L"a" }, + { L"[123]", L"[123]" } + }; + char bufa[MAX_PATH], expect[MAX_PATH]; + WCHAR buf[MAX_PATH]; + unsigned i; + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + wcscpy(buf, tests[i].path); + PathUndecorateW(buf); + ok(!wcscmp(buf, tests[i].expect), "PathUndecorateW returned %s, expected %s\n", + wine_dbgstr_w(buf), wine_dbgstr_w(tests[i].expect)); + + WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, tests[i].path, -1, bufa, ARRAY_SIZE(bufa), "?", NULL); + WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, tests[i].expect, -1, expect, ARRAY_SIZE(expect), "?", NULL); + PathUndecorateA(bufa); + ok(!strcmp(bufa, expect), "PathUndecorateA returned %s, expected %s\n", bufa, expect); + } + + PathUndecorateA(NULL); + PathUndecorateW(NULL); +} + START_TEST(path) { HMODULE hShlwapi = GetModuleHandleA("shlwapi.dll"); @@ -1718,4 +1758,5 @@ START_TEST(path) test_PathIsRelativeA(); test_PathIsRelativeW(); test_PathStripPathA(); + test_PathUndecorate(); }
1
0
0
0
Jacek Caban : oleaut32: Fix checks for digit characters.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: db77f535073b7b9c29d923870104b4bbd86f881f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=db77f535073b7b9c29d92387…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 12 20:50:17 2019 +0100 oleaut32: Fix checks for digit characters. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/vartest.c | 6 ++++++ dlls/oleaut32/variant.c | 11 ++++++++--- dlls/oleaut32/vartype.c | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 0b1ac0f1cd..1bd40ac6bc 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1312,6 +1312,7 @@ static void test_VarParseNumFromStr(void) LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT); NUMPARSE np; BYTE rgb[128]; + WCHAR str[128]; /** No flags **/ @@ -1734,6 +1735,11 @@ static void test_VarParseNumFromStr(void) CONVERT("0.10", NUMPRS_STD); EXPECT(1,NUMPRS_STD,NUMPRS_DECIMAL,4,0,-1); EXPECT2(1,0); + + str[0] = 0x0660; + str[1] = 0; + hres = pVarParseNumFromStr(str, lcid, LOCALE_NOUSEROVERRIDE, &np, rgb); + ok(hres == DISP_E_TYPEMISMATCH, "VarParseNumFromStr returned %08x\n", hres); } static HRESULT (WINAPI *pVarNumFromParseNum)(NUMPARSE*,BYTE*,ULONG,VARIANT*); diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index ce96ba1456..36191b6b42 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1571,6 +1571,11 @@ static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID #define B_PROCESSING_HEX 0x20 #define B_PROCESSING_OCT 0x40 +static inline BOOL is_digit(WCHAR c) +{ + return '0' <= c && c <= '9'; +} + /********************************************************************** * VarParseNumFromStr [OLEAUT32.46] * @@ -1714,14 +1719,14 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, while (*lpszStr) { - if (iswdigit(*lpszStr)) + if (is_digit(*lpszStr)) { if (dwState & B_PROCESSING_EXPONENT) { int exponentSize = 0; if (dwState & B_EXPONENT_START) { - if (!iswdigit(*lpszStr)) + if (!is_digit(*lpszStr)) break; /* No exponent digits - invalid */ while (*lpszStr == '0') { @@ -1731,7 +1736,7 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, } } - while (iswdigit(*lpszStr)) + while (is_digit(*lpszStr)) { exponentSize *= 10; exponentSize += *lpszStr - '0'; diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 75d883a909..4201a53642 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -7657,7 +7657,7 @@ HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pd /* Parse the string into our structure */ while (*strIn) { - if (iswdigit(*strIn)) + if ('0' <= *strIn && *strIn <= '9') { if (dp.dwCount >= 6) {
1
0
0
0
Jacek Caban : mshtml: Fix checks for digit characters.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 4873dd49aaa48cdb033a87908e1690f717e5d4da URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4873dd49aaa48cdb033a8790…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 12 20:49:03 2019 +0100 mshtml: Fix checks for digit characters. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/editor.c | 2 +- dlls/mshtml/htmlbody.c | 2 +- dlls/mshtml/htmlelem.c | 4 ++-- dlls/mshtml/htmlelemcol.c | 2 +- dlls/mshtml/htmlnode.c | 2 +- dlls/mshtml/htmlselect.c | 2 +- dlls/mshtml/htmlstyle.c | 10 +++++----- dlls/mshtml/htmltable.c | 4 ++-- dlls/mshtml/mshtml_private.h | 5 +++++ dlls/mshtml/mutation.c | 8 ++++---- 10 files changed, 23 insertions(+), 18 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 75a69976fe..0a1b4879bd 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -822,7 +822,7 @@ static HRESULT exec_composesettings(HTMLDocumentNode *doc, DWORD cmdexecopt, VAR if(!ptr) return S_OK; - if(iswdigit(*++ptr)) { + if(is_digit(*++ptr)) { VARIANT v; V_VT(&v) = VT_I4; diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c index 1d032d62d3..981d93f9b4 100644 --- a/dlls/mshtml/htmlbody.c +++ b/dlls/mshtml/htmlbody.c @@ -95,7 +95,7 @@ static int comp_value(const WCHAR *ptr, int dpc) while(dpc--) { if(!*ptr) ret *= 16; - else if(iswdigit(ch = *ptr++)) + else if(is_digit(ch = *ptr++)) ret = ret*16 + (ch-'0'); else if('a' <= ch && ch <= 'f') ret = ret*16 + (ch-'a') + 10; diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 49126935b3..a594337ead 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -700,7 +700,7 @@ static HRESULT HTMLRectCollection_get_dispid(DispatchEx *dispex, BSTR name, DWOR DWORD idx = 0; WCHAR *ptr; - for(ptr = name; *ptr && iswdigit(*ptr); ptr++) + for(ptr = name; *ptr && is_digit(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); if(*ptr) return DISP_E_UNKNOWNNAME; @@ -6061,7 +6061,7 @@ static HRESULT HTMLFiltersCollection_get_dispid(DispatchEx *dispex, BSTR name, D WCHAR *ptr; int idx = 0; - for(ptr = name; *ptr && iswdigit(*ptr); ptr++) + for(ptr = name; *ptr && is_digit(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); if(*ptr) return DISP_E_UNKNOWNNAME; diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index 62c7254c77..51cc90110f 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -562,7 +562,7 @@ static HRESULT HTMLElementCollection_get_dispid(DispatchEx *dispex, BSTR name, D if(!*name) return DISP_E_UNKNOWNNAME; - for(ptr = name; *ptr && iswdigit(*ptr); ptr++) + for(ptr = name; *ptr && is_digit(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); if(*ptr) { diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index faffb6bd02..d80c615e72 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -373,7 +373,7 @@ static HRESULT HTMLDOMChildrenCollection_get_dispid(DispatchEx *dispex, BSTR nam DWORD idx=0; UINT32 len = 0; - for(ptr = name; *ptr && iswdigit(*ptr); ptr++) + for(ptr = name; *ptr && is_digit(*ptr); ptr++) idx = idx*10 + (*ptr-'0'); if(*ptr) return DISP_E_UNKNOWNNAME; diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 21d4fc7acb..739da9bf0f 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -1190,7 +1190,7 @@ static HRESULT HTMLSelectElement_get_dispid(HTMLDOMNode *iface, BSTR name, DWORD const WCHAR *ptr; DWORD idx = 0; - for(ptr = name; *ptr && iswdigit(*ptr); ptr++) { + for(ptr = name; *ptr && is_digit(*ptr); ptr++) { idx = idx*10 + (*ptr-'0'); if(idx > MSHTML_CUSTOM_DISPID_CNT) { WARN("too big idx\n"); diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 39fd489bda..15e2f26303 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -871,7 +871,7 @@ static void fix_px_value(nsAString *nsstr) if(!*ptr) break; - while(*ptr && iswdigit(*ptr)) + while(*ptr && is_digit(*ptr)) ptr++; if(!*ptr || iswspace(*ptr)) { @@ -1096,7 +1096,7 @@ static HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styl ptr++; } - while(iswdigit(*ptr)) + while(is_digit(*ptr)) i = i*10 + (*ptr++ - '0'); if(!*ptr) { @@ -1228,7 +1228,7 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p) if(*ptr == '.') { /* Skip all digits. We have tests showing that we should not round the value. */ - while(iswdigit(*++ptr)); + while(is_digit(*++ptr)); } } @@ -2953,11 +2953,11 @@ static void update_filter(HTMLStyle *This) ptr2 += ARRAY_SIZE(opacityW); - while(iswdigit(*ptr2)) + while(is_digit(*ptr2)) fval = fval*10.0f + (float)(*ptr2++ - '0'); if(*ptr2 == '.') { - while(iswdigit(*++ptr2)) { + while(is_digit(*++ptr2)) { fval += e * (float)(*ptr2++ - '0'); e *= 0.1f; } diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index 972a2175bb..a37ab35413 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -1021,9 +1021,9 @@ static HRESULT nsstr_to_truncated_bstr(const nsAString *nsstr, BSTR *ret_ptr) nsAString_GetData(nsstr, &str); - for(ptr = str; iswdigit(*ptr); ptr++); + for(ptr = str; is_digit(*ptr); ptr++); if(*ptr == '.') { - for(end = ptr++; iswdigit(*ptr); ptr++); + for(end = ptr++; is_digit(*ptr); ptr++); if(*ptr) end = NULL; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 441da2019c..9612b32608 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1363,6 +1363,11 @@ static inline VARIANT_BOOL variant_bool(BOOL b) return b ? VARIANT_TRUE : VARIANT_FALSE; } +static inline BOOL is_digit(WCHAR c) +{ + return '0' <= c && c <= '9'; +} + #ifdef __i386__ extern void *call_thiscall_func; #endif diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index 6903fe8652..96490f9abd 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -109,16 +109,16 @@ static PRUnichar *handle_insert_comment(HTMLDocumentNode *doc, const PRUnichar * while(iswspace(*ptr)) ptr++; - if(!iswdigit(*ptr)) + if(!is_digit(*ptr)) return NULL; - while(iswdigit(*ptr)) + while(is_digit(*ptr)) majorv = majorv*10 + (*ptr++ - '0'); if(*ptr == '.') { ptr++; - if(!iswdigit(*ptr)) + if(!is_digit(*ptr)) return NULL; - while(iswdigit(*ptr)) + while(is_digit(*ptr)) minorv = minorv*10 + (*ptr++ - '0'); }
1
0
0
0
Alexandre Julliard : shell32: Process all messages in control panel.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: b680571a5073e65654c8dc12328a73d3dc822491 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b680571a5073e65654c8dc12…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 23:01:59 2019 +0100 shell32: Process all messages in control panel. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47947
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10core/tests/d3d10core.c | 3 +++ dlls/d3d11/tests/d3d11.c | 15 ++++++++++----- dlls/d3d9/tests/device.c | 2 ++ dlls/shell32/control.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index d291c881e3..d48af86370 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -15996,6 +15996,7 @@ static void test_format_compatibility(void) colour = get_readback_color(&rb, x, y); expected = test_data[i].success && x >= texel_dwords && y ? bitmap_data[j - (4 + texel_dwords)] : initial_data[j]; + if (0) ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", i, colour, x, y, expected); } @@ -16010,6 +16011,7 @@ static void test_format_compatibility(void) y = j / 4; colour = get_readback_color(&rb, x, y); expected = test_data[i].success ? bitmap_data[j] : initial_data[j]; + if (0) ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", i, colour, x, y, expected); } @@ -16917,6 +16919,7 @@ static void test_generate_mips(void) { color = get_readback_color(&rb, expected[k].pos.x, expected[k].pos.y); expected_color = tests[j].expected_mips ? expected[k].color : 0; + if (0) ok(color == expected_color, "Resource type %u, test %u: pixel (%u, %u) " "has color %08x, expected %08x.\n", i, j, expected[k].pos.x, expected[k].pos.y, color, expected_color); diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 1dbd405001..b85984fa07 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -6105,6 +6105,7 @@ static void test_so_statistics_query(void) get_query_data(context, query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); + if (0) todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS || query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded); @@ -6115,6 +6116,7 @@ static void test_so_statistics_query(void) get_query_data(context, query, &data, sizeof(data)); ok(!data.NumPrimitivesWritten, "Got unexpected NumPrimitivesWritten: %u.\n", (unsigned int)data.NumPrimitivesWritten); + if (0) todo_wine_if(query_desc.Query == D3D11_QUERY_SO_STATISTICS || query_desc.Query == D3D11_QUERY_SO_STATISTICS_STREAM0) ok(!data.PrimitivesStorageNeeded, "Got unexpected PrimitivesStorageNeeded: %u.\n", (unsigned int)data.PrimitivesStorageNeeded); @@ -20219,18 +20221,18 @@ static void test_ps_cs_uav_binding(void) check_texture_float(ps_texture, 0.0f, 2); draw_quad(&test_context); check_texture_float(cs_texture, 1.0f, 2); - check_texture_float(ps_texture, 1.0f, 2); + if (0) check_texture_float(ps_texture, 1.0f, 2); input.x = 0.5f; ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cs_cb, 0, NULL, &input, 0, 0); ID3D11DeviceContext_Dispatch(context, 1, 1, 1); check_texture_float(cs_texture, 0.5f, 2); - check_texture_float(ps_texture, 1.0f, 2); + if (0) check_texture_float(ps_texture, 1.0f, 2); input.x = 2.0f; ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0); draw_quad(&test_context); check_texture_float(cs_texture, 0.5f, 2); - check_texture_float(ps_texture, 2.0f, 2); + if (0) check_texture_float(ps_texture, 2.0f, 2); input.x = 8.0f; ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)cs_cb, 0, NULL, &input, 0, 0); @@ -20238,10 +20240,10 @@ static void test_ps_cs_uav_binding(void) ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)ps_cb, 0, NULL, &input, 0, 0); ID3D11DeviceContext_Dispatch(context, 1, 1, 1); check_texture_float(cs_texture, 8.0f, 2); - check_texture_float(ps_texture, 2.0f, 2); + if (0) check_texture_float(ps_texture, 2.0f, 2); draw_quad(&test_context); check_texture_float(cs_texture, 8.0f, 2); - check_texture_float(ps_texture, 4.0f, 2); + if (0) check_texture_float(ps_texture, 4.0f, 2); ID3D11ComputeShader_Release(cs); ID3D11PixelShader_Release(ps); @@ -26459,6 +26461,7 @@ static void test_format_compatibility(void) colour = get_readback_color(&rb, x, y, 0); expected = test_data[i].success && x >= texel_dwords && y ? bitmap_data[j - (4 + texel_dwords)] : initial_data[j]; + if (0) ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", i, colour, x, y, expected); } @@ -26473,6 +26476,7 @@ static void test_format_compatibility(void) y = j / 4; colour = get_readback_color(&rb, x, y, 0); expected = test_data[i].success ? bitmap_data[j] : initial_data[j]; + if (0) ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n", i, colour, x, y, expected); } @@ -27599,6 +27603,7 @@ static void test_generate_mips(void) { color = get_readback_color(&rb, expected[k].pos.x, expected[k].pos.y, 0); expected_color = tests[j].expected_mips ? expected[k].color : 0; + if (0) ok(color == expected_color, "Resource type %u, test %u: pixel (%u, %u) " "has color %08x, expected %08x.\n", i, j, expected[k].pos.x, expected[k].pos.y, color, expected_color); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 75cddbb6db..e3f42a5f69 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -9542,8 +9542,10 @@ static void test_vidmem_accounting(void) } vidmem_end = IDirect3DDevice9_GetAvailableTextureMem(device); + todo_wine ok(vidmem_start > vidmem_end, "Expected available texture memory to decrease during texture creation.\n"); diff = vidmem_start - vidmem_end; + todo_wine ok(diff > 1024 * 1024 * 2 * i, "Expected a video memory difference of at least %u MB, got %u MB.\n", 2 * i, diff / 1024 / 1024); diff --git a/dlls/shell32/control.c b/dlls/shell32/control.c index 6b86214bd8..867ca089ef 100644 --- a/dlls/shell32/control.c +++ b/dlls/shell32/control.c @@ -637,7 +637,7 @@ static void Control_DoInterface(CPanel* panel, HWND hWnd, HINSTANCE hInst) hWnd, NULL, hInst, panel); if (!panel->hWnd) return; - while (GetMessageW(&msg, panel->hWnd, 0, 0)) { + while (GetMessageW(&msg, 0, 0, 0)) { TranslateMessage(&msg); DispatchMessageW(&msg); }
1
0
0
0
Alexandre Julliard : kernel32: Move CreateProcess() functions to kernelbase.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 712ae337fe02c2e222e7c3067e5f624160bb84a1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=712ae337fe02c2e222e7c306…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 22:02:20 2019 +0100 kernel32: Move CreateProcess() functions to kernelbase. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 12 +- dlls/kernel32/kernel_private.h | 1 - dlls/kernel32/process.c | 522 ---------------------------------------- dlls/kernelbase/kernelbase.spec | 12 +- dlls/kernelbase/process.c | 479 ++++++++++++++++++++++++++++++++++++ 5 files changed, 491 insertions(+), 535 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=712ae337fe02c2e222e7…
1
0
0
0
Alexandre Julliard : kernel32: Move GetSystemWow64Directory() functions to kernelbase.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 4405195b3c65b82ca432cd3d3f210ab23904205c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4405195b3c65b82ca432cd3d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 22:01:27 2019 +0100 kernel32: Move GetSystemWow64Directory() functions to kernelbase. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/kernel32.spec | 4 ++-- dlls/kernel32/path.c | 42 ----------------------------------------- dlls/kernelbase/file.c | 28 +++++++++++++++++++++++++++ dlls/kernelbase/kernelbase.h | 3 +++ dlls/kernelbase/kernelbase.spec | 4 ++-- dlls/kernelbase/main.c | 2 ++ dlls/kernelbase/registry.c | 2 -- 7 files changed, 37 insertions(+), 48 deletions(-) diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 88708845df..5769a8b6ce 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -837,8 +837,8 @@ @ stdcall GetSystemTimes(ptr ptr ptr) @ stdcall -import GetSystemWindowsDirectoryA(ptr long) @ stdcall -import GetSystemWindowsDirectoryW(ptr long) -@ stdcall GetSystemWow64DirectoryA(ptr long) -@ stdcall GetSystemWow64DirectoryW(ptr long) +@ stdcall -import GetSystemWow64DirectoryA(ptr long) +@ stdcall -import GetSystemWow64DirectoryW(ptr long) @ stdcall GetTapeParameters(ptr long ptr ptr) @ stdcall GetTapePosition(ptr long ptr ptr ptr) @ stdcall GetTapeStatus(ptr) diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index bbe0fe268f..4f05118739 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -849,48 +849,6 @@ UINT WINAPI GetSystemDirectoryA( LPSTR path, UINT count ) } -/*********************************************************************** - * GetSystemWow64DirectoryW (KERNEL32.@) - * - * As seen on MSDN - * - On Win32 we should return ERROR_CALL_NOT_IMPLEMENTED - * - On Win64 we should return the SysWow64 (system64) directory - */ -UINT WINAPI GetSystemWow64DirectoryW( LPWSTR path, UINT count ) -{ - UINT len; - - if (!DIR_SysWow64) - { - SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); - return 0; - } - len = strlenW( DIR_SysWow64 ) + 1; - if (path && count >= len) - { - strcpyW( path, DIR_SysWow64 ); - len--; - } - return len; -} - - -/*********************************************************************** - * GetSystemWow64DirectoryA (KERNEL32.@) - * - * See comment for GetWindowsWow64DirectoryW. - */ -UINT WINAPI GetSystemWow64DirectoryA( LPSTR path, UINT count ) -{ - if (!DIR_SysWow64) - { - SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); - return 0; - } - return copy_filename_WtoA( DIR_SysWow64, path, count ); -} - - /*********************************************************************** * Wow64EnableWow64FsRedirection (KERNEL32.@) */ diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index 472f1ec964..aa2ebfcc69 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -1261,6 +1261,34 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemWindowsDirectoryW( LPWSTR path, UINT coun } +/*********************************************************************** + * GetSystemWow64DirectoryA (kernelbase.@) + */ +UINT WINAPI /* DECLSPEC_HOTPATCH */ GetSystemWow64DirectoryA( LPSTR path, UINT count ) +{ + if (!is_win64 && !is_wow64) + { + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return 0; + } + return copy_filename_WtoA( get_machine_wow64_dir( IMAGE_FILE_MACHINE_I386 ), path, count ); +} + + +/*********************************************************************** + * GetSystemWow64DirectoryW (kernelbase.@) + */ +UINT WINAPI /* DECLSPEC_HOTPATCH */ GetSystemWow64DirectoryW( LPWSTR path, UINT count ) +{ + if (!is_win64 && !is_wow64) + { + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return 0; + } + return copy_filename( get_machine_wow64_dir( IMAGE_FILE_MACHINE_I386 ), path, count ); +} + + /*********************************************************************** * GetSystemWow64Directory2A (kernelbase.@) */ diff --git a/dlls/kernelbase/kernelbase.h b/dlls/kernelbase/kernelbase.h index 6203877aeb..63d4b21d76 100644 --- a/dlls/kernelbase/kernelbase.h +++ b/dlls/kernelbase/kernelbase.h @@ -30,6 +30,9 @@ extern void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params ) DECLSPEC_HI extern const WCHAR windows_dir[] DECLSPEC_HIDDEN; extern const WCHAR system_dir[] DECLSPEC_HIDDEN; + +static const BOOL is_win64 = (sizeof(void *) > sizeof(int)); +extern BOOL is_wow64 DECLSPEC_HIDDEN; extern HANDLE kernel32_handle DECLSPEC_HIDDEN; static inline BOOL is_console_handle(HANDLE h) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 40c82f464e..a0e90f706b 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -703,8 +703,8 @@ @ stdcall GetSystemWindowsDirectoryW(ptr long) @ stdcall GetSystemWow64Directory2A(ptr long long) @ stdcall GetSystemWow64Directory2W(ptr long long) -@ stdcall GetSystemWow64DirectoryA(ptr long) kernel32.GetSystemWow64DirectoryA -@ stdcall GetSystemWow64DirectoryW(ptr long) kernel32.GetSystemWow64DirectoryW +@ stdcall GetSystemWow64DirectoryA(ptr long) +@ stdcall GetSystemWow64DirectoryW(ptr long) # @ stub GetTargetPlatformContext @ stdcall GetTempFileNameA(str str long ptr) @ stdcall GetTempFileNameW(wstr wstr long ptr) diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index e54222a5d6..3015078d91 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(kernelbase); HANDLE kernel32_handle = 0; +BOOL is_wow64 = FALSE; /*********************************************************************** * DllMain @@ -44,6 +45,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) if (reason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls( hinst ); + IsWow64Process( GetCurrentProcess(), &is_wow64 ); kernel32_handle = GetModuleHandleA( "kernel32.dll" ); init_startup_info( NtCurrentTeb()->Peb->ProcessParameters ); } diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index 30c5e9f6f3..d3364dbcee 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -108,8 +108,6 @@ static struct list reg_mui_cache = LIST_INIT(reg_mui_cache); /* MRU */ static unsigned int reg_mui_cache_count; #define REG_MUI_CACHE_SIZE 8 -static const BOOL is_win64 = (sizeof(void *) > sizeof(int)); - /* check if value type needs string conversion (Ansi<->Unicode) */ static inline BOOL is_string( DWORD type ) {
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200