winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2024
----- 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
590 discussions
Start a n
N
ew thread
Giovanni Mascellani : tests: Skip some tests that crash on llvmpipe.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: vkd3d Branch: master Commit: 7cfb02cfd365d59d7af3aa6c3113a04dc9e3cc91 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/7cfb02cfd365d59d7af3aa6c3113a…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Apr 5 23:08:35 2024 +0200 tests: Skip some tests that crash on llvmpipe. --- tests/d3d12.c | 18 +++++++++++++++++ tests/d3d12_crosstest.h | 52 +++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 1222ed05..0a55cddb 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -19588,6 +19588,15 @@ static void test_null_srv(void) queue = context.queue; device = context.device; + if (is_llvmpipe_device_gte(device, 23, 2, 1)) + { + /* llvmpipe crashes when mutable descriptors are used. I don't + * know yet whether this is a bug in vkd3d or Mesa. */ + skip("Test crashes on llvmpipe, skipping.\n"); + destroy_test_context(&context); + return; + } + context.root_signature = create_texture_root_signature(context.device, D3D12_SHADER_VISIBILITY_PIXEL, 4, 0); @@ -19803,6 +19812,15 @@ static void test_null_uav(void) command_list = context.list; queue = context.queue; + if (is_llvmpipe_device_gte(device, 23, 2, 1)) + { + /* llvmpipe crashes when mutable descriptors are used. I don't + * know yet whether this is a bug in vkd3d or Mesa. */ + skip("Test crashes on llvmpipe, skipping.\n"); + destroy_test_context(&context); + return; + } + descriptor_ranges[0].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV; descriptor_ranges[0].NumDescriptors = 1; descriptor_ranges[0].BaseShaderRegister = 1; diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index e2401645..a27b62e7 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -406,6 +406,12 @@ static inline bool is_llvmpipe_device(ID3D12Device *device) return false; } +static inline bool is_llvmpipe_device_gte(ID3D12Device *device, + uint32_t major, uint32_t minor, uint32_t patch) +{ + return false; +} + static inline bool is_nvidia_device(ID3D12Device *device) { return false; @@ -564,7 +570,8 @@ static ID3D12Device *create_device(void) return SUCCEEDED(hr) ? device : NULL; } -static bool get_driver_properties(ID3D12Device *device, VkPhysicalDeviceDriverPropertiesKHR *driver_properties) +static bool get_driver_properties(ID3D12Device *device, VkPhysicalDeviceProperties *device_properties, + VkPhysicalDeviceDriverPropertiesKHR *driver_properties) { PFN_vkGetPhysicalDeviceProperties2KHR pfn_vkGetPhysicalDeviceProperties2KHR; VkPhysicalDeviceProperties2 device_properties2; @@ -588,6 +595,8 @@ static bool get_driver_properties(ID3D12Device *device, VkPhysicalDeviceDriverPr device_properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; device_properties2.pNext = driver_properties; pfn_vkGetPhysicalDeviceProperties2KHR(vk_physical_device, &device_properties2); + if (device_properties) + *device_properties = device_properties2.properties; return true; } @@ -618,7 +627,7 @@ LOAD_VK_PFN(vkGetInstanceProcAddr) if (SUCCEEDED(hr = create_vkd3d_device(instance, D3D_FEATURE_LEVEL_11_0, &IID_ID3D12Device, (void **)&device))) { - if (get_driver_properties(device, &driver_properties)) + if (get_driver_properties(device, NULL, &driver_properties)) trace("Driver name: %s, driver info: %s.\n", driver_properties.driverName, driver_properties.driverInfo); ID3D12Device_Release(device); @@ -641,7 +650,7 @@ static inline bool is_mesa_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_MESA_RADV_KHR || properties.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR; } @@ -650,7 +659,7 @@ static inline bool is_mesa_intel_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR; } @@ -658,15 +667,42 @@ static inline bool is_llvmpipe_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_MESA_LLVMPIPE; } +static inline bool is_llvmpipe_device_gte(ID3D12Device *device, + uint32_t major, uint32_t minor, uint32_t patch) +{ + VkPhysicalDeviceDriverPropertiesKHR driver_properties; + VkPhysicalDeviceProperties device_properties; + + get_driver_properties(device, &device_properties, &driver_properties); + if (driver_properties.driverID != VK_DRIVER_ID_MESA_LLVMPIPE) + return false; + + if (device_properties.driverVersion == 1) + { + uint32_t driver_major, driver_minor, driver_patch; + + /* llvmpipe doesn't provide a valid driverVersion value, so we resort to parsing the + * driverInfo string. */ + if (sscanf(driver_properties.driverInfo, "Mesa %u.%u.%u", + &driver_major, &driver_minor, &driver_patch) == 3) + { + device_properties.driverVersion = VK_MAKE_API_VERSION(0, + driver_major, driver_minor, driver_patch); + } + } + + return device_properties.driverVersion >= VK_MAKE_API_VERSION(0, major, minor, patch); +} + static inline bool is_nvidia_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR; } @@ -674,7 +710,7 @@ static inline bool is_radv_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_MESA_RADV_KHR; } @@ -682,7 +718,7 @@ static inline bool is_mvk_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties; - get_driver_properties(device, &properties); + get_driver_properties(device, NULL, &properties); return properties.driverID == VK_DRIVER_ID_MOLTENVK; }
1
0
0
0
Giovanni Mascellani : tests: Mark some test failures as todo on llvmpipe.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: vkd3d Branch: master Commit: 0b2ce5c13a1d967bfaffe7db9407262af27a0623 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/0b2ce5c13a1d967bfaffe7db94072…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Tue Mar 12 11:37:00 2024 +0100 tests: Mark some test failures as todo on llvmpipe. --- tests/d3d12.c | 16 ++++++++++++++++ tests/d3d12_crosstest.h | 13 +++++++++++++ 2 files changed, 29 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index ccebf510..1222ed05 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -19214,8 +19214,16 @@ static void test_descriptors_visibility(void) root_signature_desc.NumStaticSamplers = 2; root_signature_desc.pStaticSamplers = sampler_desc; hr = create_root_signature(device, &root_signature_desc, &context.root_signature); + /* llvmpipe (from Mesa 24.0.4) has maxBoundDescriptorSet == 8, which is less than we need. */ + todo_if(is_llvmpipe_device(device)) ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr); + if (FAILED(hr)) + { + destroy_test_context(&context); + return; + } + context.pipeline_state = create_pipeline_state(device, context.root_signature, context.render_target_desc.Format, &vs, &ps, NULL); @@ -20858,8 +20866,16 @@ static void test_depth_stencil_sampling(void) root_signature_desc.NumStaticSamplers = 2; root_signature_desc.pStaticSamplers = sampler_desc; hr = create_root_signature(device, &root_signature_desc, &context.root_signature); + /* llvmpipe (from Mesa 24.0.4) has maxBoundDescriptorSet == 8, which is less than we need. */ + todo_if(is_llvmpipe_device(device)) ok(SUCCEEDED(hr), "Failed to create root signature, hr %#x.\n", hr); + if (FAILED(hr)) + { + destroy_test_context(&context); + return; + } + pso_compare = create_pipeline_state(device, context.root_signature, context.render_target_desc.Format, NULL, &ps_compare, NULL); pso_depth = create_pipeline_state(device, diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index 6c0a4ef1..e2401645 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -401,6 +401,11 @@ static inline bool is_mesa_intel_device(ID3D12Device *device) return false; } +static inline bool is_llvmpipe_device(ID3D12Device *device) +{ + return false; +} + static inline bool is_nvidia_device(ID3D12Device *device) { return false; @@ -649,6 +654,14 @@ static inline bool is_mesa_intel_device(ID3D12Device *device) return properties.driverID == VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR; } +static inline bool is_llvmpipe_device(ID3D12Device *device) +{ + VkPhysicalDeviceDriverPropertiesKHR properties; + + get_driver_properties(device, &properties); + return properties.driverID == VK_DRIVER_ID_MESA_LLVMPIPE; +} + static inline bool is_nvidia_device(ID3D12Device *device) { VkPhysicalDeviceDriverPropertiesKHR properties;
1
0
0
0
Giovanni Mascellani : vkd3d-shader/d3d-asm: Reset indent level on HS phases.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: vkd3d Branch: master Commit: a2bb4ef3014088cd5d5c285555640979cf431ee8 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/a2bb4ef3014088cd5d5c285555640…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Mon Apr 8 23:45:11 2024 +0200 vkd3d-shader/d3d-asm: Reset indent level on HS phases. --- libs/vkd3d-shader/d3d_asm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d-shader/d3d_asm.c index 2b5feb94..b65b2fe2 100644 --- a/libs/vkd3d-shader/d3d_asm.c +++ b/libs/vkd3d-shader/d3d_asm.c @@ -2354,6 +2354,10 @@ enum vkd3d_result d3d_asm_compile(const struct vsir_program *program, break; case VKD3DSIH_LABEL: + case VKD3DSIH_HS_DECLS: + case VKD3DSIH_HS_CONTROL_POINT_PHASE: + case VKD3DSIH_HS_FORK_PHASE: + case VKD3DSIH_HS_JOIN_PHASE: indent = 0; break;
1
0
0
0
Conor McCarthy : vkd3d-shader/dxil: Implement DX intrinsic CalculateLOD.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: vkd3d Branch: master Commit: cb5411408a1399e6bb27c6cf104edc5381ef6742 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/cb5411408a1399e6bb27c6cf104ed…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Jun 15 00:11:56 2023 +1000 vkd3d-shader/dxil: Implement DX intrinsic CalculateLOD. --- libs/vkd3d-shader/dxil.c | 36 ++++++++++++++++++++++++++++++++++++ tests/hlsl/calculate-lod.shader_test | 8 ++++---- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 03c5458b..da8ba662 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -404,6 +404,7 @@ enum dx_intrinsic_opcode DX_ATOMIC_BINOP = 78, DX_ATOMIC_CMP_XCHG = 79, DX_BARRIER = 80, + DX_CALCULATE_LOD = 81, DX_DISCARD = 82, DX_DERIV_COARSEX = 83, DX_DERIV_COARSEY = 84, @@ -4486,6 +4487,40 @@ static void sm6_parser_emit_dx_buffer_update_counter(struct sm6_parser *sm6, enu instruction_dst_param_init_ssa_scalar(ins, sm6); } +static void sm6_parser_emit_dx_calculate_lod(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, + const struct sm6_value **operands, struct function_emission_state *state) +{ + const struct sm6_value *resource, *sampler; + struct vkd3d_shader_src_param *src_params; + struct vkd3d_shader_instruction *ins; + struct vkd3d_shader_register coord; + unsigned int clamp; + + resource = operands[0]; + sampler = operands[1]; + if (!sm6_value_validate_is_texture_handle(resource, op, sm6) + || !sm6_value_validate_is_sampler_handle(sampler, op, sm6)) + { + return; + } + + if (!sm6_parser_emit_coordinate_construct(sm6, &operands[2], 3, NULL, state, &coord)) + return; + + clamp = sm6_value_get_constant_uint(operands[5]); + + ins = state->ins; + vsir_instruction_init(ins, &sm6->p.location, VKD3DSIH_LOD); + if (!(src_params = instruction_src_params_alloc(ins, 3, sm6))) + return; + src_param_init_vector_from_reg(&src_params[0], &coord); + src_params[1].reg = resource->u.handle.reg; + src_param_init_scalar(&src_params[1], !clamp); + src_param_init_vector_from_reg(&src_params[2], &sampler->u.handle.reg); + + instruction_dst_param_init_ssa_scalar(ins, sm6); +} + static void sm6_parser_emit_dx_cbuffer_load(struct sm6_parser *sm6, enum dx_intrinsic_opcode op, const struct sm6_value **operands, struct function_emission_state *state) { @@ -5514,6 +5549,7 @@ static const struct sm6_dx_opcode_info sm6_dx_op_table[] = [DX_BUFFER_LOAD ] = {"o", "Hii", sm6_parser_emit_dx_buffer_load}, [DX_BUFFER_STORE ] = {"v", "Hiiooooc", sm6_parser_emit_dx_buffer_store}, [DX_BUFFER_UPDATE_COUNTER ] = {"i", "H8", sm6_parser_emit_dx_buffer_update_counter}, + [DX_CALCULATE_LOD ] = {"f", "HHfffb", sm6_parser_emit_dx_calculate_lod}, [DX_CBUFFER_LOAD_LEGACY ] = {"o", "Hi", sm6_parser_emit_dx_cbuffer_load}, [DX_COS ] = {"g", "R", sm6_parser_emit_dx_sincos}, [DX_COUNT_BITS ] = {"i", "m", sm6_parser_emit_dx_unary}, diff --git a/tests/hlsl/calculate-lod.shader_test b/tests/hlsl/calculate-lod.shader_test index 807776ee..88325af6 100644 --- a/tests/hlsl/calculate-lod.shader_test +++ b/tests/hlsl/calculate-lod.shader_test @@ -29,7 +29,7 @@ float4 main(float4 pos : sv_position) : sv_target } [test] -todo draw quad +todo(sm<6 | glsl) draw quad probe all rgba (2.0, 1.0, 0.0, 14.0) @@ -46,7 +46,7 @@ float4 main(float4 pos : sv_position) : sv_target } [test] -todo draw quad +todo(sm<6 | glsl) draw quad probe all rgba (2.0, 2.0, 0.0, 0.0) @@ -63,7 +63,7 @@ float4 main(float4 pos : sv_position) : sv_target } [test] -todo draw quad +todo(sm<6 | glsl) draw quad probe all rgba (2.0, 1.0, 0.0, 14.0) @@ -80,5 +80,5 @@ float4 main(float4 pos : sv_position) : sv_target } [test] -todo draw quad +todo(sm<6 | glsl) draw quad probe all rgba (45.0, 50.0, -14.0, -47.0)
1
0
0
0
Conor McCarthy : tests/hlsl: Add tests for CalculateLevelOfDetail().
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: vkd3d Branch: master Commit: bdfa14d219c68aab54a3a8a5ddcb8a99698332e7 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/bdfa14d219c68aab54a3a8a5ddcb8…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Mar 21 11:21:12 2024 +1000 tests/hlsl: Add tests for CalculateLevelOfDetail(). Includes improvements made by Giovanni Mascellani. --- Makefile.am | 1 + tests/hlsl/calculate-lod.shader_test | 84 ++++++++++++++++++++++++++++++++++++ tests/shader_runner_d3d11.c | 2 +- tests/shader_runner_d3d12.c | 2 +- 4 files changed, 87 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index ead3c1f5..995f70b2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,6 +65,7 @@ vkd3d_shader_tests = \ tests/hlsl/bitwise.shader_test \ tests/hlsl/bool-cast.shader_test \ tests/hlsl/bool-semantics.shader_test \ + tests/hlsl/calculate-lod.shader_test \ tests/hlsl/cast-64-bit.shader_test \ tests/hlsl/cast-broadcast.shader_test \ tests/hlsl/cast-componentwise-compatible.shader_test \ diff --git a/tests/hlsl/calculate-lod.shader_test b/tests/hlsl/calculate-lod.shader_test new file mode 100644 index 00000000..807776ee --- /dev/null +++ b/tests/hlsl/calculate-lod.shader_test @@ -0,0 +1,84 @@ +[require] +shader model >= 4.1 + + +[sampler 0] +filter linear linear linear +address clamp clamp clamp + +[srv 0] +size (2d, 4, 4) +levels 3 + +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 +0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main(float4 pos : sv_position) : sv_target +{ + return float4(t.CalculateLevelOfDetail(s, pos.xy), + t.CalculateLevelOfDetail(s, float2(0.5 * pos.x, 0.5 * pos.y)), + t.CalculateLevelOfDetail(s, float2(0.25 * pos.x, 0.25 * pos.y)), + floor(10.0 * t.CalculateLevelOfDetail(s, float2(0.1 * pos.x, 0.7 * pos.y)))); +} + +[test] +todo draw quad +probe all rgba (2.0, 1.0, 0.0, 14.0) + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main(float4 pos : sv_position) : sv_target +{ + return float4(t.CalculateLevelOfDetail(s, float2(3.0 * pos.x, 5.0 * pos.y)), + t.CalculateLevelOfDetail(s, float2(10.0 * pos.x, 10.0 * pos.y)), + t.CalculateLevelOfDetail(s, float2(0.1 * pos.x, 0.02 * pos.y)), + t.CalculateLevelOfDetail(s, float2(0.01 * pos.x, 0.01 * pos.y))); +} + +[test] +todo draw quad +probe all rgba (2.0, 2.0, 0.0, 0.0) + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main(float4 pos : sv_position) : sv_target +{ + return float4(t.CalculateLevelOfDetailUnclamped(s, pos.xy), + t.CalculateLevelOfDetailUnclamped(s, float2(0.5 * pos.x, 0.5 * pos.y)), + t.CalculateLevelOfDetailUnclamped(s, float2(0.25 * pos.x, 0.25 * pos.y)), + floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.1 * pos.x, 0.7 * pos.y)))); +} + +[test] +todo draw quad +probe all rgba (2.0, 1.0, 0.0, 14.0) + + +[pixel shader todo] +sampler s; +Texture2D t; + +float4 main(float4 pos : sv_position) : sv_target +{ + return float4(floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(3.0 * pos.x, 6.0 * pos.y))), + floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(8.0 * pos.x, 8.0 * pos.y))), + floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.1 * pos.x, 0.02 * pos.y))), + floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.01 * pos.x, 0.01 * pos.y)))); +} + +[test] +todo draw quad +probe all rgba (45.0, 50.0, -14.0, -47.0) diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 1285ca41..b26d6a36 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -358,7 +358,7 @@ static ID3D11Buffer *create_buffer(ID3D11Device *device, unsigned int bind_flags static void init_resource_2d(struct d3d11_shader_runner *runner, struct d3d11_resource *resource, const struct resource_params *params) { - D3D11_SUBRESOURCE_DATA resource_data[2]; + D3D11_SUBRESOURCE_DATA resource_data[3]; ID3D11Device *device = runner->device; D3D11_TEXTURE2D_DESC desc = {0}; HRESULT hr; diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index 9bf7bb24..56844ae3 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -104,7 +104,7 @@ static struct resource *d3d12_runner_create_resource(struct shader_runner *r, co struct d3d12_shader_runner *runner = d3d12_shader_runner(r); struct test_context *test_context = &runner->test_context; ID3D12Device *device = test_context->device; - D3D12_SUBRESOURCE_DATA resource_data[2] = {0}; + D3D12_SUBRESOURCE_DATA resource_data[3] = {0}; struct d3d12_resource *resource; unsigned int buffer_offset = 0; D3D12_RESOURCE_STATES state;
1
0
0
0
Paul Gofman : mmdevapi: Implement SAC_IsAudioObjectFormatSupported().
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: wine Branch: master Commit: aaad795901d8fe59fd94f9ff2390f4a32d6a4ad7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/aaad795901d8fe59fd94f9ff2390f4…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Tue Apr 2 20:16:29 2024 -0600 mmdevapi: Implement SAC_IsAudioObjectFormatSupported(). --- dlls/mmdevapi/spatialaudio.c | 67 +++++++++++++++++++++++++------------- dlls/mmdevapi/tests/spatialaudio.c | 21 ++++++++++++ 2 files changed, 66 insertions(+), 22 deletions(-) diff --git a/dlls/mmdevapi/spatialaudio.c b/dlls/mmdevapi/spatialaudio.c index 23f3de31428..b721af6229b 100644 --- a/dlls/mmdevapi/spatialaudio.c +++ b/dlls/mmdevapi/spatialaudio.c @@ -49,6 +49,36 @@ static UINT32 AudioObjectType_to_index(AudioObjectType type) return o - 2; } +static const char *debugstr_fmtex(const WAVEFORMATEX *fmt) +{ + static char buf[2048]; + + if (!fmt) + { + strcpy(buf, "(null)"); + } + else if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE) + { + const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt; + snprintf(buf, sizeof(buf), "tag: 0x%x (%s), ch: %u (mask: 0x%lx), rate: %lu, depth: %u", + fmt->wFormatTag, debugstr_guid(&fmtex->SubFormat), + fmt->nChannels, fmtex->dwChannelMask, fmt->nSamplesPerSec, + fmt->wBitsPerSample); + } + else + { + snprintf(buf, sizeof(buf), "tag: 0x%x, ch: %u, rate: %lu, depth: %u", + fmt->wFormatTag, fmt->nChannels, fmt->nSamplesPerSec, + fmt->wBitsPerSample); + } + return buf; +} + +static BOOL formats_equal(const WAVEFORMATEX *fmt1, const WAVEFORMATEX *fmt2) +{ + return !memcmp(fmt1, fmt2, sizeof(*fmt1)) && !memcmp(fmt1 + 1, fmt2 + 1, fmt1->cbSize); +} + typedef struct SpatialAudioImpl SpatialAudioImpl; typedef struct SpatialAudioStreamImpl SpatialAudioStreamImpl; typedef struct SpatialAudioObjectImpl SpatialAudioObjectImpl; @@ -610,9 +640,20 @@ static HRESULT WINAPI SAC_GetMaxFrameCount(ISpatialAudioClient *iface, static HRESULT WINAPI SAC_IsAudioObjectFormatSupported(ISpatialAudioClient *iface, const WAVEFORMATEX *format) { - SpatialAudioImpl *This = impl_from_ISpatialAudioClient(iface); - FIXME("(%p)->(%p)\n", This, format); - return E_NOTIMPL; + SpatialAudioImpl *sac = impl_from_ISpatialAudioClient(iface); + + TRACE("sac %p, format %s.\n", sac, debugstr_fmtex(format)); + + if (!format) + return E_POINTER; + + if (!formats_equal(&sac->object_fmtex.Format, format)) + { + FIXME("Reporting format %s as unsupported.\n", debugstr_fmtex(format)); + return E_INVALIDARG; + } + + return S_OK; } static HRESULT WINAPI SAC_IsSpatialAudioStreamAvailable(ISpatialAudioClient *iface, @@ -630,23 +671,6 @@ static WAVEFORMATEX *clone_fmtex(const WAVEFORMATEX *src) return r; } -static const char *debugstr_fmtex(const WAVEFORMATEX *fmt) -{ - static char buf[2048]; - if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE){ - const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt; - snprintf(buf, sizeof(buf), "tag: 0x%x (%s), ch: %u (mask: 0x%lx), rate: %lu, depth: %u", - fmt->wFormatTag, debugstr_guid(&fmtex->SubFormat), - fmt->nChannels, fmtex->dwChannelMask, fmt->nSamplesPerSec, - fmt->wBitsPerSample); - }else{ - snprintf(buf, sizeof(buf), "tag: 0x%x, ch: %u, rate: %lu, depth: %u", - fmt->wFormatTag, fmt->nChannels, fmt->nSamplesPerSec, - fmt->wBitsPerSample); - } - return buf; -} - static void static_mask_to_channels(AudioObjectType static_mask, WORD *count, DWORD *mask, UINT32 *map) { UINT32 out_chan = 0, map_idx = 0; @@ -776,8 +800,7 @@ static HRESULT WINAPI SAC_ActivateSpatialAudioStream(ISpatialAudioClient *iface, return E_INVALIDARG; } - if(!params->ObjectFormat || - memcmp(params->ObjectFormat, &This->object_fmtex.Format, sizeof(*params->ObjectFormat) + params->ObjectFormat->cbSize)){ + if(!(params->ObjectFormat && formats_equal(params->ObjectFormat, &This->object_fmtex.Format))) { *stream = NULL; return AUDCLNT_E_UNSUPPORTED_FORMAT; } diff --git a/dlls/mmdevapi/tests/spatialaudio.c b/dlls/mmdevapi/tests/spatialaudio.c index a382b57e7a2..4d8073d49ce 100644 --- a/dlls/mmdevapi/tests/spatialaudio.c +++ b/dlls/mmdevapi/tests/spatialaudio.c @@ -64,6 +64,27 @@ static void test_formats(void) ok(fmt->nAvgBytesPerSec == 192000, "Wrong avg bytes per sec, expected 192000 got %lu\n", fmt->nAvgBytesPerSec); ok(fmt->cbSize == 0, "Wrong cbSize for simple format, expected 0, got %hu\n", fmt->cbSize); + hr = ISpatialAudioClient_IsAudioObjectFormatSupported(sac, NULL); + ok(hr == E_POINTER, "Got %#lx.\n", hr); + + memcpy(&format, fmt, sizeof(format)); + hr = ISpatialAudioClient_IsAudioObjectFormatSupported(sac, &format); + ok(hr == S_OK, "Got %#lx.\n", hr); + + format.nBlockAlign *= 2; + hr = ISpatialAudioClient_IsAudioObjectFormatSupported(sac, &format); + todo_wine ok(hr == S_OK, "Got %#lx.\n", hr); + + memcpy(&format, fmt, sizeof(format)); + format.wBitsPerSample *= 2; + hr = ISpatialAudioClient_IsAudioObjectFormatSupported(sac, &format); + ok(hr == E_INVALIDARG, "Got %#lx.\n", hr); + + memcpy(&format, fmt, sizeof(format)); + format.nChannels = 2; + hr = ISpatialAudioClient_IsAudioObjectFormatSupported(sac, &format); + ok(hr == E_INVALIDARG, "Got %#lx.\n", hr); + memcpy(&format, fmt, sizeof(format)); IAudioFormatEnumerator_Release(afe);
1
0
0
0
Jacek Caban : makedep: Use hybrid ARM64X images for ARM64EC.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: wine Branch: master Commit: ba50573f91912ba30651501c1f32dc466f0030cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/ba50573f91912ba30651501c1f32dc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 9 00:00:24 2024 +0200 makedep: Use hybrid ARM64X images for ARM64EC. --- tools/makedep.c | 107 +++++++++++++++++++++++++++++++++++++++++++++----------- tools/tools.h | 2 +- 2 files changed, 88 insertions(+), 21 deletions(-)
1
0
0
0
Eric Pouech : ucrtbase: Let stderr be always be unbuffered.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: wine Branch: master Commit: 8825f4dfa5e72834577aef58810b967c53965f93 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8825f4dfa5e72834577aef58810b96…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Wed Apr 3 17:26:55 2024 +0200 ucrtbase: Let stderr be always be unbuffered. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/msvcrt/file.c | 6 ++++++ dlls/ucrtbase/tests/file.c | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index a3a872d4be3..24cca6fb63e 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -830,9 +830,15 @@ int CDECL _isatty(int fd) /* INTERNAL: Allocate stdio file buffer */ static BOOL msvcrt_alloc_buffer(FILE* file) { +#if _MSVCR_VER >= 140 + if((file->_file==STDOUT_FILENO && _isatty(file->_file)) + || file->_file == STDERR_FILENO) + return FALSE; +#else if((file->_file==STDOUT_FILENO || file->_file==STDERR_FILENO) && _isatty(file->_file)) return FALSE; +#endif file->_base = calloc(1, MSVCRT_INTERNAL_BUFSIZ); if(file->_base) { diff --git a/dlls/ucrtbase/tests/file.c b/dlls/ucrtbase/tests/file.c index 4671e641dbe..76233be3fa7 100644 --- a/dlls/ucrtbase/tests/file.c +++ b/dlls/ucrtbase/tests/file.c @@ -55,7 +55,6 @@ static void test_std_stream_buffering(void) if (broken(!GetProcAddress(GetModuleHandleA("ucrtbase"), "__CxxFrameHandler4") && !pos)) trace("stderr is buffered\n"); else - todo_wine ok(pos == 4, "expected stderr to be unbuffered (%d)\n", pos); fflush(stderr);
1
0
0
0
Eric Pouech : ucrtbase/tests: Add tests for checking buffering state of standard streams.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: wine Branch: master Commit: d9b3ad05a7d2d0618bcfb37b0993242a3e399c84 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d9b3ad05a7d2d0618bcfb37b099324…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Thu Apr 4 14:02:30 2024 +0200 ucrtbase/tests: Add tests for checking buffering state of standard streams. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/ucrtbase/tests/Makefile.in | 1 + dlls/ucrtbase/tests/file.c | 88 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) diff --git a/dlls/ucrtbase/tests/Makefile.in b/dlls/ucrtbase/tests/Makefile.in index cd01a3aacb9..ea9e589113c 100644 --- a/dlls/ucrtbase/tests/Makefile.in +++ b/dlls/ucrtbase/tests/Makefile.in @@ -5,6 +5,7 @@ EXTRADEFS = -fno-builtin SOURCES = \ cpp.c \ environ.c \ + file.c \ misc.c \ printf.c \ scanf.c \ diff --git a/dlls/ucrtbase/tests/file.c b/dlls/ucrtbase/tests/file.c new file mode 100644 index 00000000000..4671e641dbe --- /dev/null +++ b/dlls/ucrtbase/tests/file.c @@ -0,0 +1,88 @@ +/* + * Unit test suite for file functions + * + * Copyright 2024 Eric Pouech for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/test.h" + +static void test_std_stream_buffering(void) +{ + int dup_fd, ret, pos; + FILE *file; + char ch; + + dup_fd = _dup(STDOUT_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "w", stdout); + ok(file != NULL, "freopen failed\n"); + + ret = fprintf(stdout, "test"); + pos = _telli64(STDOUT_FILENO); + + fflush(stdout); + _dup2(dup_fd, STDOUT_FILENO); + close(dup_fd); + setvbuf(stdout, NULL, _IONBF, 0); + + ok(ret == 4, "fprintf(stdout) returned %d\n", ret); + ok(!pos, "expected stdout to be buffered\n"); + + dup_fd = _dup(STDERR_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "w", stderr); + ok(file != NULL, "freopen failed\n"); + + ret = fprintf(stderr, "test"); + ok(ret == 4, "fprintf(stderr) returned %d\n", ret); + pos = _telli64(STDERR_FILENO); + if (broken(!GetProcAddress(GetModuleHandleA("ucrtbase"), "__CxxFrameHandler4") && !pos)) + trace("stderr is buffered\n"); + else + todo_wine + ok(pos == 4, "expected stderr to be unbuffered (%d)\n", pos); + + fflush(stderr); + _dup2(dup_fd, STDERR_FILENO); + close(dup_fd); + + dup_fd = _dup(STDIN_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "r", stdin); + ok(file != NULL, "freopen failed\n"); + + ch = 0; + ret = fscanf(stdin, "%c", &ch); + ok(ret == 1, "fscanf returned %d\n", ret); + ok(ch == 't', "ch = 0x%x\n", (unsigned char)ch); + pos = _telli64(STDIN_FILENO); + ok(pos == 4, "pos = %d\n", pos); + + fflush(stdin); + _dup2(dup_fd, STDIN_FILENO); + close(dup_fd); + + ok(DeleteFileA("std_stream_test.tmp"), "DeleteFile failed\n"); +} + +START_TEST(file) +{ + test_std_stream_buffering(); +}
1
0
0
0
Eric Pouech : msvcrt/tests: Add tests for check buffering state of standard streams.
by Alexandre Julliard
11 Apr '24
11 Apr '24
Module: wine Branch: master Commit: 417d25eb72bff16cfbe1867349aa572e83aff161 URL:
https://gitlab.winehq.org/wine/wine/-/commit/417d25eb72bff16cfbe1867349aa57…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Thu Apr 4 14:01:52 2024 +0200 msvcrt/tests: Add tests for check buffering state of standard streams. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/msvcrt/tests/file.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 1ac6cfe3182..9f85e2def69 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -3059,6 +3059,64 @@ static void test_ioinfo_flags(void) free(tempf); } +static void test_std_stream_buffering(void) +{ + int dup_fd, ret, pos; + FILE *file; + char ch; + + dup_fd = _dup(STDOUT_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "w", stdout); + ok(file != NULL, "freopen failed\n"); + + ret = fprintf(stdout, "test"); + pos = _telli64(STDOUT_FILENO); + + fflush(stdout); + _dup2(dup_fd, STDOUT_FILENO); + close(dup_fd); + setvbuf(stdout, NULL, _IONBF, 0); + + ok(ret == 4, "fprintf(stdout) returned %d\n", ret); + ok(!pos, "expected stdout to be buffered\n"); + + dup_fd = _dup(STDERR_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "w", stderr); + ok(file != NULL, "freopen failed\n"); + + ret = fprintf(stderr, "test"); + ok(ret == 4, "fprintf(stderr) returned %d\n", ret); + pos = _telli64(STDERR_FILENO); + ok(!pos, "expected stderr to be buffered\n"); + + fflush(stderr); + _dup2(dup_fd, STDERR_FILENO); + close(dup_fd); + + dup_fd = _dup(STDIN_FILENO); + ok(dup_fd != -1, "_dup failed\n"); + + file = freopen("std_stream_test.tmp", "r", stdin); + ok(file != NULL, "freopen failed\n"); + + ch = 0; + ret = fscanf(stdin, "%c", &ch); + ok(ret == 1, "fscanf returned %d\n", ret); + ok(ch == 't', "ch = 0x%x\n", (unsigned char)ch); + pos = _telli64(STDIN_FILENO); + ok(pos == 4, "pos = %d\n", pos); + + fflush(stdin); + _dup2(dup_fd, STDIN_FILENO); + close(dup_fd); + + ok(DeleteFileA("std_stream_test.tmp"), "DeleteFile failed\n"); +} + START_TEST(file) { int arg_c; @@ -3135,6 +3193,7 @@ START_TEST(file) test_fopen_hints(); test_open_hints(); test_ioinfo_flags(); + test_std_stream_buffering(); /* Wait for the (_P_NOWAIT) spawned processes to finish to make sure the report * file contains lines in the correct order
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200