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
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
List overview
wine-commits
November 2019
----- 2025 -----
June 2025
May 2025
April 2025
March 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
Alexandre Julliard : kernelbase: Implement GetSystemWow64Directory2().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: bf039539426aebaa352d17f04f7d21ac5fbc79de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf039539426aebaa352d17f0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:51:23 2019 +0100 kernelbase: Implement GetSystemWow64Directory2(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/file.c | 66 ++++++++++++++++++++++++++++++++--------- dlls/kernelbase/kernelbase.spec | 4 +-- include/winbase.h | 3 ++ include/winnt.h | 1 + 4 files changed, 58 insertions(+), 16 deletions(-) diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c index af21687aa3..472f1ec964 100644 --- a/dlls/kernelbase/file.c +++ b/dlls/kernelbase/file.c @@ -57,6 +57,19 @@ static void WINAPI read_write_apc( void *apc_user, PIO_STATUS_BLOCK io, ULONG re func( RtlNtStatusToDosError( io->u.Status ), io->Information, (LPOVERLAPPED)io ); } +static const WCHAR *get_machine_wow64_dir( WORD machine ) +{ + switch (machine) + { + case IMAGE_FILE_MACHINE_TARGET_HOST: return system_dir; + case IMAGE_FILE_MACHINE_I386: return L"C:\\windows\\syswow64"; + case IMAGE_FILE_MACHINE_ARMNT: return L"C:\\windows\\sysarm32"; + case IMAGE_FILE_MACHINE_AMD64: return L"C:\\windows\\sysx8664"; + case IMAGE_FILE_MACHINE_ARM64: return L"C:\\windows\\sysarm64"; + default: return NULL; + } +} + /*********************************************************************** * Operations on file names @@ -194,6 +207,21 @@ done: } +/*********************************************************************** + * copy_filename + */ +static DWORD copy_filename( const WCHAR *name, WCHAR *buffer, DWORD len ) +{ + UINT ret = lstrlenW( name ) + 1; + if (buffer && len >= ret) + { + lstrcpyW( buffer, name ); + ret--; + } + return ret; +} + + /*********************************************************************** * copy_filename_WtoA * @@ -1211,13 +1239,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemDirectoryA( LPSTR path, UINT count ) */ UINT WINAPI DECLSPEC_HOTPATCH GetSystemDirectoryW( LPWSTR path, UINT count ) { - UINT len = lstrlenW( system_dir ) + 1; - if (path && count >= len) - { - lstrcpyW( path, system_dir ); - len--; - } - return len; + return copy_filename( system_dir, path, count ); } @@ -1239,6 +1261,28 @@ UINT WINAPI DECLSPEC_HOTPATCH GetSystemWindowsDirectoryW( LPWSTR path, UINT coun } +/*********************************************************************** + * GetSystemWow64Directory2A (kernelbase.@) + */ +UINT WINAPI DECLSPEC_HOTPATCH GetSystemWow64Directory2A( LPSTR path, UINT count, WORD machine ) +{ + const WCHAR *dir = get_machine_wow64_dir( machine ); + + return dir ? copy_filename_WtoA( dir, path, count ) : 0; +} + + +/*********************************************************************** + * GetSystemWow64Directory2W (kernelbase.@) + */ +UINT WINAPI DECLSPEC_HOTPATCH GetSystemWow64Directory2W( LPWSTR path, UINT count, WORD machine ) +{ + const WCHAR *dir = get_machine_wow64_dir( machine ); + + return dir ? copy_filename( dir, path, count ) : 0; +} + + /*********************************************************************** * GetTempFileNameA (kernelbase.@) */ @@ -1413,13 +1457,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryA( LPSTR path, UINT count ) */ UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryW( LPWSTR path, UINT count ) { - UINT len = lstrlenW( windows_dir ) + 1; - if (path && count >= len) - { - lstrcpyW( path, windows_dir ); - len--; - } - return len; + return copy_filename( windows_dir, path, count ); } diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 5b2c5ef2e0..40c82f464e 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -701,8 +701,8 @@ @ stdcall GetSystemTimes(ptr ptr ptr) kernel32.GetSystemTimes @ stdcall GetSystemWindowsDirectoryA(ptr long) @ stdcall GetSystemWindowsDirectoryW(ptr long) -# @ stub GetSystemWow64Directory2A -# @ stub GetSystemWow64Directory2W +@ stdcall GetSystemWow64Directory2A(ptr long long) +@ stdcall GetSystemWow64Directory2W(ptr long long) @ stdcall GetSystemWow64DirectoryA(ptr long) kernel32.GetSystemWow64DirectoryA @ stdcall GetSystemWow64DirectoryW(ptr long) kernel32.GetSystemWow64DirectoryW # @ stub GetTargetPlatformContext diff --git a/include/winbase.h b/include/winbase.h index 2d9fafa52d..8b30c5a69a 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2289,6 +2289,9 @@ WINBASEAPI VOID WINAPI GetSystemTimePreciseAsFileTime(LPFILETIME); WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryA(LPSTR,UINT); WINBASEAPI UINT WINAPI GetSystemWindowsDirectoryW(LPWSTR,UINT); #define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory) +WINBASEAPI UINT WINAPI GetSystemWow64Directory2A(LPSTR,UINT,WORD); +WINBASEAPI UINT WINAPI GetSystemWow64Directory2W(LPWSTR,UINT,WORD); +#define GetSystemWow64Directory2 WINELIB_NAME_AW(GetSystemWow64Directory2) WINBASEAPI UINT WINAPI GetSystemWow64DirectoryA(LPSTR,UINT); WINBASEAPI UINT WINAPI GetSystemWow64DirectoryW(LPWSTR,UINT); #define GetSystemWow64Directory WINELIB_NAME_AW(GetSystemWow64Directory) diff --git a/include/winnt.h b/include/winnt.h index 9c39eb7e4d..d18b2e03b4 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2874,6 +2874,7 @@ typedef struct _IMAGE_VXD_HEADER { /* These are the settings of the Machine field. */ #define IMAGE_FILE_MACHINE_UNKNOWN 0 +#define IMAGE_FILE_MACHINE_TARGET_HOST 0x0001 #define IMAGE_FILE_MACHINE_I860 0x014d #define IMAGE_FILE_MACHINE_I386 0x014c #define IMAGE_FILE_MACHINE_R3000 0x0162
1
0
0
0
Alexandre Julliard : kernel32: Move support for starting Unix processes to ntdll.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: eee3a4e84a07c50c65c3a7619247f62dbca826b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eee3a4e84a07c50c65c3a761…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:48:49 2019 +0100 kernel32: Move support for starting Unix processes to ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 364 ++---------------------------------------------- dlls/ntdll/env.c | 68 +++++++++ dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 105 +++++++++++++- 4 files changed, 184 insertions(+), 354 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=eee3a4e84a07c50c65c3…
1
0
0
0
Alexandre Julliard : kernel32: Use RtlCreateUserProcess() to start new processes.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 1deefb84ee2b6d326b5ae1bad592a72c69a89b36 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1deefb84ee2b6d326b5ae1ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 12 21:41:06 2019 +0100 kernel32: Use RtlCreateUserProcess() to start new processes. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 1052 ++++++----------------------------------------- dlls/ntdll/process.c | 3 +- 2 files changed, 121 insertions(+), 934 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=1deefb84ee2b6d326b5a…
1
0
0
0
Piotr Caban : winebus: Fix DEVICE_RELATIONS content on device removal.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: c3bfc1b7264277395f2bbe9b2c059d34f4dffae3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3bfc1b7264277395f2bbe9b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 12 20:03:31 2019 +0100 winebus: Fix DEVICE_RELATIONS content on device removal. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus.h | 1 + dlls/winebus.sys/bus_iohid.c | 1 + dlls/winebus.sys/bus_sdl.c | 2 ++ dlls/winebus.sys/bus_udev.c | 2 ++ dlls/winebus.sys/main.c | 14 ++++++++++---- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/winebus.sys/bus.h b/dlls/winebus.sys/bus.h index 09666dc151..041a37ad04 100644 --- a/dlls/winebus.sys/bus.h +++ b/dlls/winebus.sys/bus.h @@ -45,6 +45,7 @@ DEVICE_OBJECT *bus_create_hid_device(const WCHAR *busidW, WORD vid, WORD pid, WORD input, DWORD version, DWORD uid, const WCHAR *serialW, BOOL is_gamepad, const platform_vtbl *vtbl, DWORD platform_data_size) DECLSPEC_HIDDEN; DEVICE_OBJECT *bus_find_hid_device(const platform_vtbl *vtbl, void *platform_dev) DECLSPEC_HIDDEN; +void bus_unlink_hid_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; void bus_remove_hid_device(DEVICE_OBJECT *device) DECLSPEC_HIDDEN; void process_hid_report(DEVICE_OBJECT *device, BYTE *report, DWORD length) DECLSPEC_HIDDEN; DEVICE_OBJECT* bus_enumerate_hid_devices(const platform_vtbl *vtbl, enum_func function, void* context) DECLSPEC_HIDDEN; diff --git a/dlls/winebus.sys/bus_iohid.c b/dlls/winebus.sys/bus_iohid.c index ed91b51fc8..df578b4b9d 100644 --- a/dlls/winebus.sys/bus_iohid.c +++ b/dlls/winebus.sys/bus_iohid.c @@ -368,6 +368,7 @@ static void handle_RemovalCallback(void *context, IOReturn result, void *sender, device = bus_find_hid_device(&iohid_vtbl, IOHIDDevice); if (device) { + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); bus_remove_hid_device(device); } diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 61651c92f6..7a2069fafe 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -899,6 +899,7 @@ static void try_remove_device(SDL_JoystickID id) sdl_controller = private->sdl_controller; sdl_haptic = private->sdl_haptic; + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); bus_remove_hid_device(device); @@ -988,6 +989,7 @@ static void try_add_device(unsigned int index) if (!rc) { ERR("Building report descriptor failed, removing device\n"); + bus_unlink_hid_device(device); bus_remove_hid_device(device); HeapFree(GetProcessHeap(), 0, serial); return; diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 239051723c..24d7961b06 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1259,6 +1259,7 @@ static void try_add_device(struct udev_device *dev) ERR("Building report descriptor failed, removing device\n"); close(fd); udev_device_unref(dev); + bus_unlink_hid_device(device); bus_remove_hid_device(device); HeapFree(GetProcessHeap(), 0, serial); return; @@ -1293,6 +1294,7 @@ static void try_remove_device(struct udev_device *dev) #endif if (!device) return; + bus_unlink_hid_device(device); IoInvalidateDeviceRelations(bus_pdo, BusRelations); private = impl_from_DEVICE_OBJECT(device); diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index 7b05d4ce84..8bba968202 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -346,6 +346,16 @@ DEVICE_OBJECT* bus_enumerate_hid_devices(const platform_vtbl *vtbl, enum_func fu return ret; } +void bus_unlink_hid_device(DEVICE_OBJECT *device) +{ + struct device_extension *ext = (struct device_extension *)device->DeviceExtension; + struct pnp_device *pnp_device = ext->pnp_device; + + EnterCriticalSection(&device_list_cs); + list_remove(&pnp_device->entry); + LeaveCriticalSection(&device_list_cs); +} + void bus_remove_hid_device(DEVICE_OBJECT *device) { struct device_extension *ext = (struct device_extension *)device->DeviceExtension; @@ -355,10 +365,6 @@ void bus_remove_hid_device(DEVICE_OBJECT *device) TRACE("(%p)\n", device); - EnterCriticalSection(&device_list_cs); - list_remove(&pnp_device->entry); - LeaveCriticalSection(&device_list_cs); - /* Cancel pending IRPs */ EnterCriticalSection(&ext->report_cs); while ((entry = RemoveHeadList(&ext->irp_queue)) != &ext->irp_queue)
1
0
0
0
Piotr Caban : winebus: Reference PDOs added to DEVICE_RELATIONS structure.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: cc395391ed51e55a8f13150a4eb62f50417d1436 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cc395391ed51e55a8f13150a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Nov 12 19:02:20 2019 +0100 winebus: Reference PDOs added to DEVICE_RELATIONS structure. Fixes crash caused by 81cda52d153. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/tests/driver.c | 2 -- dlls/winebus.sys/main.c | 19 +++++++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 67f22a4b2b..a0f63ade79 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -62,8 +62,6 @@ static void *create_caller_thread; static PETHREAD create_irp_thread; -void WINAPI ObfReferenceObject( void *obj ); - NTSTATUS WINAPI ZwQueryInformationProcess(HANDLE,PROCESSINFOCLASS,void*,ULONG,ULONG*); static void kvprintf(const char *format, __ms_va_list ap) diff --git a/dlls/winebus.sys/main.c b/dlls/winebus.sys/main.c index b4599b6889..7b05d4ce84 100644 --- a/dlls/winebus.sys/main.c +++ b/dlls/winebus.sys/main.c @@ -31,6 +31,7 @@ #include "ddk/wdm.h" #include "ddk/hidport.h" #include "ddk/hidtypes.h" +#include "wine/asm.h" #include "wine/debug.h" #include "wine/unicode.h" #include "wine/list.h" @@ -41,6 +42,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(plugplay); WINE_DECLARE_DEBUG_CHANNEL(hid_report); +#if defined(__i386__) && !defined(_WIN32) + +extern void * WINAPI wrap_fastcall_func1( void *func, const void *a ); +__ASM_STDCALL_FUNC( wrap_fastcall_func1, 8, + "popl %ecx\n\t" + "popl %eax\n\t" + "xchgl (%esp),%ecx\n\t" + "jmp *%eax" ); + +#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a) + +#else + +#define call_fastcall_func1(func,a) func(a) + +#endif + struct product_desc { WORD vid; @@ -381,6 +399,7 @@ static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices) LIST_FOR_EACH_ENTRY(ptr, &pnp_devset, struct pnp_device, entry) { (*devices)->Objects[i] = ptr->device; + call_fastcall_func1(ObfReferenceObject, ptr->device); i++; } LeaveCriticalSection(&device_list_cs); diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 21c9539c0a..a092216b82 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1665,6 +1665,7 @@ static inline void *MmGetSystemAddressForMdlSafe(MDL *mdl, ULONG priority) return MmMapLockedPagesSpecifyCache(mdl, KernelMode, MmCached, NULL, FALSE, priority); } +void FASTCALL ObfReferenceObject(void*); void WINAPI ObDereferenceObject(void*); USHORT WINAPI ObGetFilterVersion(void); NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION*, void**);
1
0
0
0
João Diogo Ferreira : kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: c2485bb12e36f99c6e26121bfd3002465c2e3fd7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c2485bb12e36f99c6e26121b…
Author: João Diogo Ferreira <devilj(a)outlook.pt> Date: Wed Nov 6 23:32:48 2019 +0000 kernel32: Handle GEOCLASS_REGION in Get/SetUserGeoID(). Signed-off-by: João Diogo Craveiro Ferreira <devilj(a)outlook.pt> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 62 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index 884709730c..42f47c4211 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3996,12 +3996,22 @@ static const struct geoinfo_t *get_geoinfo_dataptr(GEOID geoid) /****************************************************************************** * GetUserGeoID (KERNEL32.@) + * + * Retrieves the ID of the user's geographic nation or region. + * + * PARAMS + * geoclass [I] One of GEOCLASS_NATION or GEOCLASS_REGION (SYSGEOCLASS enum from "winnls.h"). + * + * RETURNS + * SUCCESS: The ID of the specified geographic class. + * FAILURE: GEOID_NOT_AVAILABLE. */ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) { GEOID ret = GEOID_NOT_AVAILABLE; static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR regionW[] = {'R','e','g','i','o','n',0}; WCHAR bufferW[40], *end; HANDLE hkey, hsubkey = 0; UNICODE_STRING keyW; @@ -4009,20 +4019,26 @@ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) DWORD count = sizeof(bufferW); RtlInitUnicodeString(&keyW, nationW); - if (!(hkey = create_registry_key())) return ret; - - switch (geoclass) { + switch (geoclass) + { case GEOCLASS_NATION: - if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) - { - if ((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, - bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) - ret = strtolW((const WCHAR*)info->Data, &end, 10); - } + RtlInitUnicodeString(&keyW, nationW); break; case GEOCLASS_REGION: - FIXME("GEOCLASS_REGION not handled yet\n"); + RtlInitUnicodeString(&keyW, regionW); break; + default: + WARN("Unknown geoclass %d\n", geoclass); + return ret; + } + + if (!(hkey = create_registry_key())) return ret; + + if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) + { + if((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, + bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) + ret = strtolW((const WCHAR*)info->Data, &end, 10); } NtClose(hkey); @@ -4032,17 +4048,34 @@ GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) /****************************************************************************** * SetUserGeoID (KERNEL32.@) + * + * Sets the ID of the user's geographic location. + * + * PARAMS + * geoid [I] The geographic ID to be set. + * + * RETURNS + * SUCCESS: TRUE. + * FAILURE: FALSE. GetLastError() will return ERROR_INVALID_PARAMETER if the ID was invalid. */ BOOL WINAPI SetUserGeoID(GEOID geoid) { + const struct geoinfo_t *geoinfo = get_geoinfo_dataptr(geoid); static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR regionW[] = {'R','e','g','i','o','n',0}; static const WCHAR formatW[] = {'%','i',0}; UNICODE_STRING nameW, keyW; WCHAR bufferW[10]; OBJECT_ATTRIBUTES attr; HANDLE hkey; + if (!geoinfo) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!(hkey = create_registry_key())) return FALSE; attr.Length = sizeof(attr); @@ -4052,16 +4085,19 @@ BOOL WINAPI SetUserGeoID(GEOID geoid) attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; RtlInitUnicodeString(&nameW, geoW); - RtlInitUnicodeString(&keyW, nationW); - if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) + if (geoinfo->kind == LOCATION_NATION) + RtlInitUnicodeString(&keyW, nationW); + else + RtlInitUnicodeString(&keyW, regionW); + if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) { NtClose(attr.RootDirectory); return FALSE; } - sprintfW(bufferW, formatW, geoid); + sprintfW(bufferW, formatW, geoinfo->id); NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); NtClose(attr.RootDirectory); NtClose(hkey);
1
0
0
0
João Diogo Ferreira : kernel32: Move Get/SetUserGeoID() to after the geoinfo struct.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: dd505fab260491f5606070b3dcb8e9c2f15d3b63 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dd505fab260491f5606070b3…
Author: João Diogo Ferreira <devilj(a)outlook.pt> Date: Thu Nov 7 14:04:28 2019 +0000 kernel32: Move Get/SetUserGeoID() to after the geoinfo struct. Signed-off-by: João Diogo Craveiro Ferreira <devilj(a)outlook.pt> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 149 ++++++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 75 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index c690aa8d5e..884709730c 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -3643,81 +3643,6 @@ BOOL WINAPI InvalidateNLSCache(void) return FALSE; } -/****************************************************************************** - * GetUserGeoID (KERNEL32.@) - */ -GEOID WINAPI GetUserGeoID( GEOCLASS GeoClass ) -{ - GEOID ret = GEOID_NOT_AVAILABLE; - static const WCHAR geoW[] = {'G','e','o',0}; - static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; - WCHAR bufferW[40], *end; - DWORD count; - HANDLE hkey, hSubkey = 0; - UNICODE_STRING keyW; - const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)bufferW; - RtlInitUnicodeString( &keyW, nationW ); - count = sizeof(bufferW); - - if(!(hkey = create_registry_key())) return ret; - - switch( GeoClass ){ - case GEOCLASS_NATION: - if ((hSubkey = NLS_RegOpenKey(hkey, geoW))) - { - if((NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation, - bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) - ret = strtolW((LPCWSTR)info->Data, &end, 10); - } - break; - case GEOCLASS_REGION: - FIXME("GEOCLASS_REGION not handled yet\n"); - break; - } - - NtClose(hkey); - if (hSubkey) NtClose(hSubkey); - return ret; -} - -/****************************************************************************** - * SetUserGeoID (KERNEL32.@) - */ -BOOL WINAPI SetUserGeoID( GEOID GeoID ) -{ - static const WCHAR geoW[] = {'G','e','o',0}; - static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; - static const WCHAR formatW[] = {'%','i',0}; - UNICODE_STRING nameW,keyW; - WCHAR bufferW[10]; - OBJECT_ATTRIBUTES attr; - HANDLE hkey; - - if(!(hkey = create_registry_key())) return FALSE; - - attr.Length = sizeof(attr); - attr.RootDirectory = hkey; - attr.ObjectName = &nameW; - attr.Attributes = 0; - attr.SecurityDescriptor = NULL; - attr.SecurityQualityOfService = NULL; - RtlInitUnicodeString( &nameW, geoW ); - RtlInitUnicodeString( &keyW, nationW ); - - if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) - - { - NtClose(attr.RootDirectory); - return FALSE; - } - - sprintfW(bufferW, formatW, GeoID); - NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); - NtClose(attr.RootDirectory); - NtClose(hkey); - return TRUE; -} - /****************************************************************************** * EnumUILanguagesA (KERNEL32.@) */ @@ -4069,6 +3994,80 @@ static const struct geoinfo_t *get_geoinfo_dataptr(GEOID geoid) return NULL; } +/****************************************************************************** + * GetUserGeoID (KERNEL32.@) + */ +GEOID WINAPI GetUserGeoID(GEOCLASS geoclass) +{ + GEOID ret = GEOID_NOT_AVAILABLE; + static const WCHAR geoW[] = {'G','e','o',0}; + static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + WCHAR bufferW[40], *end; + HANDLE hkey, hsubkey = 0; + UNICODE_STRING keyW; + const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)bufferW; + DWORD count = sizeof(bufferW); + RtlInitUnicodeString(&keyW, nationW); + + if (!(hkey = create_registry_key())) return ret; + + switch (geoclass) { + case GEOCLASS_NATION: + if ((hsubkey = NLS_RegOpenKey(hkey, geoW))) + { + if ((NtQueryValueKey(hsubkey, &keyW, KeyValuePartialInformation, + bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) + ret = strtolW((const WCHAR*)info->Data, &end, 10); + } + break; + case GEOCLASS_REGION: + FIXME("GEOCLASS_REGION not handled yet\n"); + break; + } + + NtClose(hkey); + if (hsubkey) NtClose(hsubkey); + return ret; +} + +/****************************************************************************** + * SetUserGeoID (KERNEL32.@) + */ +BOOL WINAPI SetUserGeoID(GEOID geoid) +{ + static const WCHAR geoW[] = {'G','e','o',0}; + static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; + static const WCHAR formatW[] = {'%','i',0}; + UNICODE_STRING nameW, keyW; + WCHAR bufferW[10]; + OBJECT_ATTRIBUTES attr; + HANDLE hkey; + + if (!(hkey = create_registry_key())) return FALSE; + + attr.Length = sizeof(attr); + attr.RootDirectory = hkey; + attr.ObjectName = &nameW; + attr.Attributes = 0; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + RtlInitUnicodeString(&nameW, geoW); + RtlInitUnicodeString(&keyW, nationW); + + if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS) + + { + NtClose(attr.RootDirectory); + return FALSE; + } + + sprintfW(bufferW, formatW, geoid); + NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); + NtClose(attr.RootDirectory); + NtClose(hkey); + return TRUE; +} + /****************************************************************************** * GetGeoInfoW (KERNEL32.@) */
1
0
0
0
Dmitry Timoshkov : kernelbase: Implement EqualDomainSid.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: fde235da03de45c8520c069cd7c27ca1f7b6167c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fde235da03de45c8520c069c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Nov 8 14:12:52 2019 +0800 kernelbase: Implement EqualDomainSid. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/tests/security.c | 78 ++++++++++++++++++++++ .../api-ms-win-downlevel-advapi32-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-1-0.spec | 2 +- .../api-ms-win-security-base-l1-2-0.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/security.c | 55 +++++++++++++++ include/winbase.h | 1 + include/winerror.h | 2 + 9 files changed, 141 insertions(+), 5 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=fde235da03de45c8520c…
1
0
0
0
Matteo Bruni : d3dcompiler/tests: Add a small test for MinPrecision.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 27bf34bb515af6006c2cbd5a4f19bad888153802 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=27bf34bb515af6006c2cbd5a…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:29 2019 +0100 d3dcompiler/tests: Add a small test for MinPrecision. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/tests/reflection.c | 37 ++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index 8e48d4d402..fb117fd6a9 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -296,16 +296,31 @@ static const D3D11_SIGNATURE_PARAMETER_DESC test_reflection_desc_vs_resultout[] {"SV_InstanceID", 0, 6, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_UINT32, 0x1, 0xe, 0}, }; +struct D3D11_SIGNATURE_PARAMETER_DESC_46 +{ + const char *SemanticName; + UINT SemanticIndex; + UINT Register; + D3D_NAME SystemValueType; + D3D_REGISTER_COMPONENT_TYPE ComponentType; + BYTE Mask; + BYTE ReadWriteMask; + UINT Stream; + D3D_MIN_PRECISION MinPrecision; +}; + static void test_reflection_desc_vs(void) { - HRESULT hr; - ULONG count; - ID3D11ShaderReflection *ref11; - D3D11_SHADER_DESC sdesc11 = {0}; - D3D11_SIGNATURE_PARAMETER_DESC desc = {0}; + struct D3D11_SIGNATURE_PARAMETER_DESC_46 desc_46 = {0}; const D3D11_SIGNATURE_PARAMETER_DESC *pdesc; - UINT ret; + D3D11_SIGNATURE_PARAMETER_DESC desc = {0}; + D3D_MIN_PRECISION expected_min_prec; + D3D11_SHADER_DESC sdesc11 = {0}; + ID3D11ShaderReflection *ref11; unsigned int i; + ULONG count; + HRESULT hr; + UINT ret; hr = pD3DReflect(test_reflection_desc_vs_blob, test_reflection_desc_vs_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); ok(hr == S_OK, "D3DReflect failed %x\n", hr); @@ -368,6 +383,16 @@ static void test_reflection_desc_vs(void) ok(ret == 0, "GetMovcInstructionCount failed, got %u, expected %u\n", ret, 0); /* GetIn/OutputParameterDesc */ + desc_46.MinPrecision = ~0u; + hr = ref11->lpVtbl->GetInputParameterDesc(ref11, 0, (D3D11_SIGNATURE_PARAMETER_DESC *)&desc_46); +#if D3D_COMPILER_VERSION >= 46 + expected_min_prec = 0; +#else + expected_min_prec = ~0u; +#endif + ok(desc_46.MinPrecision == expected_min_prec, "Got MinPrecision %#x, expected %#x.\n", + desc_46.MinPrecision, expected_min_prec); + for (i = 0; i < ARRAY_SIZE(test_reflection_desc_vs_resultin); ++i) { pdesc = &test_reflection_desc_vs_resultin[i];
1
0
0
0
Matteo Bruni : d3dcompiler/tests: Add d3dcompiler_47 tests.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: f14962e55dc90710687647abb60bfc46c42b6eeb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f14962e55dc90710687647ab…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 20:37:32 2019 +0100 d3dcompiler/tests: Add d3dcompiler_47 tests. Share the code with the existing d3dcompiler_43 tests. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 1 + configure.ac | 1 + dlls/d3dcompiler_43/tests/reflection.c | 44 +++++++++++++++++++++++----------- dlls/d3dcompiler_47/tests/Makefile.in | 10 ++++++++ 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/configure b/configure index ad0b149b7d..e40850201b 100755 --- a/configure +++ b/configure @@ -20255,6 +20255,7 @@ wine_fn_config_makefile dlls/d3dcompiler_43 enable_d3dcompiler_43 wine_fn_config_makefile dlls/d3dcompiler_43/tests enable_tests wine_fn_config_makefile dlls/d3dcompiler_46 enable_d3dcompiler_46 wine_fn_config_makefile dlls/d3dcompiler_47 enable_d3dcompiler_47 +wine_fn_config_makefile dlls/d3dcompiler_47/tests enable_tests wine_fn_config_makefile dlls/d3dim enable_d3dim wine_fn_config_makefile dlls/d3drm enable_d3drm wine_fn_config_makefile dlls/d3drm/tests enable_tests diff --git a/configure.ac b/configure.ac index 4f651efbd5..c7768db9f9 100644 --- a/configure.ac +++ b/configure.ac @@ -3131,6 +3131,7 @@ WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_43) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_43/tests) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_46) WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47) +WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47/tests) WINE_CONFIG_MAKEFILE(dlls/d3dim) WINE_CONFIG_MAKEFILE(dlls/d3drm) WINE_CONFIG_MAKEFILE(dlls/d3drm/tests) diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index 1b9d2d418d..8e48d4d402 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -75,11 +75,11 @@ static DWORD test_reflection_blob[] = { static void test_reflection_references(void) { - HRESULT hr; - ULONG count; ID3D11ShaderReflection *ref11, *ref11_test; - ID3D10ShaderReflection *ref10; ID3D10ShaderReflection1 *ref10_1; + ID3D10ShaderReflection *ref10; + HRESULT hr, expected; + ULONG count; hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); ok(hr == S_OK, "D3DReflect failed, got %x, expected %x\n", hr, S_OK); @@ -100,11 +100,16 @@ static void test_reflection_references(void) ok(count == 0, "Release failed %u\n", count); /* check invalid cases */ +#if D3D_COMPILER_VERSION >= 46 + expected = E_INVALIDARG; +#else + expected = E_NOINTERFACE; +#endif hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection, (void **)&ref10); - ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE); + ok(hr == expected, "D3DReflect failed, got %x, expected %x\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_NOINTERFACE, "D3DReflect failed, got %x, expected %x\n", hr, E_NOINTERFACE); + ok(hr == expected, "D3DReflect failed, got %x, expected %x\n", hr, expected); hr = pD3DReflect(NULL, test_reflection_blob[6], &IID_ID3D10ShaderReflection1, (void **)&ref10_1); ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); @@ -116,20 +121,25 @@ static void test_reflection_references(void) hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); +#if D3D_COMPILER_VERSION >= 46 + expected = D3DERR_INVALIDCALL; +#else + expected = E_FAIL; +#endif hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D10ShaderReflection1, (void **)&ref10_1); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, 31, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == D3DERR_INVALIDCALL, "D3DReflect failed, got %x, expected %x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got %x, expected %x.\n", hr, D3DERR_INVALIDCALL); hr = pD3DReflect(test_reflection_blob, 32, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); hr = pD3DReflect(test_reflection_blob, test_reflection_blob[6]-1, &IID_ID3D11ShaderReflection, (void **)&ref11); - ok(hr == E_FAIL, "D3DReflect failed, got %x, expected %x\n", hr, E_FAIL); + ok(hr == expected, "Got %x, expected %x.\n", hr, expected); } /* @@ -1509,11 +1519,17 @@ static void test_reflection_constant_buffer(void) ok(count == 0, "Release failed %u\n", count); } -static BOOL load_d3dcompiler(void) +static BOOL load_d3dreflect(void) { +#if D3D_COMPILER_VERSION == 47 + static const char filename[] = "d3dcompiler_47.dll"; +#else + static const char filename[] = "d3dcompiler_43.dll"; +#endif HMODULE module; - if (!(module = LoadLibraryA("d3dcompiler_43.dll"))) return FALSE; + if (!(module = LoadLibraryA(filename))) + return FALSE; pD3DReflect = (void*)GetProcAddress(module, "D3DReflect"); return TRUE; @@ -1521,9 +1537,9 @@ static BOOL load_d3dcompiler(void) START_TEST(reflection) { - if (!load_d3dcompiler()) + if (!load_d3dreflect()) { - win_skip("Could not load d3dcompiler_43.dll\n"); + win_skip("Could not load DLL.\n"); return; } diff --git a/dlls/d3dcompiler_47/tests/Makefile.in b/dlls/d3dcompiler_47/tests/Makefile.in new file mode 100644 index 0000000000..a4e3798bed --- /dev/null +++ b/dlls/d3dcompiler_47/tests/Makefile.in @@ -0,0 +1,10 @@ +TESTDLL = d3dcompiler_47.dll +IMPORTS = d3d9 d3dx9 user32 +EXTRADEFS = -DD3D_COMPILER_VERSION=47 +PARENTSRC = ../../d3dcompiler_43/tests + +C_SRCS = \ + asm.c \ + blob.c \ + hlsl.c \ + reflection.c
1
0
0
0
Matteo Bruni : d3dcompiler: Fix a couple of failure return values in >= 46 D3DReflect().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 9fd08dbff68783e7a8ce9599cb607b3bf954c074 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9fd08dbff68783e7a8ce9599…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:27 2019 +0100 d3dcompiler: Fix a couple of failure return values in >= 46 D3DReflect(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/reflection.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index ac24ba0a2d..f480c72986 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -2005,13 +2005,21 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void if (temp[6] != data_size) { WARN("Wrong size supplied.\n"); +#if D3D_COMPILER_VERSION >= 46 + return D3DERR_INVALIDCALL; +#else return E_FAIL; +#endif } if (!IsEqualGUID(riid, &IID_ID3D11ShaderReflection)) { WARN("Wrong riid %s, accept only %s!\n", debugstr_guid(riid), debugstr_guid(&IID_ID3D11ShaderReflection)); +#if D3D_COMPILER_VERSION >= 46 + return E_INVALIDARG; +#else return E_NOINTERFACE; +#endif } object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
1
0
0
0
Matteo Bruni : d3dcompiler: Initialize MinPrecision when it exists.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: d6c6fc455d9259600f47517cb82ebd498e1fbd8c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d6c6fc455d9259600f47517c…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:26 2019 +0100 d3dcompiler: Initialize MinPrecision when it exists. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/reflection.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 9a230d8d91..ac24ba0a2d 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -475,17 +475,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindin static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameterDesc( ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) { - struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface); TRACE("iface %p, index %u, desc %p\n", iface, index, desc); - if (!desc || !This->isgn || index >= This->isgn->element_count) + if (!desc || !reflection->isgn || index >= reflection->isgn->element_count) { WARN("Invalid argument specified\n"); return E_INVALIDARG; } - *desc = This->isgn->elements[index]; + *desc = reflection->isgn->elements[index]; return S_OK; } @@ -493,17 +493,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameter static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParameterDesc( ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) { - struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface); TRACE("iface %p, index %u, desc %p\n", iface, index, desc); - if (!desc || !This->osgn || index >= This->osgn->element_count) + if (!desc || !reflection->osgn || index >= reflection->osgn->element_count) { WARN("Invalid argument specified\n"); return E_INVALIDARG; } - *desc = This->osgn->elements[index]; + *desc = reflection->osgn->elements[index]; return S_OK; } @@ -511,17 +511,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParamete static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc( ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) { - struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D11ShaderReflection(iface); TRACE("iface %p, index %u, desc %p\n", iface, index, desc); - if (!desc || !This->pcsg || index >= This->pcsg->element_count) + if (!desc || !reflection->pcsg || index >= reflection->pcsg->element_count) { WARN("Invalid argument specified\n"); return E_INVALIDARG; } - *desc = This->pcsg->elements[index]; + *desc = reflection->pcsg->elements[index]; return S_OK; } @@ -1621,6 +1621,10 @@ static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature * UINT name_offset; DWORD mask; +#if D3D_COMPILER_VERSION >= 46 + /* FIXME */ + d[i].MinPrecision = D3D_MIN_PRECISION_DEFAULT; +#endif if (element_size == D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7) { read_dword(&ptr, &d[i].Stream);
1
0
0
0
Matteo Bruni : include: Expose MinPrecision field on d3dcompiler version >= 46.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: a02667beb2363644f49c84b8d161d8de7622c011 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a02667beb2363644f49c84b8…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:25 2019 +0100 include: Expose MinPrecision field on d3dcompiler version >= 46. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/d3d11shader.h | 3 +++ include/d3dcommon.idl | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/d3d11shader.h b/include/d3d11shader.h index 479020abbe..501d01ee84 100644 --- a/include/d3d11shader.h +++ b/include/d3d11shader.h @@ -130,6 +130,9 @@ typedef struct _D3D11_SIGNATURE_PARAMETER_DESC BYTE Mask; BYTE ReadWriteMask; UINT Stream; +#if D3D_COMPILER_VERSION >= 46 + D3D_MIN_PRECISION MinPrecision; +#endif } D3D11_SIGNATURE_PARAMETER_DESC; DEFINE_GUID(IID_ID3D11ShaderReflectionType, 0x6e6ffa6a, 0x9bae, 0x4613, 0xa5, 0x1e, 0x91, 0x65, 0x2d, 0x50, 0x8c, 0x21); diff --git a/include/d3dcommon.idl b/include/d3dcommon.idl index 5e38658f89..29404efd69 100644 --- a/include/d3dcommon.idl +++ b/include/d3dcommon.idl @@ -490,6 +490,18 @@ typedef enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_TRIANGLE_CCW, } D3D_TESSELLATOR_OUTPUT_PRIMITIVE; +typedef enum D3D_MIN_PRECISION +{ + D3D_MIN_PRECISION_DEFAULT = 0, + D3D_MIN_PRECISION_FLOAT_16 = 1, + D3D_MIN_PRECISION_FLOAT_2_8 = 2, + D3D_MIN_PRECISION_RESERVED = 3, + D3D_MIN_PRECISION_SINT_16 = 4, + D3D_MIN_PRECISION_UINT_16 = 5, + D3D_MIN_PRECISION_ANY_16 = 0xf0, + D3D_MIN_PRECISION_ANY_10 = 0xf1, +} D3D_MIN_PRECISION; + typedef enum D3D_CBUFFER_TYPE { D3D_CT_CBUFFER,
1
0
0
0
Matteo Bruni : include: Define D3D_COMPILER_VERSION if it's not already defined.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: cdcbc9581e06e2b82c4c50661093ee6df0befac8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cdcbc9581e06e2b82c4c5066…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:24 2019 +0100 include: Define D3D_COMPILER_VERSION if it's not already defined. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/d3dcompiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/d3dcompiler.h b/include/d3dcompiler.h index 5151f94510..bd1b3d1d44 100644 --- a/include/d3dcompiler.h +++ b/include/d3dcompiler.h @@ -34,6 +34,10 @@ static const WCHAR D3DCOMPILER_DLL_W[] = {'d','3','d','c','o','m','p','i','l','e #define D3DCOMPILER_DLL_A "d3dcompiler_47.dll" #define D3DCOMPILER_DLL WINELIB_NAME_AW(D3DCOMPILER_DLL_) +#ifndef D3D_COMPILER_VERSION +#define D3D_COMPILER_VERSION 47 +#endif + #define D3DCOMPILE_DEBUG 0x00000001 #define D3DCOMPILE_SKIP_VALIDATION 0x00000002 #define D3DCOMPILE_SKIP_OPTIMIZATION 0x00000004
1
0
0
0
Matteo Bruni : d3dcompiler: Always expect D3D_COMPILER_VERSION to be defined.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 4ed07d8586fc0ad7bbfd6be1146cf1cee73a082f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ed07d8586fc0ad7bbfd6be1…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Nov 12 19:47:23 2019 +0100 d3dcompiler: Always expect D3D_COMPILER_VERSION to be defined. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d10/Makefile.in | 1 + dlls/d3dcompiler_43/reflection.c | 2 +- dlls/d3dcompiler_43/utils.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in index 50807a295a..d54f6f70cb 100644 --- a/dlls/d3d10/Makefile.in +++ b/dlls/d3d10/Makefile.in @@ -1,6 +1,7 @@ MODULE = d3d10.dll IMPORTLIB = d3d10 IMPORTS = uuid d3d10core d3dcompiler dxgi +EXTRADEFS = -DD3D_COMPILER_VERSION=0 PARENTSRC = ../d3dcompiler_43 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index d3d083e8d8..9a230d8d91 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1807,7 +1807,7 @@ err_out: } /* d3d10 reflection methods. */ -#ifndef D3D_COMPILER_VERSION +#if !D3D_COMPILER_VERSION static inline struct d3dcompiler_shader_reflection *impl_from_ID3D10ShaderReflection(ID3D10ShaderReflection *iface) { return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection, ID3D10ShaderReflection_iface); diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index 27c0ba8c91..1436ed6bf3 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -758,7 +758,7 @@ void compilation_message(struct compilation_messages *msg, const char *fmt, __ms } } -#ifdef D3D_COMPILER_VERSION +#if D3D_COMPILER_VERSION BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) { struct hlsl_ir_var *var;
1
0
0
0
Jacek Caban : makedep: Use -Wl,-delayload option for winebuild delayimports.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 4346d68e1b6b2c5a775ce60fdc0b6fdd2fec4943 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4346d68e1b6b2c5a775ce60f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 11 19:59:13 2019 +0100 makedep: Use -Wl,-delayload option for winebuild delayimports. Also fixes winebuild to correctly handle module extensions. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/Makefile.in | 2 +- tools/makedep.c | 20 +++++++++++++++++--- tools/winebuild/import.c | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/setupapi/Makefile.in b/dlls/setupapi/Makefile.in index ae9bf3dce6..6c31365546 100644 --- a/dlls/setupapi/Makefile.in +++ b/dlls/setupapi/Makefile.in @@ -2,7 +2,7 @@ EXTRADEFS = -D_SETUPAPI_ MODULE = setupapi.dll IMPORTLIB = setupapi IMPORTS = uuid version advapi32 rpcrt4 -DELAYIMPORTS = shell32 wintrust ole32 winspool comdlg32 user32 +DELAYIMPORTS = shell32 wintrust ole32 winspool.drv comdlg32 user32 EXTRADLLFLAGS = -mno-cygwin diff --git a/tools/makedep.c b/tools/makedep.c index 13c2bd2342..65b36146ed 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -574,6 +574,19 @@ static char *get_extension( char *filename ) } +/******************************************************************* + * get_base_name + */ +static const char *get_base_name( const char *name ) +{ + char *base; + if (!strchr( name, '.' )) return name; + base = strdup( name ); + *strrchr( base, '.' ) = 0; + return base; +} + + /******************************************************************* * replace_extension */ @@ -2172,7 +2185,7 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra for (i = 0; i < imports.count; i++) { - const char *name = imports.str[i]; + const char *name = get_base_name( imports.str[i] ); const char *lib = NULL; for (j = 0; j < top_makefile->subdirs.count; j++) @@ -3211,7 +3224,8 @@ static void output_module( struct makefile *make ) if (*dll_ext) { for (i = 0; i < make->delayimports.count; i++) - strarray_add( &all_libs, strmake( "-Wb,-d%s", make->delayimports.str[i] )); + strarray_add( &all_libs, strmake( "-Wl,-delayload,%s%s", make->delayimports.str[i], + strchr( make->delayimports.str[i], '.' ) ? "" : ".dll" )); strarray_add( &make->all_targets, strmake( "%s%s", make->module, dll_ext )); strarray_add( &make->all_targets, strmake( "%s.fake", make->module )); add_install_rule( make, make->module, strmake( "%s%s", make->module, dll_ext ), @@ -4235,7 +4249,7 @@ static void load_sources( struct makefile *make ) if (!*dll_ext || make->is_cross) for (i = 0; i < make->delayimports.count; i++) - strarray_add_uniq( &delay_import_libs, make->delayimports.str[i] ); + strarray_add_uniq( &delay_import_libs, get_base_name( make->delayimports.str[i] )); } diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index e2688a058a..c4dc31957d 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -371,7 +371,7 @@ void add_import_dll( const char *name, const char *filename ) imp->dll_name = spec->file_name ? spec->file_name : dll_name; imp->c_name = make_c_identifier( imp->dll_name ); - if (is_delayed_import( dll_name )) + if (is_delayed_import( imp->dll_name )) list_add_tail( &dll_delayed, &imp->entry ); else list_add_tail( &dll_imports, &imp->entry );
1
0
0
0
Jacek Caban : winegcc: Add support for -Wl,-delayload argument.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 9180dec0b7490457c902e4b9650a68ab36d8ce96 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9180dec0b7490457c902e4b9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 11 19:56:49 2019 +0100 winegcc: Add support for -Wl,-delayload argument. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winegcc/winegcc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index fa4407f913..140ca07822 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -226,6 +226,7 @@ struct options strarray* compiler_args; strarray* winebuild_args; strarray* files; + strarray* delayimports; }; #ifdef __i386__ @@ -1164,6 +1165,12 @@ static void build(struct options* opts) for ( j = 0 ; j < opts->winebuild_args->size ; j++ ) strarray_add(spec_args, opts->winebuild_args->base[j]); + if (!is_pe) + { + for (j = 0; j < opts->delayimports->size; j++) + strarray_add(spec_args, strmake("-d%s", opts->delayimports->base[j])); + } + /* add resource files */ for ( j = 0; j < files->size; j++ ) if (files->base[j][1] == 'r') strarray_add(spec_args, files->base[j]); @@ -1203,6 +1210,12 @@ static void build(struct options* opts) strarray_add(link_args, spec_o_name); + if (is_pe) + { + for (j = 0; j < opts->delayimports->size; j++) + strarray_add(spec_args, strmake("-Wl,-delayload,%s", opts->delayimports->base[j])); + } + for ( j = 0; j < files->size; j++ ) { const char* name = files->base[j] + 2; @@ -1423,6 +1436,7 @@ int main(int argc, char **argv) opts.linker_args = strarray_alloc(); opts.compiler_args = strarray_alloc(); opts.winebuild_args = strarray_alloc(); + opts.delayimports = strarray_alloc(); opts.pic = 1; /* determine the processor type */ @@ -1672,6 +1686,11 @@ int main(int argc, char **argv) opts.subsystem = strdup( Wl->base[++j] ); continue; } + if (!strcmp(Wl->base[j], "-delayload") && j < Wl->size - 1) + { + strarray_add( opts.delayimports, Wl->base[++j] ); + continue; + } if (!strcmp(Wl->base[j], "-static")) linking = -1; strarray_add(opts.linker_args, strmake("-Wl,%s",Wl->base[j])); }
1
0
0
0
Sven Baars : gdi32/tests: Remove some Win9x workarounds from the clipping tests.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 0e1720813c34534142c6871db49d90d6cef47a6b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e1720813c34534142c6871d…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Sun Nov 10 12:44:11 2019 +0100 gdi32/tests: Remove some Win9x workarounds from the clipping tests. Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/clipping.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/dlls/gdi32/tests/clipping.c b/dlls/gdi32/tests/clipping.c index 8f3beb56b7..015157522d 100644 --- a/dlls/gdi32/tests/clipping.c +++ b/dlls/gdi32/tests/clipping.c @@ -182,13 +182,10 @@ static void test_ExtCreateRegion(void) HRGN hrgn; XFORM xform; - if (0) /* crashes under Win9x */ - { - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, 0, NULL); - ok(!hrgn, "ExtCreateRegion should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); - } + SetLastError(0xdeadbeef); + hrgn = ExtCreateRegion(NULL, 0, NULL); + ok(!hrgn, "ExtCreateRegion should fail\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); rgn.data.rdh.dwSize = 0; rgn.data.rdh.iType = 0; @@ -286,9 +283,7 @@ static void test_GetClipRgn(void) /* Test calling GetClipRgn with a valid device context and NULL region. */ ret = GetClipRgn(hdc, NULL); - ok(ret == 0 || - ret == -1 /* Win9x */, - "Expected GetClipRgn to return 0, got %d\n", ret); + ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret); /* Initialize the test regions. */ hrgn = CreateRectRgn(100, 100, 100, 100); @@ -340,9 +335,7 @@ static void test_GetClipRgn(void) "Expected SelectClipRgn to return SIMPLEREGION, got %d\n", ret); ret = GetClipRgn(hdc, NULL); - ok(ret == 0 || - ret == -1 /* Win9x */, - "Expected GetClipRgn to return 0, got %d\n", ret); + ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret); ret = GetClipRgn(hdc, hrgn3); ok(ret == 0, "Expected GetClipRgn to return 0, got %d\n", ret);
1
0
0
0
Sven Baars : gdi32/tests: Update expected ExtCreateRegion behavior to represent newer Windows.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 7979b879638dc09e3f7d239c1630a61899c6f0ee URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7979b879638dc09e3f7d239c…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Sun Nov 10 12:44:10 2019 +0100 gdi32/tests: Update expected ExtCreateRegion behavior to represent newer Windows. Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/tests/clipping.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/dlls/gdi32/tests/clipping.c b/dlls/gdi32/tests/clipping.c index d04ef77ca3..8f3beb56b7 100644 --- a/dlls/gdi32/tests/clipping.c +++ b/dlls/gdi32/tests/clipping.c @@ -225,7 +225,9 @@ static void test_ExtCreateRegion(void) hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) - 1, &rgn.data); todo_wine ok(!hrgn, "ExtCreateRegion should fail\n"); - ok(GetLastError() == 0xdeadbeef, "0xdeadbeef, got %u\n", GetLastError()); + todo_wine + ok(GetLastError() == ERROR_INVALID_PARAMETER || + broken(GetLastError() == 0xdeadbeef), "0xdeadbeef, got %u\n", GetLastError()); SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); @@ -237,32 +239,12 @@ static void test_ExtCreateRegion(void) SetRectEmpty(&rgn.data.rdh.rcBound); memcpy(rgn.data.Buffer, &rc, sizeof(rc)); - /* With a single rect this seems to work... */ - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, sizeof(RGNDATAHEADER) + sizeof(RECT) - 1, &rgn.data); - ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError()); - verify_region(hrgn, &rc); - DeleteObject(hrgn); - SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(NULL, sizeof(rgn), &rgn.data); ok(hrgn != 0, "ExtCreateRegion error %u\n", GetLastError()); verify_region(hrgn, &rc); DeleteObject(hrgn); - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh) + 1; - - SetLastError(0xdeadbeef); - hrgn = ExtCreateRegion(NULL, 1, &rgn.data); - ok(hrgn != 0 || - broken(GetLastError() == 0xdeadbeef), /* NT4 */ - "ExtCreateRegion error %u\n", GetLastError()); - if(hrgn) - { - verify_region(hrgn, &rc); - DeleteObject(hrgn); - } - xform.eM11 = 0.5; /* 50% width */ xform.eM12 = 0.0; xform.eM21 = 0.0; @@ -270,8 +252,6 @@ static void test_ExtCreateRegion(void) xform.eDx = 20.0; xform.eDy = 40.0; - rgn.data.rdh.dwSize = sizeof(rgn.data.rdh); - SetLastError(0xdeadbeef); hrgn = ExtCreateRegion(&xform, sizeof(rgn), &rgn.data); ok(hrgn != 0, "ExtCreateRegion error %u/%x\n", GetLastError(), GetLastError());
1
0
0
0
Jacek Caban : vbscript: Always treat keywords after dot as identifiers.
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 107bba15632eb2ae58358cf3610d5790e71da4fb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=107bba15632eb2ae58358cf3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Nov 12 14:26:04 2019 +0100 vbscript: Always treat keywords after dot as identifiers. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/lex.c | 4 ++- dlls/vbscript/parser.y | 62 +++----------------------------------------- dlls/vbscript/tests/lang.vbs | 5 +++- dlls/vbscript/tests/run.c | 11 ++++---- 4 files changed, 16 insertions(+), 66 deletions(-) diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c index 197285c98e..444774b434 100644 --- a/dlls/vbscript/lex.c +++ b/dlls/vbscript/lex.c @@ -358,7 +358,9 @@ static int parse_next_token(void *lval, parser_ctx_t *ctx) return parse_numeric_literal(ctx, lval); if(iswalpha(c)) { - int ret = check_keywords(ctx, lval); + int ret = 0; + if(ctx->last_token != '.' && ctx->last_token != tDOT) + ret = check_keywords(ctx, lval); if(!ret) return parse_identifier(ctx, lval); if(ret != tREM) diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 9315b7ea39..a28717ff76 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -144,7 +144,7 @@ static statement_t *link_statements(statement_t*,statement_t*); %type <dim_decl> DimDeclList DimDecl %type <dim_list> DimList %type <const_decl> ConstDecl ConstDeclList -%type <string> Identifier DotIdentifier +%type <string> Identifier %type <case_clausule> CaseClausules %% @@ -231,8 +231,8 @@ SimpleStatement MemberExpression : Identifier { $$ = new_member_expression(ctx, NULL, $1); CHECK_ERROR; } - | CallExpression '.' DotIdentifier { $$ = new_member_expression(ctx, $1, $3); CHECK_ERROR; } - | tDOT DotIdentifier { expression_t *dot_expr = new_expression(ctx, EXPR_DOT, sizeof(*dot_expr)); CHECK_ERROR; + | CallExpression '.' tIdentifier { $$ = new_member_expression(ctx, $1, $3); CHECK_ERROR; } + | tDOT tIdentifier { expression_t *dot_expr = new_expression(ctx, EXPR_DOT, sizeof(*dot_expr)); CHECK_ERROR; $$ = new_member_expression(ctx, dot_expr, $2); CHECK_ERROR; } Preserve_opt @@ -492,62 +492,6 @@ Identifier | tPROPERTY { $$ = $1; } | tSTEP { $$ = $1; } -/* most keywords can be an identifier after a dot */ -DotIdentifier - : Identifier { $$ = $1; } - | tTRUE { $$ = $1; } - | tFALSE { $$ = $1; } - | tNOT { $$ = $1; } - | tAND { $$ = $1; } - | tOR { $$ = $1; } - | tXOR { $$ = $1; } - | tEQV { $$ = $1; } - | tIMP { $$ = $1; } - | tIS { $$ = $1; } - | tMOD { $$ = $1; } - | tCALL { $$ = $1; } - | tDIM { $$ = $1; } - | tSUB { $$ = $1; } - | tFUNCTION { $$ = $1; } - | tGET { $$ = $1; } - | tLET { $$ = $1; } - | tCONST { $$ = $1; } - | tIF { $$ = $1; } - | tELSE { $$ = $1; } - | tELSEIF { $$ = $1; } - | tEND { $$ = $1; } - | tTHEN { $$ = $1; } - | tEXIT { $$ = $1; } - | tWHILE { $$ = $1; } - | tWEND { $$ = $1; } - | tDO { $$ = $1; } - | tLOOP { $$ = $1; } - | tUNTIL { $$ = $1; } - | tFOR { $$ = $1; } - | tTO { $$ = $1; } - | tEACH { $$ = $1; } - | tIN { $$ = $1; } - | tSELECT { $$ = $1; } - | tCASE { $$ = $1; } - | tBYREF { $$ = $1; } - | tBYVAL { $$ = $1; } - | tOPTION { $$ = $1; } - | tNOTHING { $$ = $1; } - | tEMPTY { $$ = $1; } - | tNULL { $$ = $1; } - | tCLASS { $$ = $1; } - | tSET { $$ = $1; } - | tNEW { $$ = $1; } - | tPUBLIC { $$ = $1; } - | tPRIVATE { $$ = $1; } - | tNEXT { $$ = $1; } - | tON { $$ = $1; } - | tRESUME { $$ = $1; } - | tGOTO { $$ = $1; } - | tWITH { $$ = $1; } - | tREDIM { $$ = $1; } - | tPRESERVE { $$ = $1; } - /* Most statements accept both new line and ':' as separators */ StSep : tNL diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 46e2ac7ab8..6eebe287fe 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1514,7 +1514,7 @@ call test_identifiers() sub test_dotIdentifiers ' test keywords that can also be an identifier after a dot - ' Call ok(testObj.rem = 10, "testObj.rem = " & testObj.rem & " expected 10") + Call ok(testObj.rem = 10, "testObj.rem = " & testObj.rem & " expected 10") Call ok(testObj.true = 10, "testObj.true = " & testObj.true & " expected 10") Call ok(testObj.false = 10, "testObj.false = " & testObj.false & " expected 10") Call ok(testObj.not = 10, "testObj.not = " & testObj.not & " expected 10") @@ -1567,6 +1567,9 @@ sub test_dotIdentifiers Call ok(testObj.with = 10, "testObj.with = " & testObj.with & " expected 10") Call ok(testObj.redim = 10, "testObj.redim = " & testObj.redim & " expected 10") Call ok(testObj.preserve = 10, "testObj.preserve = " & testObj.preserve & " expected 10") + Call ok(testObj.property = 10, "testObj.property = " & testObj.property & " expected 10") + Call ok(testObj.me = 10, "testObj.me = " & testObj.me & " expected 10") + Call ok(testObj.stop = 10, "testObj.stop = " & testObj.stop & " expected 10") end sub call test_dotIdentifiers diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 707fd89493..5fc23707e3 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -859,7 +859,10 @@ static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD { L"goto", DISPID_TESTOBJ_KEYWORD }, { L"redim", DISPID_TESTOBJ_KEYWORD }, { L"preserve", DISPID_TESTOBJ_KEYWORD }, - { L"with", DISPID_TESTOBJ_KEYWORD } + { L"with", DISPID_TESTOBJ_KEYWORD }, + { L"property", DISPID_TESTOBJ_KEYWORD }, + { L"me", DISPID_TESTOBJ_KEYWORD }, + { L"stop", DISPID_TESTOBJ_KEYWORD } }; test_grfdex(grfdex, fdexNameCaseInsensitive); @@ -2881,12 +2884,8 @@ static void run_tests(void) parse_script_a("Option Explicit\nset test.setobj = testObj"); CHECK_CALLED(global_setobj_i); - SET_EXPECT(OnScriptError); hres = parse_script_ar("dim x\nx = testObj.rem"); - todo_wine ok(hres == S_OK, "use of 'rem' as dot identifier failed: %x08\n", hres); - todo_wine - CHECK_NOT_CALLED(OnScriptError); SET_EXPECT(testobj_propget_d); SET_EXPECT(testobj_propget_i); @@ -2948,6 +2947,8 @@ static void run_tests(void) "x(counter(), counter()) = counter\n"); CHECK_CALLED(testobj_valueput_i); + parse_script_a("dim x\nx = testObj.property(1)"); + parse_htmlscript_a("<!--"); parse_htmlscript_a(" -->"); parse_htmlscript_a("<!--\ndim x\nx=1\n-->\n");
1
0
0
0
Nikolay Sivov : ole32: Return optional name in IEnumSTATPROPSTG::Next().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 9b7923e4bc59a1cf703f06d62f0c62638be08062 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b7923e4bc59a1cf703f06d6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 12 12:00:11 2019 +0300 ole32: Return optional name in IEnumSTATPROPSTG::Next(). Based on patch by Michael Müller. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/stg_prop.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 70b8cd3b0e..5518429b31 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -177,6 +177,7 @@ struct enum_stat_prop_stg { IEnumSTATPROPSTG IEnumSTATPROPSTG_iface; LONG refcount; + PropertyStorage_impl *storage; STATPROPSTG *stats; size_t current; size_t count; @@ -222,6 +223,7 @@ static ULONG WINAPI enum_stat_prop_stg_Release(IEnumSTATPROPSTG *iface) if (!refcount) { + IPropertyStorage_Release(&penum->storage->IPropertyStorage_iface); heap_free(penum->stats); heap_free(penum); } @@ -233,6 +235,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel { struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface); ULONG count = 0; + WCHAR *name; TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched); @@ -240,7 +243,19 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel penum->current = 0; while (count < celt && penum->current < penum->count) - ret[count++] = penum->stats[penum->current++]; + { + *ret = penum->stats[penum->current++]; + + if (dictionary_find(penum->storage->propid_to_name, UlongToPtr(ret->propid), (void **)&name)) + { + SIZE_T size = (lstrlenW(name) + 1) * sizeof(WCHAR); + ret->lpwstrName = CoTaskMemAlloc(size); + if (ret->lpwstrName) + memcpy(ret->lpwstrName, name, size); + } + ret++; + count++; + } if (fetched) *fetched = count; @@ -321,6 +336,8 @@ static HRESULT create_enum_stat_prop_stg(PropertyStorage_impl *storage, IEnumSTA enum_obj->IEnumSTATPROPSTG_iface.lpVtbl = &enum_stat_prop_stg_vtbl; enum_obj->refcount = 1; + enum_obj->storage = storage; + IPropertyStorage_AddRef(&storage->IPropertyStorage_iface); count = 0; dictionary_enumerate(storage->propid_to_prop, prop_enum_stat_count, &count);
1
0
0
0
Erich E. Hoover : qmgr: Call the notification callback when jobs complete.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 34ed1e37da1e1c1cfd641f1f16b0e00030cbb357 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34ed1e37da1e1c1cfd641f1f…
Author: Erich E. Hoover <erich.e.hoover(a)gmail.com> Date: Thu Nov 7 11:26:26 2019 -0700 qmgr: Call the notification callback when jobs complete. Signed-off-by: Erich E. Hoover <erich.e.hoover(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qmgr/job.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 0eef3361d4..c33389574e 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -1280,6 +1280,8 @@ void processJob(BackgroundCopyJobImpl *job) if (done) { transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRED); + if (job->callback && (job->notify_flags & BG_NOTIFY_JOB_TRANSFERRED)) + IBackgroundCopyCallback2_JobTransferred(job->callback, (IBackgroundCopyJob*)&job->IBackgroundCopyJob3_iface); return; }
1
0
0
0
Jacek Caban : msvcrt/tests: Add iswdigit tests.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 1edda7a30251c4a7bad020ad734d50dc04bbf93c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1edda7a30251c4a7bad020ad…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 11 20:04:32 2019 +0100 msvcrt/tests: Add iswdigit tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/string.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index a74ba22cfc..88922fe465 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3930,6 +3930,28 @@ static void test_strstr(void) } } +static void test_iswdigit(void) +{ + static const struct { + WCHAR c; + int r; + } tests[] = { + { '0', C1_DIGIT }, + { '9', C1_DIGIT }, + { 'a', 0 }, + { 0xff16, C1_DIGIT }, + { 0x0660, C1_DIGIT }, + { 0x0ce6, C1_DIGIT } + }; + int i, r; + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + r = iswdigit(tests[i].c); + ok(r == tests[i].r, "iswdigit returned %x for %x\n", r, tests[i].c); + } +} + START_TEST(string) { char mem[100]; @@ -4070,4 +4092,5 @@ START_TEST(string) test___strncnt(); test_C_locale(); test_strstr(); + test_iswdigit(); }
1
0
0
0
Gabriel Ivăncescu : vbscript/tests: Add tests for pending and executed code persistence.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: e10935126123309430938f4a7aeac23125c48e43 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e10935126123309430938f4a…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:28 2019 +0200 vbscript/tests: Add tests for pending and executed code persistence. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/tests/vbscript.c | 237 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e1093512612330943093…
1
0
0
0
Gabriel Ivăncescu : vbscript/tests: Use integers instead of booleans for counting call expectations.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 2d45f49fe8ef71fa15f356244a641a6423464f3a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d45f49fe8ef71fa15f35624…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:27 2019 +0200 vbscript/tests: Use integers instead of booleans for counting call expectations. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/tests/vbscript.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index c0a582c361..3fe73a910d 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -53,27 +53,27 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); #define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE + static int expect_ ## func = 0, called_ ## func = 0 #define SET_EXPECT(func) \ - expect_ ## func = TRUE + expect_ ## func = 1 #define CHECK_EXPECT2(func) \ do { \ ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ + called_ ## func++; \ }while(0) #define CHECK_EXPECT(func) \ do { \ CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ + expect_ ## func--; \ }while(0) #define CHECK_CALLED(func) \ do { \ ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ + expect_ ## func = called_ ## func = 0; \ }while(0) DEFINE_EXPECT(GetLCID);
1
0
0
0
Gabriel Ivăncescu : vbscript: Change release_dynamic_vars to release a single variable.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: f9613711aaf29c3a43f008189085ba261ac30807 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f9613711aaf29c3a43f00818…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:25 2019 +0200 vbscript: Change release_dynamic_vars to release a single variable. We need to free them while iterating an array as well as a linked list. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/interp.c | 16 ++++++++-------- dlls/vbscript/vbscript.c | 2 +- dlls/vbscript/vbscript.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index cf21601ecc..d15a1b5329 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -2243,22 +2243,22 @@ OP_LIST #undef X }; -void release_dynamic_vars(dynamic_var_t *var) +void release_dynamic_var(dynamic_var_t *var) { - while(var) { - VariantClear(&var->v); - if(var->array) - SafeArrayDestroy(var->array); - var = var->next; - } + VariantClear(&var->v); + if(var->array) + SafeArrayDestroy(var->array); } static void release_exec(exec_ctx_t *ctx) { + dynamic_var_t *var; unsigned i; VariantClear(&ctx->ret_val); - release_dynamic_vars(ctx->dynamic_vars); + + for(var = ctx->dynamic_vars; var; var = var->next) + release_dynamic_var(var); if(ctx->vbthis) IDispatchEx_Release(&ctx->vbthis->IDispatchEx_iface); diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 85107e7e84..fdade9f13a 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -217,7 +217,7 @@ static void release_script(script_ctx_t *ctx) clear_ei(&ctx->ei); for(i = 0; i < ctx->global_vars_cnt; i++) - VariantClear(&ctx->global_vars[i]->v); + release_dynamic_var(ctx->global_vars[i]); heap_free(ctx->global_vars); heap_free(ctx->global_funcs); diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index a59f341b10..1cc36fd3fd 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -361,7 +361,7 @@ void release_vbscode(vbscode_t*) DECLSPEC_HIDDEN; HRESULT compile_script(script_ctx_t*,const WCHAR*,const WCHAR*,DWORD,vbscode_t**) DECLSPEC_HIDDEN; HRESULT compile_procedure(script_ctx_t*,const WCHAR*,const WCHAR*,DWORD,class_desc_t**) DECLSPEC_HIDDEN; HRESULT exec_script(script_ctx_t*,BOOL,function_t*,vbdisp_t*,DISPPARAMS*,VARIANT*) DECLSPEC_HIDDEN; -void release_dynamic_vars(dynamic_var_t*) DECLSPEC_HIDDEN; +void release_dynamic_var(dynamic_var_t*) DECLSPEC_HIDDEN; IDispatch *lookup_named_item(script_ctx_t*,const WCHAR*,unsigned) DECLSPEC_HIDDEN; void clear_ei(EXCEPINFO*) DECLSPEC_HIDDEN; HRESULT report_script_error(script_ctx_t*) DECLSPEC_HIDDEN;
1
0
0
0
Gabriel Ivăncescu : vbscript: Append to the global lists when the code is executed, rather than compiled.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: b7eb693e7fefa9ff3a7bacb349a945818c5ad352 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7eb693e7fefa9ff3a7bacb3…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:24 2019 +0200 vbscript: Append to the global lists when the code is executed, rather than compiled. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 102 ++++++++++++----------------------------------- dlls/vbscript/vbscript.c | 79 ++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 76 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 50c9dfb873..bc0020913a 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -1759,6 +1759,7 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifier) { class_desc_t *class; + vbscode_t *code; unsigned i; for(i = 0; i < script->global_vars_cnt; i++) { @@ -1776,6 +1777,30 @@ static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifi return TRUE; } + LIST_FOR_EACH_ENTRY(code, &script->code_list, vbscode_t, entry) { + unsigned var_cnt = code->main_code.var_cnt; + var_desc_t *vars = code->main_code.vars; + function_t *func; + + if(!code->pending_exec) + continue; + + for(i = 0; i < var_cnt; i++) { + if(!wcsicmp(vars[i].name, identifier)) + return TRUE; + } + + for(func = code->funcs; func; func = func->next) { + if(!wcsicmp(func->name, identifier)) + return TRUE; + } + + for(class = code->classes; class; class = class->next) { + if(!wcsicmp(class->name, identifier)) + return TRUE; + } + } + return FALSE; } @@ -1864,13 +1889,11 @@ static void release_compiler(compile_ctx_t *ctx) HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *delimiter, DWORD flags, vbscode_t **ret) { - function_t *new_func, *func_iter; function_decl_t *func_decl; class_decl_t *class_decl; + function_t *new_func; compile_ctx_t ctx; vbscode_t *code; - size_t cnt; - unsigned i; HRESULT hres; if (!src) src = L""; @@ -1922,79 +1945,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli return compile_error(script, hres); } - cnt = script->global_vars_cnt + ctx.code->main_code.var_cnt; - if(cnt > script->global_vars_size) { - dynamic_var_t **new_vars; - if(script->global_vars) - new_vars = heap_realloc(script->global_vars, cnt * sizeof(*new_vars)); - else - new_vars = heap_alloc(cnt * sizeof(*new_vars)); - if(!new_vars) - return compile_error(script, E_OUTOFMEMORY); - script->global_vars = new_vars; - script->global_vars_size = cnt; - } - - cnt = script->global_funcs_cnt; - for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) - cnt++; - if(cnt > script->global_funcs_size) { - function_t **new_funcs; - if(script->global_funcs) - new_funcs = heap_realloc(script->global_funcs, cnt * sizeof(*new_funcs)); - else - new_funcs = heap_alloc(cnt * sizeof(*new_funcs)); - if(!new_funcs) - return compile_error(script, E_OUTOFMEMORY); - script->global_funcs = new_funcs; - script->global_funcs_size = cnt; - } - - for(i = 0; i < ctx.code->main_code.var_cnt; i++) { - dynamic_var_t *var = compiler_alloc(ctx.code, sizeof(*var)); - if(!var) { - release_compiler(&ctx); - return compile_error(script, E_OUTOFMEMORY); - } - - var->name = ctx.code->main_code.vars[i].name; - V_VT(&var->v) = VT_EMPTY; - var->is_const = FALSE; - var->array = NULL; - - script->global_vars[script->global_vars_cnt + i] = var; - } - - script->global_vars_cnt += ctx.code->main_code.var_cnt; - - for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) { - unsigned i; - for(i = 0; i < script->global_funcs_cnt; i++) { - if(!wcsicmp(script->global_funcs[i]->name, func_iter->name)) { - /* global function already exists, replace it */ - script->global_funcs[i] = func_iter; - break; - } - } - if(i == script->global_funcs_cnt) - script->global_funcs[script->global_funcs_cnt++] = func_iter; - } - - if(ctx.code->classes) { - class_desc_t *class = ctx.code->classes; - - while(1) { - class->ctx = script; - if(!class->next) - break; - class = class->next; - } - - class->next = script->classes; - script->classes = ctx.code->classes; - code->last_class = class; - } - code->is_persistent = (flags & SCRIPTTEXT_ISPERSISTENT) != 0; if(TRACE_ON(vbscript_disas)) diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 07763fa3d7..85107e7e84 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -82,6 +82,85 @@ static inline BOOL is_started(VBScript *This) static HRESULT exec_global_code(script_ctx_t *ctx, vbscode_t *code, VARIANT *res) { + function_t *func_iter, **new_funcs; + dynamic_var_t *var, **new_vars; + size_t cnt, i; + + cnt = ctx->global_vars_cnt + code->main_code.var_cnt; + if (cnt > ctx->global_vars_size) + { + if (ctx->global_vars) + new_vars = heap_realloc(ctx->global_vars, cnt * sizeof(*new_vars)); + else + new_vars = heap_alloc(cnt * sizeof(*new_vars)); + if (!new_vars) + return E_OUTOFMEMORY; + ctx->global_vars = new_vars; + ctx->global_vars_size = cnt; + } + + cnt = ctx->global_funcs_cnt; + for (func_iter = code->funcs; func_iter; func_iter = func_iter->next) + cnt++; + if (cnt > ctx->global_funcs_size) + { + if (ctx->global_funcs) + new_funcs = heap_realloc(ctx->global_funcs, cnt * sizeof(*new_funcs)); + else + new_funcs = heap_alloc(cnt * sizeof(*new_funcs)); + if (!new_funcs) + return E_OUTOFMEMORY; + ctx->global_funcs = new_funcs; + ctx->global_funcs_size = cnt; + } + + for (i = 0; i < code->main_code.var_cnt; i++) + { + if (!(var = heap_pool_alloc(&ctx->heap, sizeof(*var)))) + return E_OUTOFMEMORY; + + var->name = code->main_code.vars[i].name; + V_VT(&var->v) = VT_EMPTY; + var->is_const = FALSE; + var->array = NULL; + + ctx->global_vars[ctx->global_vars_cnt + i] = var; + } + + ctx->global_vars_cnt += code->main_code.var_cnt; + + for (func_iter = code->funcs; func_iter; func_iter = func_iter->next) + { + for (i = 0; i < ctx->global_funcs_cnt; i++) + { + if (!wcsicmp(ctx->global_funcs[i]->name, func_iter->name)) + { + /* global function already exists, replace it */ + ctx->global_funcs[i] = func_iter; + break; + } + } + if (i == ctx->global_funcs_cnt) + ctx->global_funcs[ctx->global_funcs_cnt++] = func_iter; + } + + if (code->classes) + { + class_desc_t *class = code->classes; + + while (1) + { + class->ctx = ctx; + if (!class->next) + break; + class = class->next; + } + + class->next = ctx->classes; + ctx->classes = code->classes; + code->last_class = class; + } + code->pending_exec = FALSE; return exec_script(ctx, TRUE, &code->main_code, NULL, NULL, res); }
1
0
0
0
Gabriel Ivăncescu : vbscript: Store the compiled functions list head into vbscode_t.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 9933c776c7cc03bd8a99976b72fb8171588e577a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9933c776c7cc03bd8a99976b…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:23 2019 +0200 vbscript: Store the compiled functions list head into vbscode_t. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 12 +++++------- dlls/vbscript/vbscript.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 3eb383348a..50c9dfb873 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -61,7 +61,6 @@ typedef struct { const_decl_t *global_consts; function_t *func; - function_t *funcs; function_decl_t *func_decls; } compile_ctx_t; @@ -1517,7 +1516,7 @@ static BOOL lookup_funcs_name(compile_ctx_t *ctx, const WCHAR *name) { function_t *iter; - for(iter = ctx->funcs; iter; iter = iter->next) { + for(iter = ctx->code->funcs; iter; iter = iter->next) { if(!wcsicmp(iter->name, name)) return TRUE; } @@ -1884,7 +1883,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli if(!ctx.code) return compile_error(script, E_OUTOFMEMORY); - ctx.funcs = NULL; ctx.func_decls = NULL; ctx.labels = NULL; ctx.global_consts = NULL; @@ -1906,8 +1904,8 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli return compile_error(script, hres); } - new_func->next = ctx.funcs; - ctx.funcs = new_func; + new_func->next = ctx.code->funcs; + ctx.code->funcs = new_func; } for(class_decl = ctx.parser.class_decls; class_decl; class_decl = class_decl->next) { @@ -1938,7 +1936,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli } cnt = script->global_funcs_cnt; - for(func_iter = ctx.funcs; func_iter; func_iter = func_iter->next) + for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) cnt++; if(cnt > script->global_funcs_size) { function_t **new_funcs; @@ -1969,7 +1967,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli script->global_vars_cnt += ctx.code->main_code.var_cnt; - for(func_iter = ctx.funcs; func_iter; func_iter = func_iter->next) { + for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) { unsigned i; for(i = 0; i < script->global_funcs_cnt; i++) { if(!wcsicmp(script->global_funcs[i]->name, func_iter->name)) { diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 29d790be6c..a59f341b10 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -350,6 +350,7 @@ struct _vbscode_t { unsigned bstr_cnt; heap_pool_t heap; + function_t *funcs; class_desc_t *classes; class_desc_t *last_class;
1
0
0
0
Gabriel Ivăncescu : vbscript: Store the compiled classes list head into vbscode_t.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 8b30b86765bcfaffd151d52d4ef1bc09a3022057 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b30b86765bcfaffd151d52d…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:22 2019 +0200 vbscript: Store the compiled classes list head into vbscode_t. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 17 +++++++---------- dlls/vbscript/vbscript.h | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index de45961ad6..3eb383348a 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -63,8 +63,6 @@ typedef struct { function_t *func; function_t *funcs; function_decl_t *func_decls; - - class_desc_t *classes; } compile_ctx_t; static HRESULT compile_expression(compile_ctx_t*,expression_t*); @@ -1586,7 +1584,7 @@ static BOOL lookup_class_name(compile_ctx_t *ctx, const WCHAR *name) { class_desc_t *iter; - for(iter = ctx->classes; iter; iter = iter->next) { + for(iter = ctx->code->classes; iter; iter = iter->next) { if(!wcsicmp(iter->name, name)) return TRUE; } @@ -1754,8 +1752,8 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) } } - class_desc->next = ctx->classes; - ctx->classes = class_desc; + class_desc->next = ctx->code->classes; + ctx->code->classes = class_desc; return S_OK; } @@ -1795,7 +1793,7 @@ static HRESULT check_script_collisions(compile_ctx_t *ctx, script_ctx_t *script) } } - for(class = ctx->classes; class; class = class->next) { + for(class = ctx->code->classes; class; class = class->next) { if(lookup_script_identifier(script, class->name)) { FIXME("%s: redefined\n", debugstr_w(class->name)); return E_FAIL; @@ -1888,7 +1886,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli ctx.funcs = NULL; ctx.func_decls = NULL; - ctx.classes = NULL; ctx.labels = NULL; ctx.global_consts = NULL; ctx.stat_ctx = NULL; @@ -1985,8 +1982,8 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli script->global_funcs[script->global_funcs_cnt++] = func_iter; } - if(ctx.classes) { - class_desc_t *class = ctx.classes; + if(ctx.code->classes) { + class_desc_t *class = ctx.code->classes; while(1) { class->ctx = script; @@ -1996,7 +1993,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli } class->next = script->classes; - script->classes = ctx.classes; + script->classes = ctx.code->classes; code->last_class = class; } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index ef5cee23bf..29d790be6c 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -350,6 +350,7 @@ struct _vbscode_t { unsigned bstr_cnt; heap_pool_t heap; + class_desc_t *classes; class_desc_t *last_class; struct list entry;
1
0
0
0
Alexandre Julliard : kernel32: Move exec process functionality to ntdll.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 83e520f5567feda2024abf9cb007c0cd89189c01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=83e520f5567feda2024abf9c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 11 21:04:27 2019 +0100 kernel32: Move exec process functionality to ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 248 +----------------------------------------------- dlls/ntdll/loader.c | 39 ++++++-- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 179 ++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+), 257 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=83e520f5567feda2024a…
1
0
0
0
Alexandre Julliard : server: Get rid of the unused file parameter in exec_process.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 8c4a1cc7920c00940b459eab535f2f22ed1374fd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c4a1cc7920c00940b459eab…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 11 20:02:36 2019 +0100 server: Get rid of the unused file parameter in exec_process. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 10 ++++------ include/wine/server_protocol.h | 4 ++-- server/protocol.def | 1 - server/request.h | 3 +-- server/trace.c | 1 - 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index b539737ead..76a33f7161 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -1430,8 +1430,7 @@ static NTSTATUS alloc_object_attributes( const SECURITY_ATTRIBUTES *attr, struct * * Replace the existing process by exec'ing a new one. */ -static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *params, - const pe_image_info_t *pe_info ) +static BOOL replace_process( const RTL_USER_PROCESS_PARAMETERS *params, const pe_image_info_t *pe_info ) { NTSTATUS status; int socketfd[2]; @@ -1454,7 +1453,6 @@ static BOOL replace_process( HANDLE handle, const RTL_USER_PROCESS_PARAMETERS *p SERVER_START_REQ( exec_process ) { req->socket_fd = socketfd[1]; - req->exe_file = wine_server_obj_handle( handle ); req->cpu = pe_info->cpu; status = wine_server_call( req ); } @@ -2124,11 +2122,11 @@ static void exec_process( LPCWSTR name ) debugstr_w(name), is_64bit_arch(pe_info.cpu) ? 64 : 32, wine_dbgstr_longlong(pe_info.base), wine_dbgstr_longlong(pe_info.base + pe_info.map_size), cpu_names[pe_info.cpu] ); - replace_process( hFile, params, &pe_info ); + replace_process( params, &pe_info ); break; case BINARY_UNIX_LIB: TRACE( "%s is a Unix library, starting as Winelib app\n", debugstr_w(name) ); - replace_process( hFile, params, &pe_info ); + replace_process( params, &pe_info ); break; case BINARY_UNKNOWN: /* check for .com or .pif extension */ @@ -2138,7 +2136,7 @@ static void exec_process( LPCWSTR name ) case BINARY_WIN16: TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(name) ); if (!(new_params = get_vdm_params( params, &pe_info ))) break; - replace_process( 0, new_params, &pe_info ); + replace_process( new_params, &pe_info ); RtlDestroyProcessParameters( new_params ); break; default: diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 83ce56ca25..d8f9816422 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -795,8 +795,8 @@ struct exec_process_request { struct request_header __header; int socket_fd; - obj_handle_t exe_file; client_cpu_t cpu; + char __pad_20[4]; }; struct exec_process_reply { @@ -6691,6 +6691,6 @@ union generic_reply struct resume_process_reply resume_process_reply; }; -#define SERVER_PROTOCOL_VERSION 588 +#define SERVER_PROTOCOL_VERSION 589 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 984f2a10fd..3a0df20bdb 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -803,7 +803,6 @@ struct rawinput_device /* Execute a process, replacing the current one */ @REQ(exec_process) int socket_fd; /* file descriptor for process socket */ - obj_handle_t exe_file; /* file handle for main exe */ client_cpu_t cpu; /* CPU that the new process will use */ @END diff --git a/server/request.h b/server/request.h index be65a237dd..1303b35ef7 100644 --- a/server/request.h +++ b/server/request.h @@ -757,8 +757,7 @@ C_ASSERT( FIELD_OFFSET(struct new_process_reply, pid) == 12 ); C_ASSERT( FIELD_OFFSET(struct new_process_reply, handle) == 16 ); C_ASSERT( sizeof(struct new_process_reply) == 24 ); C_ASSERT( FIELD_OFFSET(struct exec_process_request, socket_fd) == 12 ); -C_ASSERT( FIELD_OFFSET(struct exec_process_request, exe_file) == 16 ); -C_ASSERT( FIELD_OFFSET(struct exec_process_request, cpu) == 20 ); +C_ASSERT( FIELD_OFFSET(struct exec_process_request, cpu) == 16 ); C_ASSERT( sizeof(struct exec_process_request) == 24 ); C_ASSERT( FIELD_OFFSET(struct get_new_process_info_request, info) == 12 ); C_ASSERT( sizeof(struct get_new_process_info_request) == 16 ); diff --git a/server/trace.c b/server/trace.c index 0acfc92b27..55d5e68962 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1265,7 +1265,6 @@ static void dump_new_process_reply( const struct new_process_reply *req ) static void dump_exec_process_request( const struct exec_process_request *req ) { fprintf( stderr, " socket_fd=%d", req->socket_fd ); - fprintf( stderr, ", exe_file=%04x", req->exe_file ); dump_client_cpu( ", cpu=", &req->cpu ); }
1
0
0
0
Sven Baars : wintrust/tests: Initialize cbStruct in the ObjectTrust tests.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 55a5818106e312b5e421ed6c2a20fa726cbb238d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=55a5818106e312b5e421ed6c…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Sun Nov 10 15:03:09 2019 +0100 wintrust/tests: Initialize cbStruct in the ObjectTrust tests. Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wintrust/tests/softpub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c index 2a4f4f4b25..5a150e684d 100644 --- a/dlls/wintrust/tests/softpub.c +++ b/dlls/wintrust/tests/softpub.c @@ -317,6 +317,8 @@ static void testObjTrust(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) /* Crashes ret = funcs->pfnObjectTrust(NULL); */ + + data.cbStruct = sizeof(data); data.pSigState = &sig_state; data.pWintrustData = &wintrust_data; data.padwTrustStepErrors =
1
0
0
0
Andrew Sheldon : wined3d: Add Navi 10 PCI id and device description.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: da5a80879f165e773f0c9f3d87929c9d9c6f01d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da5a80879f165e773f0c9f3d…
Author: Andrew Sheldon <asheldon55(a)gmail.com> Date: Mon Nov 11 18:07:12 2019 +1100 wined3d: Add Navi 10 PCI id and device description. Signed-off-by: Andrew Sheldon <asheldon55(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_gl.c | 2 ++ dlls/wined3d/directx.c | 1 + dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 4 insertions(+) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 52f0fd7ae1..7018c6da1d 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1686,6 +1686,8 @@ cards_intel[] = * drivers: R700, RV790, R680, RV535, RV516, R410, RS485, RV360, RV351. */ cards_amd_mesa[] = { + /* Navi 10 */ + {"NAVI10", CARD_AMD_RADEON_RX_NAVI_10}, /* Polaris 10/11 */ {"POLARIS10", CARD_AMD_RADEON_RX_480}, {"POLARIS11", CARD_AMD_RADEON_RX_460}, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 0688e49c8c..902cc444ce 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -482,6 +482,7 @@ static const struct wined3d_gpu_description gpu_description_table[] = {HW_VENDOR_AMD, CARD_AMD_RADEON_RX_VEGA_10, "Radeon RX Vega", DRIVER_AMD_RX, 8192}, {HW_VENDOR_AMD, CARD_AMD_RADEON_RX_VEGA_12, "Radeon Pro Vega 20", DRIVER_AMD_RX, 4096}, {HW_VENDOR_AMD, CARD_AMD_RADEON_RX_VEGA_20, "Radeon RX Vega 20", DRIVER_AMD_RX, 4096}, + {HW_VENDOR_AMD, CARD_AMD_RADEON_RX_NAVI_10, "Radeon RX 5700 / 5700 XT", DRIVER_AMD_RX, 8192}, /* Red Hat */ {HW_VENDOR_REDHAT, CARD_REDHAT_VIRGL, "Red Hat VirtIO GPU", DRIVER_REDHAT_VIRGL, 1024}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 61096a0345..f86853e9c9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2422,6 +2422,7 @@ enum wined3d_pci_device CARD_AMD_RADEON_RX_VEGA_10 = 0x687f, CARD_AMD_RADEON_RX_VEGA_12 = 0x69af, CARD_AMD_RADEON_RX_VEGA_20 = 0x66af, + CARD_AMD_RADEON_RX_NAVI_10 = 0x731f, CARD_NVIDIA_RIVA_128 = 0x0018, CARD_NVIDIA_RIVA_TNT = 0x0020,
1
0
0
0
Zhiyi Zhang : d3d8: Fix incorrect types.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: fca49ddcc94b69993a2bfc0a7a20de24a3b6c422 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fca49ddcc94b69993a2bfc0a…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Nov 11 16:20:50 2019 +0800 d3d8: Fix incorrect types. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/directx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index c5239844c3..742117bd71 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -101,15 +101,15 @@ static HRESULT WINAPI d3d8_RegisterSoftwareDevice(IDirect3D8 *iface, void *init_ static UINT WINAPI d3d8_GetAdapterCount(IDirect3D8 *iface) { struct d3d8 *d3d8 = impl_from_IDirect3D8(iface); - HRESULT hr; + UINT count; TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - hr = wined3d_get_adapter_count(d3d8->wined3d); + count = wined3d_get_adapter_count(d3d8->wined3d); wined3d_mutex_unlock(); - return hr; + return count; } static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter, @@ -146,16 +146,16 @@ static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter, static UINT WINAPI d3d8_GetAdapterModeCount(IDirect3D8 *iface, UINT adapter) { struct d3d8 *d3d8 = impl_from_IDirect3D8(iface); - HRESULT hr; + UINT count; TRACE("iface %p, adapter %u.\n", iface, adapter); wined3d_mutex_lock(); - hr = wined3d_get_adapter_mode_count(d3d8->wined3d, adapter, + count = wined3d_get_adapter_mode_count(d3d8->wined3d, adapter, WINED3DFMT_UNKNOWN, WINED3D_SCANLINE_ORDERING_UNKNOWN); wined3d_mutex_unlock(); - return hr; + return count; } static HRESULT WINAPI d3d8_EnumAdapterModes(IDirect3D8 *iface, UINT adapter, UINT mode_idx, D3DDISPLAYMODE *mode)
1
0
0
0
Paul Gofman : wined3d: Use software decompression for converting from compressed format.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: a73a892f46c027e1fedab513795eac3b12ba568a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a73a892f46c027e1fedab513…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Nov 8 14:57:23 2019 +0300 wined3d: Use software decompression for converting from compressed format. The motivation under this is not just supporting conversion between compressed formats. Currently fallback CPU blitter cannot convert from DXTn formats at all, this patch allows for that if software decompression function is available. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw7.c | 2 +- dlls/wined3d/surface.c | 3 ++- dlls/wined3d/texture.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 13ddf623ee..1592d2e081 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -16626,7 +16626,7 @@ static void test_surface_format_conversion_alpha(void) {FMT_RGBX, rgbx_data, FMT_DXT2, dxt2_data, TRUE}, {FMT_RGBA, rgba_data, FMT_DXT3, dxt2_data}, {FMT_RGBX, rgbx_data, FMT_DXT3, dxt2_data, TRUE}, - {FMT_DXT1, dxt1_data, FMT_DXT2, dxt2_data, TRUE}, + {FMT_DXT1, dxt1_data, FMT_DXT2, dxt2_data}, {FMT_DXT1, dxt1_data, FMT_RGBA, rgba_data}, {FMT_DXT1, dxt1_data, FMT_RGBX, rgba_data}, {FMT_DXT3, dxt2_data, FMT_RGBA, rgba_data}, diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 5064fb917f..47f2e5e5f0 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -610,7 +610,8 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr if (!(conv = find_converter(src_format->id, dst_format->id)) && (!device->d3d_initialized || !is_identity_fixup(src_format->color_fixup) || src_format->conv_byte_count || !is_identity_fixup(dst_format->color_fixup) || dst_format->conv_byte_count - || (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED))) + || ((src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED) + && !src_format->decompress))) { FIXME("Cannot find a conversion function from format %s to %s.\n", debug_d3dformat(src_format->id), debug_d3dformat(dst_format->id)); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 17b71c5738..8d3c25cf15 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2043,7 +2043,9 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, bo.addr += src_box->left * src_format->byte_count; } - decompress = dst_texture->resource.format_flags & WINED3DFMT_FLAG_DECOMPRESS; + decompress = (dst_texture->resource.format_flags & WINED3DFMT_FLAG_DECOMPRESS) + || (src_format->decompress && src_format->id != dst_texture->resource.format->id); + if (src_format->upload || decompress) { const struct wined3d_format *compressed_format = src_format;
1
0
0
0
Paul Gofman : wined3d: Check if destination texture has GPU access in glsl_blitter_supported().
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 3c9b843175b34b737f74e2fd347ce1ae66c24d30 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c9b843175b34b737f74e2fd…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Nov 8 14:57:22 2019 +0300 wined3d: Check if destination texture has GPU access in glsl_blitter_supported(). Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b1930d9a88..f05631ec59 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12937,14 +12937,20 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi return FALSE; } + if (!(dst_resource->access & WINED3D_RESOURCE_ACCESS_GPU)) + { + TRACE("Destination resource does not have GPU access.\n"); + return FALSE; + } + /* We don't necessarily want to blit from resources without * WINED3D_RESOURCE_ACCESS_GPU, but that may be the only way to decompress * compressed textures. */ decompress = (src_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED) && !(dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED); - if (!decompress && !(src_resource->access & dst_resource->access & WINED3D_RESOURCE_ACCESS_GPU)) + if (!decompress && !(src_resource->access & WINED3D_RESOURCE_ACCESS_GPU)) { - TRACE("Source or destination resource does not have GPU access.\n"); + TRACE("Source resource does not have GPU access.\n"); return FALSE; }
1
0
0
0
Zebediah Figura : d3d8: Handle stateblocks in d3d8_device_SetIndices().
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 8d54ca4f4e7002de7e6f77f863ebe7d8295eaa11 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d54ca4f4e7002de7e6f77f8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Nov 7 18:28:56 2019 -0600 d3d8: Handle stateblocks in d3d8_device_SetIndices(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 8cd85776f1..5f2235fb72 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -3063,10 +3063,14 @@ static HRESULT WINAPI d3d8_device_SetIndices(IDirect3DDevice8 *iface, * problem) */ wined3d_mutex_lock(); - wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_idx); - wined3d_device_set_index_buffer(device->wined3d_device, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN, 0); + wined3d_stateblock_set_base_vertex_index(device->update_state, base_vertex_idx); + wined3d_stateblock_set_index_buffer(device->update_state, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN); if (!device->recording) + { + wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_idx); + wined3d_device_set_index_buffer(device->wined3d_device, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN, 0); device->sysmem_ib = ib && ib->draw_buffer; + } wined3d_mutex_unlock(); return D3D_OK;
1
0
0
0
Zebediah Figura : wined3d: Introduce wined3d_stateblock_set_base_vertex_index().
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 056a2440b5892d1f492c31a49bbf83adc3978b18 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=056a2440b5892d1f492c31a4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Nov 7 18:28:55 2019 -0600 wined3d: Introduce wined3d_stateblock_set_base_vertex_index(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/stateblock.c | 7 +++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 3 files changed, 9 insertions(+) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 7d2dcffba5..f8724da967 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1577,6 +1577,13 @@ void CDECL wined3d_stateblock_set_index_buffer(struct wined3d_stateblock *stateb stateblock->changed.indices = TRUE; } +void CDECL wined3d_stateblock_set_base_vertex_index(struct wined3d_stateblock *stateblock, INT base_index) +{ + TRACE("stateblock %p, base_index %d.\n", stateblock, base_index); + + stateblock->stateblock_state.base_vertex_index = base_index; +} + static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info) { union diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 614886cc4a..8a9c9858e9 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -263,6 +263,7 @@ @ cdecl wined3d_stateblock_decref(ptr) @ cdecl wined3d_stateblock_incref(ptr) @ cdecl wined3d_stateblock_reset(ptr) +@ cdecl wined3d_stateblock_set_base_vertex_index(ptr long) @ cdecl wined3d_stateblock_set_blend_factor(ptr ptr) @ cdecl wined3d_stateblock_set_clip_plane(ptr long ptr) @ cdecl wined3d_stateblock_set_index_buffer(ptr ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 7c6b2ef107..10e2ae70eb 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2668,6 +2668,7 @@ HRESULT __cdecl wined3d_stateblock_create(struct wined3d_device *device, ULONG __cdecl wined3d_stateblock_decref(struct wined3d_stateblock *stateblock); ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock); void __cdecl wined3d_stateblock_reset(struct wined3d_stateblock *stateblock); +void __cdecl wined3d_stateblock_set_base_vertex_index(struct wined3d_stateblock *stateblock, INT base_index); void __cdecl wined3d_stateblock_set_blend_factor(struct wined3d_stateblock *stateblock, const struct wined3d_color *blend_factor); HRESULT __cdecl wined3d_stateblock_set_clip_plane(struct wined3d_stateblock *stateblock,
1
0
0
0
Zebediah Figura : d3d9: Handle stateblocks in d3d9_device_SetIndices().
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: c3565a4b2cc067e47622946cc6eff54a992d41d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c3565a4b2cc067e47622946c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Nov 7 18:28:54 2019 -0600 d3d9: Handle stateblocks in d3d9_device_SetIndices(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index d83c24a640..52a62edecb 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3721,9 +3721,12 @@ static HRESULT WINAPI d3d9_device_SetIndices(IDirect3DDevice9Ex *iface, IDirect3 wined3d_buffer = ib->wined3d_buffer; wined3d_mutex_lock(); - wined3d_device_set_index_buffer(device->wined3d_device, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN, 0); + wined3d_stateblock_set_index_buffer(device->update_state, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN); if (!device->recording) + { + wined3d_device_set_index_buffer(device->wined3d_device, wined3d_buffer, ib ? ib->format : WINED3DFMT_UNKNOWN, 0); device->sysmem_ib = ib && ib->draw_buffer; + } wined3d_mutex_unlock(); return D3D_OK;
1
0
0
0
Zebediah Figura : wined3d: Introduce wined3d_stateblock_set_index_buffer().
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: bfe4e29da100b055c3cb75ffbbcce242edc9b7b0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfe4e29da100b055c3cb75ff…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Nov 7 18:28:53 2019 -0600 wined3d: Introduce wined3d_stateblock_set_index_buffer(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/stateblock.c | 14 ++++++++++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 17 insertions(+) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index df0bca33b0..7d2dcffba5 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1563,6 +1563,20 @@ void CDECL wined3d_stateblock_set_scissor_rect(struct wined3d_stateblock *stateb stateblock->changed.scissorRect = TRUE; } +void CDECL wined3d_stateblock_set_index_buffer(struct wined3d_stateblock *stateblock, + struct wined3d_buffer *buffer, enum wined3d_format_id format_id) +{ + TRACE("stateblock %p, buffer %p, format %s.\n", stateblock, buffer, debug_d3dformat(format_id)); + + if (buffer) + wined3d_buffer_incref(buffer); + if (stateblock->stateblock_state.index_buffer) + wined3d_buffer_decref(stateblock->stateblock_state.index_buffer); + stateblock->stateblock_state.index_buffer = buffer; + stateblock->stateblock_state.index_format = format_id; + stateblock->changed.indices = TRUE; +} + static void init_default_render_states(DWORD rs[WINEHIGHEST_RENDER_STATE + 1], const struct wined3d_d3d_info *d3d_info) { union diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 4041db56da..614886cc4a 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -265,6 +265,7 @@ @ cdecl wined3d_stateblock_reset(ptr) @ cdecl wined3d_stateblock_set_blend_factor(ptr ptr) @ cdecl wined3d_stateblock_set_clip_plane(ptr long ptr) +@ cdecl wined3d_stateblock_set_index_buffer(ptr ptr long) @ cdecl wined3d_stateblock_set_material(ptr ptr) @ cdecl wined3d_stateblock_set_pixel_shader(ptr ptr) @ cdecl wined3d_stateblock_set_ps_consts_b(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e723678601..7c6b2ef107 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2672,6 +2672,8 @@ void __cdecl wined3d_stateblock_set_blend_factor(struct wined3d_stateblock *stat const struct wined3d_color *blend_factor); HRESULT __cdecl wined3d_stateblock_set_clip_plane(struct wined3d_stateblock *stateblock, UINT plane_idx, const struct wined3d_vec4 *plane); +void __cdecl wined3d_stateblock_set_index_buffer(struct wined3d_stateblock *stateblock, + struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id); void __cdecl wined3d_stateblock_set_material(struct wined3d_stateblock *stateblock, const struct wined3d_material *material); void __cdecl wined3d_stateblock_set_pixel_shader(struct wined3d_stateblock *stateblock, struct wined3d_shader *shader); HRESULT __cdecl wined3d_stateblock_set_ps_consts_b(struct wined3d_stateblock *stateblock,
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
17
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200