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
September 2023
----- 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
920 discussions
Start a n
N
ew thread
Giovanni Mascellani : vkd3d: Set the image aspect when clearing UAVs.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: b9fa8cfaa6924025f22849e8491b96fefd9f7af0 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/b9fa8cfaa6924025f22849e8491b9…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Sep 21 12:26:14 2023 +0200 vkd3d: Set the image aspect when clearing UAVs. This fixes a number of tests on Mesa on Intel. --- libs/vkd3d/command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 42a98763..3be45120 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -5461,6 +5461,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID view_desc.miplevel_count = 1; view_desc.layer_idx = view->info.texture.layer_idx; view_desc.layer_count = view->info.texture.layer_count; + view_desc.vk_image_aspect = VK_IMAGE_ASPECT_COLOR_BIT; if (!vkd3d_create_texture_view(device, VKD3D_DESCRIPTOR_MAGIC_UAV, resource_impl->u.vk_image, &view_desc, &uint_view))
1
0
0
0
Giovanni Mascellani : tests: Do not crash if the render target doesn't support MSAA 8.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: d640b213b2aa6c63b427734eedb9b698206b621a URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d640b213b2aa6c63b427734eedb9b…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Mon Sep 18 11:57:22 2023 +0200 tests: Do not crash if the render target doesn't support MSAA 8. This currently happens on MoltenVK. --- tests/d3d12.c | 13 +++++++++++-- tests/d3d12_test_utils.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index b15d1120..e9dabf7f 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -32402,6 +32402,7 @@ static void test_shader_get_render_target_sample_count(void) struct test_context_desc desc; struct test_context context; ID3D12CommandQueue *queue; + struct vec4 sample_count; HRESULT hr; static const float black[4]; @@ -32422,20 +32423,28 @@ static void test_shader_get_render_target_sample_count(void) 0x0100003e, }; static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; - static const struct vec4 sample_count = {8.0f, 8.0f, 8.0f, 8.0f}; memset(&desc, 0, sizeof(desc)); desc.rt_format = DXGI_FORMAT_R32G32B32A32_FLOAT; desc.sample_desc.Count = 8; desc.no_pipeline = true; + desc.check_multisampling = true; if (!init_test_context(&context, &desc)) return; command_list = context.list; queue = context.queue; + bug_if(is_mvk_device(context.device)) + ok(context.render_target_desc.SampleDesc.Count == 8, "Failed to create render target with MSAA 8, got %u.\n", + context.render_target_desc.SampleDesc.Count); + + sample_count.x = context.render_target_desc.SampleDesc.Count; + sample_count.y = context.render_target_desc.SampleDesc.Count; + sample_count.z = context.render_target_desc.SampleDesc.Count; + sample_count.w = context.render_target_desc.SampleDesc.Count; init_pipeline_state_desc(&pso_desc, context.root_signature, context.render_target_desc.Format, NULL, &ps, NULL); - pso_desc.SampleDesc.Count = desc.sample_desc.Count; + pso_desc.SampleDesc.Count = context.render_target_desc.SampleDesc.Count; hr = ID3D12Device_CreateGraphicsPipelineState(context.device, &pso_desc, &IID_ID3D12PipelineState, (void **)&context.pipeline_state); ok(hr == S_OK, "Failed to create pipeline, hr %#x.\n", hr); diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h index 9df50c56..2c7b10f4 100644 --- a/tests/d3d12_test_utils.h +++ b/tests/d3d12_test_utils.h @@ -934,6 +934,7 @@ struct test_context_desc unsigned int rt_width, rt_height, rt_array_size; DXGI_FORMAT rt_format; DXGI_SAMPLE_DESC sample_desc; + bool check_multisampling; unsigned int rt_descriptor_count; unsigned int root_signature_flags; bool no_render_target; @@ -965,6 +966,24 @@ struct test_context RECT scissor_rect; }; +#define check_multisample_support(a, b, c) check_multisample_support_(__LINE__, a, b, c) +static unsigned int check_multisample_support_(unsigned int line, ID3D12Device *device, + DXGI_FORMAT format, unsigned int sample_count) +{ + D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS format_support = + { + .Format = format, + .SampleCount = sample_count, + }; + HRESULT hr; + + hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS, + &format_support, sizeof(format_support)); + ok_(line)(hr == S_OK, "Cannot check feature support, hr %#x.\n", hr); + + return format_support.NumQualityLevels; +} + #define create_render_target(context, a, b, c) create_render_target_(__LINE__, context, a, b, c) static void create_render_target_(unsigned int line, struct test_context *context, const struct test_context_desc *desc, ID3D12Resource **render_target, @@ -994,6 +1013,22 @@ static void create_render_target_(unsigned int line, struct test_context *contex clear_value.Color[1] = 1.0f; clear_value.Color[2] = 1.0f; clear_value.Color[3] = 1.0f; + + if (desc && desc->check_multisampling) + { + for (; resource_desc.SampleDesc.Count != 1; resource_desc.SampleDesc.Count /= 2) + { + unsigned int quality_level_count = check_multisample_support_(line, context->device, + resource_desc.Format, resource_desc.SampleDesc.Count); + + if (quality_level_count != 0) + { + resource_desc.SampleDesc.Quality = min(resource_desc.SampleDesc.Quality, quality_level_count - 1); + break; + } + } + } + hr = ID3D12Device_CreateCommittedResource(context->device, &heap_properties, D3D12_HEAP_FLAG_NONE, &resource_desc, D3D12_RESOURCE_STATE_RENDER_TARGET, &clear_value,
1
0
0
0
Giovanni Mascellani : tests: Do not crash if a pipeline statistics query heap cannot be created.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: 6dfdbb5c2674a2e363e06de36f03513d35af6577 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/6dfdbb5c2674a2e363e06de36f035…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Mon Sep 18 11:56:20 2023 +0200 tests: Do not crash if a pipeline statistics query heap cannot be created. This currently happens on MoltenVK. --- README | 2 +- configure.ac | 2 +- tests/d3d12.c | 11 ++++++++++- tests/d3d12_crosstest.h | 13 +++++++++++++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README b/README index 29f907de..cb9d6615 100644 --- a/README +++ b/README @@ -9,7 +9,7 @@ similar, but not identical, to Direct3D 12. Building vkd3d ============== -Vkd3d depends on SPIRV-Headers and Vulkan-Headers (>= 1.2.139). +Vkd3d depends on SPIRV-Headers and Vulkan-Headers (>= 1.2.148). Vkd3d generates some of its headers from IDL files. If you are using the release tarballs, then these headers are pre-generated and are included. If diff --git a/configure.ac b/configure.ac index 52d233a4..07eeabbf 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ AS_IF([test "x$ac_cv_header_spirv_unified1_GLSL_std_450_h" != "xyes" \ -a "x$ac_cv_header_vulkan_GLSL_std_450_h" != "xyes"], [AC_MSG_ERROR([GLSL.std.450.h not found.])]) -VKD3D_CHECK_VULKAN_HEADER_VERSION([139], [AC_MSG_ERROR([Vulkan headers are too old, 1.2.139 is required.])]) +VKD3D_CHECK_VULKAN_HEADER_VERSION([148], [AC_MSG_ERROR([Vulkan headers are too old, 1.2.148 is required.])]) AC_CHECK_DECL([SpvCapabilityDemoteToHelperInvocationEXT],, [AC_MSG_ERROR([SPIR-V headers are too old.])], [ #ifdef HAVE_SPIRV_UNIFIED1_SPIRV_H diff --git a/tests/d3d12.c b/tests/d3d12.c index ac0468b9..b15d1120 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -23740,9 +23740,11 @@ static void test_create_query_heap(void) heap_desc.NodeMask = 0; hr = ID3D12Device_CreateQueryHeap(device, &heap_desc, &IID_ID3D12QueryHeap, (void **)&query_heap); + bug_if(types[i] == D3D12_QUERY_HEAP_TYPE_PIPELINE_STATISTICS && is_mvk_device(device)) ok(hr == S_OK, "Failed to create query heap, type %u, hr %#x.\n", types[i], hr); - ID3D12QueryHeap_Release(query_heap); + if (hr == S_OK) + ID3D12QueryHeap_Release(query_heap); } heap_desc.Type = D3D12_QUERY_HEAP_TYPE_SO_STATISTICS; @@ -23881,7 +23883,14 @@ static void test_query_pipeline_statistics(void) heap_desc.Count = 2; heap_desc.NodeMask = 0; hr = ID3D12Device_CreateQueryHeap(device, &heap_desc, &IID_ID3D12QueryHeap, (void **)&query_heap); + bug_if(is_mvk_device(device)) ok(SUCCEEDED(hr), "Failed to create query heap, type %u, hr %#x.\n", heap_desc.Type, hr); + if (FAILED(hr)) + { + ID3D12PipelineState_Release(pso); + destroy_test_context(&context); + return; + } resource = create_readback_buffer(device, 2 * sizeof(struct D3D12_QUERY_DATA_PIPELINE_STATISTICS)); diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h index 973f980c..6c0a4ef1 100644 --- a/tests/d3d12_crosstest.h +++ b/tests/d3d12_crosstest.h @@ -411,6 +411,11 @@ static inline bool is_radv_device(ID3D12Device *device) return false; } +static inline bool is_mvk_device(ID3D12Device *device) +{ + return false; +} + static inline bool is_depth_clip_enable_supported(ID3D12Device *device) { return true; @@ -660,6 +665,14 @@ static inline bool is_radv_device(ID3D12Device *device) return properties.driverID == VK_DRIVER_ID_MESA_RADV_KHR; } +static inline bool is_mvk_device(ID3D12Device *device) +{ + VkPhysicalDeviceDriverPropertiesKHR properties; + + get_driver_properties(device, &properties); + return properties.driverID == VK_DRIVER_ID_MOLTENVK; +} + static inline bool is_depth_clip_enable_supported(ID3D12Device *device) { VkPhysicalDevice vk_physical_device = vkd3d_get_vk_physical_device(device);
1
0
0
0
Giovanni Mascellani : tests: Compile HLSL shaders at runtime in test_draw_depth_only().
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: d742770499c6d9eb20a01489969748edb8d0896c URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d742770499c6d9eb20a0148996974…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Sep 14 11:35:12 2023 +0200 tests: Compile HLSL shaders at runtime in test_draw_depth_only(). --- tests/d3d12.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 5f280664..ac0468b9 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -6702,27 +6702,18 @@ static void test_draw_depth_only(void) struct test_context_desc desc; struct test_context context; ID3D12CommandQueue *queue; + D3D12_SHADER_BYTECODE ps; + ID3D10Blob *ps_bytecode; unsigned int i, j; HRESULT hr; - static const DWORD ps_code[] = - { -#if 0 - float depth; - - float main() : SV_Depth - { - return depth; - } -#endif - 0x43425844, 0x91af6cd0, 0x7e884502, 0xcede4f54, 0x6f2c9326, 0x00000001, 0x000000b0, 0x00000003, - 0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f, - 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0xffffffff, - 0x00000e01, 0x445f5653, 0x68747065, 0xababab00, 0x52444853, 0x00000038, 0x00000040, 0x0000000e, - 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x02000065, 0x0000c001, 0x05000036, 0x0000c001, - 0x0020800a, 0x00000000, 0x00000000, 0x0100003e, - }; - static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; + static const char ps_code[] = + "float depth;\n" + "\n" + "float main() : SV_Depth\n" + "{\n" + " return depth;\n" + "}\n"; static const struct { float clear_depth; @@ -6742,10 +6733,16 @@ static void test_draw_depth_only(void) {1.0f, 0.5f, 0.5f}, }; + ps_bytecode = compile_shader(ps_code, sizeof(ps_code) - 1, "ps_4_0"); + ps = shader_bytecode_from_blob(ps_bytecode); + memset(&desc, 0, sizeof(desc)); desc.no_render_target = true; if (!init_test_context(&context, &desc)) + { + ID3D10Blob_Release(ps_bytecode); return; + } command_list = context.list; queue = context.queue; @@ -6833,6 +6830,8 @@ static void test_draw_depth_only(void) destroy_depth_stencil(&ds); destroy_test_context(&context); + + ID3D10Blob_Release(ps_bytecode); } static void test_draw_uav_only(void)
1
0
0
0
Giovanni Mascellani : tests: Compile HLSL shaders at runtime in test_draw_depth_no_ps().
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: 4557ad36b00a3e3e1fe5ff45427d6416f3836255 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/4557ad36b00a3e3e1fe5ff45427d6…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Sep 14 11:31:39 2023 +0200 tests: Compile HLSL shaders at runtime in test_draw_depth_no_ps(). --- tests/d3d12.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 6fbd6e97..5f280664 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -6606,6 +6606,8 @@ static void test_draw_depth_no_ps(void) D3D12_VERTEX_BUFFER_VIEW vbv; struct test_context context; ID3D12CommandQueue *queue; + D3D12_SHADER_BYTECODE vs; + ID3D10Blob *vs_bytecode; ID3D12Resource *vb; HRESULT hr; @@ -6624,28 +6626,22 @@ static void test_draw_depth_no_ps(void) {{ 1.0f, -1.0f, 0.5f, 1.0f}}, {{ 1.0f, 1.0f, 0.5f, 1.0f}}, }; - static const DWORD vs_code[] = - { -#if 0 - void main(float4 in_position : POSITION, out float4 out_position : SV_POSITION) - { - out_position = in_position; - } -#endif - 0x43425844, 0xa7a2f22d, 0x83ff2560, 0xe61638bd, 0x87e3ce90, 0x00000001, 0x000000d8, 0x00000003, - 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x49534f50, 0x4e4f4954, 0xababab00, - 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, 0x52444853, 0x0000003c, 0x00010040, - 0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001, - 0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e, - }; - static const D3D12_SHADER_BYTECODE vs = {vs_code, sizeof(vs_code)}; + static const char vs_code[] = + "void main(float4 in_position : POSITION, out float4 out_position : SV_POSITION)\n" + "{\n" + " out_position = in_position;\n" + "}\n"; + + vs_bytecode = compile_shader(vs_code, sizeof(vs_code) - 1, "vs_4_0"); + vs = shader_bytecode_from_blob(vs_bytecode); memset(&desc, 0, sizeof(desc)); desc.no_render_target = true; if (!init_test_context(&context, &desc)) + { + ID3D10Blob_Release(vs_bytecode); return; + } command_list = context.list; queue = context.queue; @@ -6693,6 +6689,8 @@ static void test_draw_depth_no_ps(void) destroy_depth_stencil(&ds); ID3D12Resource_Release(vb); destroy_test_context(&context); + + ID3D10Blob_Release(vs_bytecode); } static void test_draw_depth_only(void)
1
0
0
0
Giovanni Mascellani : tests: Compile HLSL shaders at runtime in test_scissor().
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: b7c951ba78eb7a6b20b34fbff09368e11e531f58 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/b7c951ba78eb7a6b20b34fbff0936…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Sep 14 11:26:49 2023 +0200 tests: Compile HLSL shaders at runtime in test_scissor(). --- tests/d3d12.c | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 2ccf0ac7..6fbd6e97 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -6536,34 +6536,30 @@ static void test_scissor(void) struct test_context_desc desc; struct test_context context; ID3D12CommandQueue *queue; + D3D12_SHADER_BYTECODE ps; + ID3D10Blob *ps_bytecode; unsigned int color; RECT scissor_rect; - static const DWORD ps_code[] = - { -#if 0 - float4 main(float4 position : SV_POSITION) : SV_Target - { - return float4(0.0, 1.0, 0.0, 1.0); - } -#endif - 0x43425844, 0x30240e72, 0x012f250c, 0x8673c6ea, 0x392e4cec, 0x00000001, 0x000000d4, 0x00000003, - 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, - 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, - 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000038, 0x00000040, - 0x0000000e, 0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, - 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x0100003e, - }; - static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; + static const char ps_code[] = + "float4 main(float4 position : SV_POSITION) : SV_Target\n" + "{\n" + " return float4(0.0, 1.0, 0.0, 1.0);\n" + "}\n"; static const float red[] = {1.0f, 0.0f, 0.0f, 1.0f}; + ps_bytecode = compile_shader(ps_code, sizeof(ps_code) - 1, "ps_4_0"); + ps = shader_bytecode_from_blob(ps_bytecode); + memset(&desc, 0, sizeof(desc)); desc.rt_width = 640; desc.rt_height = 480; desc.ps = &ps; if (!init_test_context(&context, &desc)) + { + ID3D10Blob_Release(ps_bytecode); return; + } command_list = context.list; queue = context.queue; @@ -6596,6 +6592,8 @@ static void test_scissor(void) release_resource_readback(&rb); destroy_test_context(&context); + + ID3D10Blob_Release(ps_bytecode); } static void test_draw_depth_no_ps(void)
1
0
0
0
Giovanni Mascellani : tests: Compile HLSL shaders at runtime in test_fractional_viewports().
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: 15c5ef5bb511f1e865faf0eb1ffa4993038acc39 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/15c5ef5bb511f1e865faf0eb1ffa4…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Sep 14 11:24:24 2023 +0200 tests: Compile HLSL shaders at runtime in test_fractional_viewports(). --- tests/d3d12.c | 75 ++++++++++++++++++++++++----------------------------------- 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 0748ab6d..2ccf0ac7 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -6395,9 +6395,11 @@ static void test_fractional_viewports(void) { static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f}; ID3D12GraphicsCommandList *command_list; + ID3D10Blob *vs_bytecode, *ps_bytecode; D3D12_INPUT_LAYOUT_DESC input_layout; struct d3d12_resource_readback rb; struct test_context_desc desc; + D3D12_SHADER_BYTECODE vs, ps; D3D12_VERTEX_BUFFER_VIEW vbv; struct test_context context; ID3D12CommandQueue *queue; @@ -6405,51 +6407,21 @@ static void test_fractional_viewports(void) unsigned int i, x, y; ID3D12Resource *vb; - static const DWORD vs_code[] = - { -#if 0 - void main(in float4 in_position : POSITION, - in float2 in_texcoord : TEXCOORD, - out float4 position : SV_Position, - out float2 texcoord : TEXCOORD) - { - position = in_position; - texcoord = in_texcoord; - } -#endif - 0x43425844, 0x4df282ca, 0x85c8bbfc, 0xd44ad19f, 0x1158be97, 0x00000001, 0x00000148, 0x00000003, - 0x0000002c, 0x00000080, 0x000000d8, 0x4e475349, 0x0000004c, 0x00000002, 0x00000008, 0x00000038, - 0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x00000041, 0x00000000, 0x00000000, - 0x00000003, 0x00000001, 0x00000303, 0x49534f50, 0x4e4f4954, 0x58455400, 0x524f4f43, 0xabab0044, - 0x4e47534f, 0x00000050, 0x00000002, 0x00000008, 0x00000038, 0x00000000, 0x00000001, 0x00000003, - 0x00000000, 0x0000000f, 0x00000044, 0x00000000, 0x00000000, 0x00000003, 0x00000001, 0x00000c03, - 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, 0xababab00, 0x52444853, 0x00000068, - 0x00010040, 0x0000001a, 0x0300005f, 0x001010f2, 0x00000000, 0x0300005f, 0x00101032, 0x00000001, - 0x04000067, 0x001020f2, 0x00000000, 0x00000001, 0x03000065, 0x00102032, 0x00000001, 0x05000036, - 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x05000036, 0x00102032, 0x00000001, 0x00101046, - 0x00000001, 0x0100003e, - }; - static const D3D12_SHADER_BYTECODE vs = {vs_code, sizeof(vs_code)}; - static const DWORD ps_code[] = - { -#if 0 - float4 main(float4 position : SV_Position, - float2 texcoord : TEXCOORD) : SV_Target - { - return float4(position.xy, texcoord); - } -#endif - 0x43425844, 0xa15616bc, 0x6862ab1c, 0x28b915c0, 0xdb0df67c, 0x00000001, 0x0000011c, 0x00000003, - 0x0000002c, 0x00000084, 0x000000b8, 0x4e475349, 0x00000050, 0x00000002, 0x00000008, 0x00000038, - 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x00000044, 0x00000000, 0x00000000, - 0x00000003, 0x00000001, 0x00000303, 0x505f5653, 0x7469736f, 0x006e6f69, 0x43584554, 0x44524f4f, - 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, - 0x00000003, 0x00000000, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x0000005c, - 0x00000040, 0x00000017, 0x04002064, 0x00101032, 0x00000000, 0x00000001, 0x03001062, 0x00101032, - 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x05000036, 0x00102032, 0x00000000, 0x00101046, - 0x00000000, 0x05000036, 0x001020c2, 0x00000000, 0x00101406, 0x00000001, 0x0100003e, - }; - static const D3D12_SHADER_BYTECODE ps = {ps_code, sizeof(ps_code)}; + static const char vs_code[] = + "void main(in float4 in_position : POSITION,\n" + " in float2 in_texcoord : TEXCOORD,\n" + " out float4 position : SV_Position,\n" + " out float2 texcoord : TEXCOORD)\n" + "{\n" + " position = in_position;\n" + " texcoord = in_texcoord;\n" + "}\n"; + static const char ps_code[] = + "float4 main(float4 position : SV_Position,\n" + " float2 texcoord : TEXCOORD) : SV_Target\n" + "{\n" + " return float4(position.xy, texcoord);\n" + "}\n"; static const D3D12_INPUT_ELEMENT_DESC layout_desc[] = { {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0}, @@ -6473,11 +6445,21 @@ static void test_fractional_viewports(void) 1.0f / 64.0f, 1.0f / 128.0f, 1.0f / 256.0f, 63.0f / 128.0f, }; + vs_bytecode = compile_shader(vs_code, sizeof(vs_code) - 1, "vs_4_0"); + vs = shader_bytecode_from_blob(vs_bytecode); + + ps_bytecode = compile_shader(ps_code, sizeof(ps_code) - 1, "ps_4_0"); + ps = shader_bytecode_from_blob(ps_bytecode); + memset(&desc, 0, sizeof(desc)); desc.rt_format = DXGI_FORMAT_R32G32B32A32_FLOAT; desc.no_root_signature = true; if (!init_test_context(&context, &desc)) + { + ID3D10Blob_Release(vs_bytecode); + ID3D10Blob_Release(ps_bytecode); return; + } command_list = context.list; queue = context.queue; @@ -6542,6 +6524,9 @@ static void test_fractional_viewports(void) ID3D12Resource_Release(vb); destroy_test_context(&context); + + ID3D10Blob_Release(vs_bytecode); + ID3D10Blob_Release(ps_bytecode); } static void test_scissor(void)
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Add constant folding for 'sat'.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: 485cbe8cb72f70a90980dd7c193e321d801fdf93 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/485cbe8cb72f70a90980dd7c193e3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 12 18:38:00 2023 +0200 vkd3d-shader/hlsl: Add constant folding for 'sat'. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/hlsl_constant_ops.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index 12bb7cf1..cff0ba31 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -379,6 +379,32 @@ static bool fold_rcp(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, cons return true; } +static bool fold_sat(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type, + const struct hlsl_ir_constant *src) +{ + enum hlsl_base_type type = dst_type->base_type; + unsigned int k; + + assert(type == src->node.data_type->base_type); + + for (k = 0; k < dst_type->dimx; ++k) + { + switch (type) + { + case HLSL_TYPE_FLOAT: + case HLSL_TYPE_HALF: + dst->u[k].f = min(max(0.0f, src->value.u[k].f), 1.0f); + break; + + default: + FIXME("Fold 'sat' for type %s.\n", debug_hlsl_type(ctx, dst_type)); + return false; + } + } + + return true; +} + static bool fold_sqrt(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src, const struct vkd3d_shader_location *loc) { @@ -1069,6 +1095,10 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, success = fold_rcp(ctx, &res, instr->data_type, arg1, &instr->loc); break; + case HLSL_OP1_SAT: + success = fold_sat(ctx, &res, instr->data_type, arg1); + break; + case HLSL_OP1_SQRT: success = fold_sqrt(ctx, &res, instr->data_type, arg1, &instr->loc); break;
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Add constant folding for 'exp2'.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: 89c99cccce7449df607de12dcce0dc07ac06e283 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/89c99cccce7449df607de12dcce0d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 12 18:34:27 2023 +0200 vkd3d-shader/hlsl: Add constant folding for 'exp2'. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/hlsl_constant_ops.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index 087bb9cf..12bb7cf1 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -202,6 +202,32 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, return true; } +static bool fold_exp2(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, + const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src) +{ + enum hlsl_base_type type = dst_type->base_type; + unsigned int k; + + assert(type == src->node.data_type->base_type); + + for (k = 0; k < dst_type->dimx; ++k) + { + switch (type) + { + case HLSL_TYPE_FLOAT: + case HLSL_TYPE_HALF: + dst->u[k].f = exp2f(src->value.u[k].f); + break; + + default: + FIXME("Fold 'exp2' for type %s.\n", debug_hlsl_type(ctx, dst_type)); + return false; + } + } + + return true; +} + static bool fold_fract(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src) { @@ -1023,6 +1049,10 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, success = fold_cast(ctx, &res, instr->data_type, arg1); break; + case HLSL_OP1_EXP2: + success = fold_exp2(ctx, &res, instr->data_type, arg1); + break; + case HLSL_OP1_FRACT: success = fold_fract(ctx, &res, instr->data_type, arg1); break;
1
0
0
0
Nikolay Sivov : vkd3d-shader/hlsl: Add constant folding for 'fract'.
by Alexandre Julliard
22 Sep '23
22 Sep '23
Module: vkd3d Branch: master Commit: c16c5caad8e6c73fb5b8e5ac15e5ccd9b647cdde URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/c16c5caad8e6c73fb5b8e5ac15e5c…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 12 18:31:03 2023 +0200 vkd3d-shader/hlsl: Add constant folding for 'fract'. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/hlsl_constant_ops.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/libs/vkd3d-shader/hlsl_constant_ops.c b/libs/vkd3d-shader/hlsl_constant_ops.c index f8c788c7..087bb9cf 100644 --- a/libs/vkd3d-shader/hlsl_constant_ops.c +++ b/libs/vkd3d-shader/hlsl_constant_ops.c @@ -202,6 +202,33 @@ static bool fold_cast(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, return true; } +static bool fold_fract(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, + const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src) +{ + enum hlsl_base_type type = dst_type->base_type; + unsigned int k; + float i; + + assert(type == src->node.data_type->base_type); + + for (k = 0; k < dst_type->dimx; ++k) + { + switch (type) + { + case HLSL_TYPE_FLOAT: + case HLSL_TYPE_HALF: + dst->u[k].f = modff(src->value.u[k].f, &i); + break; + + default: + FIXME("Fold 'fract' for type %s.\n", debug_hlsl_type(ctx, dst_type)); + return false; + } + } + + return true; +} + static bool fold_log2(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, const struct hlsl_type *dst_type, const struct hlsl_ir_constant *src, const struct vkd3d_shader_location *loc) { @@ -996,6 +1023,10 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, success = fold_cast(ctx, &res, instr->data_type, arg1); break; + case HLSL_OP1_FRACT: + success = fold_fract(ctx, &res, instr->data_type, arg1); + break; + case HLSL_OP1_LOG2: success = fold_log2(ctx, &res, instr->data_type, arg1, &instr->loc); break;
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200