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
December 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
418 discussions
Start a n
N
ew thread
Zebediah Figura : tests: Avoid using "SV_Position" as a name for the vertex shader input.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: 6a514ebe8ea459983aeee14f4a131d7c87e45e3c URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/6a514ebe8ea459983aeee14f4a131…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Aug 15 19:53:55 2022 -0500 tests: Avoid using "SV_Position" as a name for the vertex shader input. We use vkd3d_shader_find_signature_element() in the Vulkan runner, and vkd3d-shader translates SM1 position to "POSITION". --- tests/hlsl/entry-point-semantics.shader_test | 21 ++++++++++++++------- tests/hlsl/for.shader_test | 3 ++- tests/hlsl/sample-bias.shader_test | 3 ++- tests/hlsl/struct-semantics.shader_test | 17 ++++++++++++++--- tests/hlsl/trigonometry.shader_test | 3 ++- tests/shader_runner.c | 5 +++-- 6 files changed, 37 insertions(+), 15 deletions(-) diff --git a/tests/hlsl/entry-point-semantics.shader_test b/tests/hlsl/entry-point-semantics.shader_test index d177b037..b87dca4d 100644 --- a/tests/hlsl/entry-point-semantics.shader_test +++ b/tests/hlsl/entry-point-semantics.shader_test @@ -2,9 +2,10 @@ % definition and its declarations. [vertex shader] -void main(out float tex : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : sv_position) { tex = 0.2; + out_pos = pos; } [pixel shader fail] @@ -53,12 +54,13 @@ probe (0, 0) rgba (0.2, 0.2, 0.2, 0.2) [vertex shader] -void main(out float4 tex[4] : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float4 tex[4] : texcoord, out float4 out_pos : sv_position) { tex[0] = float4(10.0, 11.0, 12.0, 13.0); tex[1] = float4(20.0, 21.0, 22.0, 23.0); tex[2] = float4(30.0, 31.0, 32.0, 33.0); tex[3] = float4(40.0, 41.0, 42.0, 43.0); + out_pos = pos; } @@ -196,10 +198,11 @@ struct apple float4 tex[2] : TEXCOORD0; }; -void main(out apple apl, inout float4 pos : sv_position) +void main(float4 pos : position, out apple apl, out float4 out_pos : sv_position) { apl.tex[0] = float4(1, 2, 3, 4); apl.tex[1] = float4(10, 20, 30, 40); + out_pos = pos; } [pixel shader] @@ -220,10 +223,11 @@ struct apple float2 tex : TEXCOORD0; }; -void main(out apple apls[2], inout float4 pos : sv_position) +void main(float4 pos : position, out apple apls[2], out float4 out_pos : sv_position) { apls[0].tex = float2(1, 2); apls[1].tex = float2(3, 4); + out_pos = pos; } @@ -233,29 +237,32 @@ struct apple float2 f : SEMANTIC; }; -void main(out apple a, out apple b, inout float4 pos : sv_position) +void main(float4 pos : position, out apple a, out apple b, out float4 out_pos : sv_position) { a.f = float2(1, 2); b.f = float2(3, 4); + out_pos = pos; } % Semantic names are case-insensitive. [vertex shader fail] -void main(out float2 a : sem0, out float2 b : SEM, inout float4 pos : sv_position) +void main(float4 pos : position, out float2 a : sem0, out float2 b : SEM, out float4 out_pos : sv_position) { a = float2(1, 2); b = float2(3, 4); + out_pos = pos; } [vertex shader] -void main(out float4 tex[4] : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float4 tex[4] : texcoord, out float4 out_pos : sv_position) { tex[0] = float4(10.0, 11.0, 12.0, 13.0); tex[1] = float4(20.0, 21.0, 22.0, 23.0); tex[2] = float4(30.0, 31.0, 32.0, 33.0); tex[3] = float4(40.0, 41.0, 42.0, 43.0); + out_pos = pos; } diff --git a/tests/hlsl/for.shader_test b/tests/hlsl/for.shader_test index 1392118b..9407c81b 100644 --- a/tests/hlsl/for.shader_test +++ b/tests/hlsl/for.shader_test @@ -1,7 +1,8 @@ [vertex shader] -void main(out float tex : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : sv_position) { tex = pos.x; + out_pos = pos; } [pixel shader] diff --git a/tests/hlsl/sample-bias.shader_test b/tests/hlsl/sample-bias.shader_test index e56945d0..5b7067b5 100644 --- a/tests/hlsl/sample-bias.shader_test +++ b/tests/hlsl/sample-bias.shader_test @@ -12,9 +12,10 @@ levels 2 0.0 0.0 1.0 0.0 [vertex shader] -void main(out float2 tex : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float2 tex : texcoord, out float4 out_pos : sv_position) { tex = pos.xy; + out_pos = pos; } [pixel shader] diff --git a/tests/hlsl/struct-semantics.shader_test b/tests/hlsl/struct-semantics.shader_test index 43b07bb8..c88006eb 100644 --- a/tests/hlsl/struct-semantics.shader_test +++ b/tests/hlsl/struct-semantics.shader_test @@ -1,6 +1,6 @@ [input layout] 0 r32g32b32a32 float texcoord -0 r32g32 float sv_position +0 r32g32 float position [vertex buffer 0] 0.0 1.0 0.0 1.0 -2.0 -2.0 @@ -10,7 +10,16 @@ [vertex shader] -struct vertex +struct in_vertex +{ + struct + { + float4 texcoord : texcoord; + float4 pos : position; + } m; +}; + +struct out_vertex { struct { @@ -19,8 +28,10 @@ struct vertex } m; }; -void main(inout struct vertex v) +void main(struct in_vertex i, out struct out_vertex o) { + o.m.pos = i.m.pos; + o.m.texcoord = i.m.texcoord; } [pixel shader] diff --git a/tests/hlsl/trigonometry.shader_test b/tests/hlsl/trigonometry.shader_test index f52d01de..85988119 100644 --- a/tests/hlsl/trigonometry.shader_test +++ b/tests/hlsl/trigonometry.shader_test @@ -1,7 +1,8 @@ [vertex shader] -void main(out float tex : texcoord, inout float4 pos : sv_position) +void main(float4 pos : position, out float tex : texcoord, out float4 out_pos : sv_position) { tex = (pos.x + 1) * 320; + out_pos = pos; } [pixel shader] diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 4847ec75..9b373e01 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -579,8 +579,9 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) }; static const char vs_source[] = - "void main(inout float4 position : sv_position)\n" + "float4 main(float4 pos : position) : sv_position\n" "{\n" + " return pos;\n" "}"; if (!shader_runner_get_resource(runner, RESOURCE_TYPE_RENDER_TARGET, 0)) @@ -601,7 +602,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) vkd3d_array_reserve((void **)&runner->input_elements, &runner->input_element_capacity, 1, sizeof(*runner->input_elements)); element = &runner->input_elements[0]; - element->name = strdup("sv_position"); + element->name = strdup("position"); element->slot = 0; element->format = DXGI_FORMAT_R32G32_FLOAT; element->texel_size = sizeof(*quad);
1
0
0
0
Zebediah Figura : tests: Use struct vkd3d_shader_scan_signature_info to retrieve the VS input signature.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: aa44f9b39029983b5535c92ae3c66622f2940b0b URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/aa44f9b39029983b5535c92ae3c66…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Fri Feb 24 13:50:11 2023 -0600 tests: Use struct vkd3d_shader_scan_signature_info to retrieve the VS input signature. In order to allow retrieving it from d3dbc shaders. --- tests/shader_runner_vulkan.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 6da2e86b..bb6b3a30 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -64,6 +64,8 @@ struct vulkan_shader_runner VkCommandBuffer cmd_buffer; VkDescriptorPool descriptor_pool; + struct vkd3d_shader_scan_signature_info vs_signatures; + struct vulkan_sampler { VkSampler vk_sampler; @@ -392,7 +394,7 @@ static void vulkan_runner_destroy_resource(struct shader_runner *r, struct resou free(resource); } -static bool compile_shader(const struct vulkan_shader_runner *runner, const char *source, const char *type, +static bool compile_shader(struct vulkan_shader_runner *runner, const char *source, const char *type, struct vkd3d_shader_code *dxbc, struct vkd3d_shader_code *spirv) { struct vkd3d_shader_spirv_target_info spirv_info = {.type = VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO}; @@ -528,6 +530,14 @@ static bool compile_shader(const struct vulkan_shader_runner *runner, const char interface_info.push_constant_buffer_count = 1; interface_info.push_constant_buffers = &push_constants; + if (!strcmp(type, "vs")) + { + interface_info.next = &runner->vs_signatures; + + runner->vs_signatures.type = VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO; + runner->vs_signatures.next = NULL; + } + ret = vkd3d_shader_compile(&info, spirv, &messages); if (messages && vkd3d_test_state.debug_level) trace("%s\n", messages); @@ -538,7 +548,7 @@ static bool compile_shader(const struct vulkan_shader_runner *runner, const char return true; } -static bool create_shader_stage(const struct vulkan_shader_runner *runner, +static bool create_shader_stage(struct vulkan_shader_runner *runner, VkPipelineShaderStageCreateInfo *stage_info, const char *type, enum VkShaderStageFlagBits stage, const char *source, struct vkd3d_shader_code *dxbc_ptr) { @@ -606,7 +616,7 @@ static VkPipelineLayout create_pipeline_layout(const struct vulkan_shader_runner return pipeline_layout; } -static VkPipeline create_graphics_pipeline(const struct vulkan_shader_runner *runner, VkRenderPass render_pass, +static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner, VkRenderPass render_pass, VkPipelineLayout pipeline_layout, D3D_PRIMITIVE_TOPOLOGY primitive_topology) { VkPipelineInputAssemblyStateCreateInfo ia_desc = {.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO}; @@ -622,7 +632,6 @@ static VkPipeline create_graphics_pipeline(const struct vulkan_shader_runner *ru VkPipelineColorBlendAttachmentState attachment_desc[MAX_RESOURCES] = {0}; VkVertexInputAttributeDescription input_attributes[32]; VkVertexInputBindingDescription input_bindings[32]; - struct vkd3d_shader_signature vs_input_signature; VkPipelineShaderStageCreateInfo stage_desc[2]; struct vkd3d_shader_code vs_dxbc; VkDevice device = runner->device; @@ -642,9 +651,6 @@ static VkPipeline create_graphics_pipeline(const struct vulkan_shader_runner *ru return VK_NULL_HANDLE; } - ret = vkd3d_shader_parse_input_signature(&vs_dxbc, &vs_input_signature, NULL); - ok(!ret, "Failed to parse input signature, error %d.\n", ret); - if (runner->r.input_element_count > ARRAY_SIZE(input_attributes)) fatal_error("Input element count %zu is too high.\n", runner->r.input_element_count); @@ -654,7 +660,8 @@ static VkPipeline create_graphics_pipeline(const struct vulkan_shader_runner *ru const struct input_element *element = &runner->r.input_elements[i]; const struct vkd3d_shader_signature_element *signature_element; - signature_element = vkd3d_shader_find_signature_element(&vs_input_signature, element->name, element->index, 0); + signature_element = vkd3d_shader_find_signature_element(&runner->vs_signatures.input, element->name, element->index, 0); + ok(signature_element, "Cannot find signature element %s%u.\n", element->name, element->index); attribute->location = signature_element->register_index; attribute->binding = element->slot; @@ -737,13 +744,13 @@ static VkPipeline create_graphics_pipeline(const struct vulkan_shader_runner *ru VK_CALL(vkDestroyShaderModule(device, stage_desc[0].module, NULL)); VK_CALL(vkDestroyShaderModule(device, stage_desc[1].module, NULL)); - vkd3d_shader_free_shader_signature(&vs_input_signature); + vkd3d_shader_free_scan_signature_info(&runner->vs_signatures); vkd3d_shader_free_shader_code(&vs_dxbc); return pipeline; } -static VkPipeline create_compute_pipeline(const struct vulkan_shader_runner *runner, VkPipelineLayout pipeline_layout) +static VkPipeline create_compute_pipeline(struct vulkan_shader_runner *runner, VkPipelineLayout pipeline_layout) { VkComputePipelineCreateInfo pipeline_desc = {.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; VkPipeline pipeline;
1
0
0
0
Zebediah Figura : vkd3d-shader: Do not scan DCL instructions which do not declare resources.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: 2bc40385d9b4a51a0d66462a6f708fbc888ecfa3 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/2bc40385d9b4a51a0d66462a6f708…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Oct 25 13:58:13 2023 -0500 vkd3d-shader: Do not scan DCL instructions which do not declare resources. --- libs/vkd3d-shader/vkd3d_shader_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 0600e722..49ce886a 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1073,6 +1073,9 @@ static int vkd3d_shader_scan_instruction(struct vkd3d_shader_scan_context *conte vkd3d_shader_scan_sampler_declaration(context, instruction); break; case VKD3DSIH_DCL: + if (instruction->declaration.semantic.resource_type == VKD3D_SHADER_RESOURCE_NONE) + break; + if (instruction->declaration.semantic.resource.reg.reg.type == VKD3DSPR_COMBINED_SAMPLER) { vkd3d_shader_scan_combined_sampler_declaration(context, &instruction->declaration.semantic);
1
0
0
0
Zebediah Figura : vkd3d-shader: Do not scan the shader in vkd3d_shader_parser_compile() for assembly targets.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: 8af47a96ea5f8531e863243cf441d1624083baf3 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/8af47a96ea5f8531e863243cf441d…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Dec 13 15:50:01 2023 -0600 vkd3d-shader: Do not scan the shader in vkd3d_shader_parser_compile() for assembly targets. --- libs/vkd3d-shader/vkd3d_shader_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 2ee97e6c..0600e722 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1540,9 +1540,6 @@ static int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, scan_info = *compile_info; - if ((ret = scan_with_parser(&scan_info, message_context, &scan_descriptor_info, parser)) < 0) - return ret; - switch (compile_info->target_type) { case VKD3D_SHADER_TARGET_D3D_ASM: @@ -1550,6 +1547,8 @@ static int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, break; case VKD3D_SHADER_TARGET_GLSL: + if ((ret = scan_with_parser(&scan_info, message_context, &scan_descriptor_info, parser)) < 0) + return ret; if (!(glsl_generator = vkd3d_glsl_generator_create(&parser->shader_version, message_context, &parser->location))) { @@ -1560,19 +1559,22 @@ static int vkd3d_shader_parser_compile(struct vkd3d_shader_parser *parser, ret = vkd3d_glsl_generator_generate(glsl_generator, parser, out); vkd3d_glsl_generator_destroy(glsl_generator); + vkd3d_shader_free_scan_descriptor_info1(&scan_descriptor_info); break; case VKD3D_SHADER_TARGET_SPIRV_BINARY: case VKD3D_SHADER_TARGET_SPIRV_TEXT: + if ((ret = scan_with_parser(&scan_info, message_context, &scan_descriptor_info, parser)) < 0) + return ret; ret = spirv_compile(parser, &scan_descriptor_info, compile_info, out, message_context); + vkd3d_shader_free_scan_descriptor_info1(&scan_descriptor_info); break; default: /* Validation should prevent us from reaching this. */ - assert(0); + vkd3d_unreachable(); } - vkd3d_shader_free_scan_descriptor_info1(&scan_descriptor_info); return ret; }
1
0
0
0
Conor McCarthy : tests/shader-runner: Check for int64 support in the Vulkan runner.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: f23426ec32270a27e470c5d52fc5cee718a5eb6d URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/f23426ec32270a27e470c5d52fc5c…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Dec 14 18:59:46 2023 +1000 tests/shader-runner: Check for int64 support in the Vulkan runner. --- tests/shader_runner_vulkan.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index 358fd74c..6da2e86b 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -71,6 +71,7 @@ struct vulkan_shader_runner } samplers[MAX_SAMPLERS]; bool supports_float64; + bool supports_int64; DECLARE_VK_PFN(vkCreateInstance); #define VK_INSTANCE_PFN DECLARE_VK_PFN @@ -89,6 +90,8 @@ static bool vulkan_runner_check_requirements(struct shader_runner *r) if (runner->r.require_float64 && !runner->supports_float64) return false; + if (runner->r.require_int64 && !runner->supports_int64) + return false; return true; } @@ -1340,6 +1343,12 @@ static bool init_vulkan_runner(struct vulkan_shader_runner *runner) features.shaderFloat64 = VK_TRUE; runner->supports_float64 = true; } + trace("shaderInt64: %u.\n", ret_features.shaderInt64); + if (ret_features.shaderInt64) + { + features.shaderInt64 = VK_TRUE; + runner->supports_int64 = true; + } if ((vr = VK_CALL(vkCreateDevice(runner->phys_device, &device_desc, NULL, &device)))) {
1
0
0
0
Conor McCarthy : tests/shader-runner: Check for float64 support in the Vulkan runner.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: a80ea8168f157f9c1c4b2ed0ff818f315055a37c URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/a80ea8168f157f9c1c4b2ed0ff818…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Dec 14 18:57:33 2023 +1000 tests/shader-runner: Check for float64 support in the Vulkan runner. --- tests/shader_runner_vulkan.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/shader_runner_vulkan.c b/tests/shader_runner_vulkan.c index f89b4d62..358fd74c 100644 --- a/tests/shader_runner_vulkan.c +++ b/tests/shader_runner_vulkan.c @@ -70,6 +70,8 @@ struct vulkan_shader_runner uint32_t binding; } samplers[MAX_SAMPLERS]; + bool supports_float64; + DECLARE_VK_PFN(vkCreateInstance); #define VK_INSTANCE_PFN DECLARE_VK_PFN #define VK_DEVICE_PFN DECLARE_VK_PFN @@ -81,6 +83,16 @@ static struct vulkan_shader_runner *vulkan_shader_runner(struct shader_runner *r return CONTAINING_RECORD(r, struct vulkan_shader_runner, r); } +static bool vulkan_runner_check_requirements(struct shader_runner *r) +{ + struct vulkan_shader_runner *runner = vulkan_shader_runner(r); + + if (runner->r.require_float64 && !runner->supports_float64) + return false; + + return true; +} + #define VK_CALL(f) (runner->f) static void begin_command_buffer(struct vulkan_shader_runner *runner) @@ -1157,6 +1169,7 @@ static void vulkan_runner_release_readback(struct shader_runner *r, struct resou static const struct shader_runner_ops vulkan_runner_ops = { + .check_requirements = vulkan_runner_check_requirements, .create_resource = vulkan_runner_create_resource, .destroy_resource = vulkan_runner_destroy_resource, .dispatch = vulkan_runner_dispatch, @@ -1321,6 +1334,13 @@ static bool init_vulkan_runner(struct vulkan_shader_runner *runner) ENABLE_FEATURE(shaderImageGatherExtended); ENABLE_FEATURE(shaderStorageImageWriteWithoutFormat); + trace("shaderFloat64: %u.\n", ret_features.shaderFloat64); + if (ret_features.shaderFloat64) + { + features.shaderFloat64 = VK_TRUE; + runner->supports_float64 = true; + } + if ((vr = VK_CALL(vkCreateDevice(runner->phys_device, &device_desc, NULL, &device)))) { skip("Failed to create device, vr %d.\n", vr);
1
0
0
0
Conor McCarthy : tests/shader-runner: Check for float64 support in the d3d11 runner.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: cd43cb3752d414bb990ed39a5fbb95ffebd3f39b URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/cd43cb3752d414bb990ed39a5fbb9…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Thu Dec 14 18:47:23 2023 +1000 tests/shader-runner: Check for float64 support in the d3d11 runner. --- tests/shader_runner_d3d11.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index abe45520..1a62b20c 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -65,6 +65,8 @@ struct d3d11_shader_runner IDXGISwapChain *swapchain; ID3D11DeviceContext *immediate_context; ID3D11RasterizerState *rasterizer_state; + + bool supports_float64; }; static struct d3d11_shader_runner *d3d11_shader_runner(struct shader_runner *r) @@ -252,6 +254,7 @@ static IDXGISwapChain *create_swapchain(ID3D11Device *device, HWND window) static BOOL init_test_context(struct d3d11_shader_runner *runner) { + D3D11_FEATURE_DATA_DOUBLES doubles = {0}; unsigned int rt_width, rt_height; D3D11_RASTERIZER_DESC rs_desc; D3D11_VIEWPORT vp; @@ -266,6 +269,12 @@ static BOOL init_test_context(struct d3d11_shader_runner *runner) return FALSE; } + hr = ID3D11Device_CheckFeatureSupport(runner->device, D3D11_FEATURE_DOUBLES, + &doubles, sizeof(doubles)); + ok(hr == S_OK, "Failed to check double precision feature support, hr %#lx.\n", hr); + trace("DoublePrecisionFloatShaderOps: %u.\n", doubles.DoublePrecisionFloatShaderOps); + runner->supports_float64 = doubles.DoublePrecisionFloatShaderOps; + rt_width = RENDER_TARGET_WIDTH; rt_height = RENDER_TARGET_HEIGHT; SetRect(&rect, 0, 0, rt_width, rt_height); @@ -313,6 +322,16 @@ static void destroy_test_context(struct d3d11_shader_runner *runner) ok(!ref, "Device has %lu references left.\n", ref); } +static bool d3d11_runner_check_requirements(struct shader_runner *r) +{ + struct d3d11_shader_runner *runner = d3d11_shader_runner(r); + + if (runner->r.require_float64 && !runner->supports_float64) + return false; + + return true; +} + static ID3D11Buffer *create_buffer(ID3D11Device *device, unsigned int bind_flags, unsigned int size, const void *data) { D3D11_SUBRESOURCE_DATA resource_data; @@ -724,6 +743,7 @@ static void d3d11_runner_release_readback(struct shader_runner *r, struct resour static const struct shader_runner_ops d3d11_runner_ops = { + .check_requirements = d3d11_runner_check_requirements, .create_resource = d3d11_runner_create_resource, .destroy_resource = d3d11_runner_destroy_resource, .dispatch = d3d11_runner_dispatch,
1
0
0
0
Conor McCarthy : vkd3d: Co-locate all descriptor-related members.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: b8694fd8795606791df81b87eab1a52a74468170 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/b8694fd8795606791df81b87eab1a…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Dec 4 15:59:16 2023 +1000 vkd3d: Co-locate all descriptor-related members. To optimise cache coherence, because decriptor updates use the most performance-critical code paths. --- libs/vkd3d/vkd3d_private.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 4c5c039a..bf32d04c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1760,6 +1760,19 @@ struct d3d12_device struct vkd3d_desc_object_cache view_desc_cache; struct vkd3d_desc_object_cache cbuffer_desc_cache; + VkDescriptorPoolSize vk_pool_sizes[VKD3D_DESCRIPTOR_POOL_COUNT]; + unsigned int vk_pool_count; + struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT]; + bool use_vk_heaps; + + struct d3d12_descriptor_heap **heaps; + size_t heap_capacity; + size_t heap_count; + union vkd3d_thread_handle worker_thread; + struct vkd3d_mutex worker_mutex; + struct vkd3d_cond worker_cond; + bool worker_should_exit; + struct vkd3d_mutex pipeline_cache_mutex; struct vkd3d_render_pass_cache render_pass_cache; VkPipelineCache vk_pipeline_cache; @@ -1800,19 +1813,6 @@ struct d3d12_device const struct vkd3d_format_compatibility_list *format_compatibility_lists; struct vkd3d_null_resources null_resources; struct vkd3d_uav_clear_state uav_clear_state; - - VkDescriptorPoolSize vk_pool_sizes[VKD3D_DESCRIPTOR_POOL_COUNT]; - unsigned int vk_pool_count; - struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT]; - bool use_vk_heaps; - - struct d3d12_descriptor_heap **heaps; - size_t heap_capacity; - size_t heap_count; - union vkd3d_thread_handle worker_thread; - struct vkd3d_mutex worker_mutex; - struct vkd3d_cond worker_cond; - bool worker_should_exit; }; HRESULT d3d12_device_create(struct vkd3d_instance *instance,
1
0
0
0
Conor McCarthy : vkd3d: Rename the device mutex to pipeline_cache_mutex.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: a2741babd95c6f6b908c3f0d117219c432618431 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/a2741babd95c6f6b908c3f0d11721…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Mon Dec 4 15:53:51 2023 +1000 vkd3d: Rename the device mutex to pipeline_cache_mutex. It is used only for pipeline and render pass caching, and renaming it helps prevent inappropriate or erroneous use. --- libs/vkd3d/device.c | 4 ++-- libs/vkd3d/state.c | 12 ++++++------ libs/vkd3d/vkd3d_private.h | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index d6e74d01..69a46e91 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2056,7 +2056,7 @@ static HRESULT d3d12_device_init_pipeline_cache(struct d3d12_device *device) VkPipelineCacheCreateInfo cache_info; VkResult vr; - vkd3d_mutex_init(&device->mutex); + vkd3d_mutex_init(&device->pipeline_cache_mutex); cache_info.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; cache_info.pNext = NULL; @@ -2080,7 +2080,7 @@ static void d3d12_device_destroy_pipeline_cache(struct d3d12_device *device) if (device->vk_pipeline_cache) VK_CALL(vkDestroyPipelineCache(device->vk_device, device->vk_pipeline_cache, NULL)); - vkd3d_mutex_destroy(&device->mutex); + vkd3d_mutex_destroy(&device->pipeline_cache_mutex); } #define VKD3D_VA_FALLBACK_BASE 0x8000000000000000ull diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 9a039452..626d6d62 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1691,7 +1691,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache, HRESULT hr = S_OK; unsigned int i; - vkd3d_mutex_lock(&device->mutex); + vkd3d_mutex_lock(&device->pipeline_cache_mutex); for (i = 0; i < cache->render_pass_count; ++i) { @@ -1708,7 +1708,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache, if (!found) hr = vkd3d_render_pass_cache_create_pass_locked(cache, device, key, vk_render_pass); - vkd3d_mutex_unlock(&device->mutex); + vkd3d_mutex_unlock(&device->pipeline_cache_mutex); return hr; } @@ -3615,7 +3615,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12 *vk_render_pass = VK_NULL_HANDLE; - vkd3d_mutex_lock(&device->mutex); + vkd3d_mutex_lock(&device->pipeline_cache_mutex); LIST_FOR_EACH_ENTRY(current, &graphics->compiled_pipelines, struct vkd3d_compiled_pipeline, entry) { @@ -3627,7 +3627,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12 } } - vkd3d_mutex_unlock(&device->mutex); + vkd3d_mutex_unlock(&device->pipeline_cache_mutex); return vk_pipeline; } @@ -3646,7 +3646,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta compiled_pipeline->vk_pipeline = vk_pipeline; compiled_pipeline->vk_render_pass = vk_render_pass; - vkd3d_mutex_lock(&device->mutex); + vkd3d_mutex_lock(&device->pipeline_cache_mutex); LIST_FOR_EACH_ENTRY(current, &graphics->compiled_pipelines, struct vkd3d_compiled_pipeline, entry) { @@ -3661,7 +3661,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta if (compiled_pipeline) list_add_tail(&graphics->compiled_pipelines, &compiled_pipeline->entry); - vkd3d_mutex_unlock(&device->mutex); + vkd3d_mutex_unlock(&device->pipeline_cache_mutex); return compiled_pipeline; } diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 025ad534..4c5c039a 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1757,9 +1757,10 @@ struct d3d12_device struct vkd3d_gpu_va_allocator gpu_va_allocator; - struct vkd3d_mutex mutex; struct vkd3d_desc_object_cache view_desc_cache; struct vkd3d_desc_object_cache cbuffer_desc_cache; + + struct vkd3d_mutex pipeline_cache_mutex; struct vkd3d_render_pass_cache render_pass_cache; VkPipelineCache vk_pipeline_cache;
1
0
0
0
Conor McCarthy : vkd3d: Write Vulkan descriptors in a worker thread.
by Alexandre Julliard
14 Dec '23
14 Dec '23
Module: vkd3d Branch: master Commit: 37e76618ca41b83f4691e9c8afafbc6ebef9228a URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/37e76618ca41b83f4691e9c8afafb…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Sun Jul 30 13:34:09 2023 +1000 vkd3d: Write Vulkan descriptors in a worker thread. Raises framerate by 5-10% in games which write thousands of descriptors per frame, e.g. Horizon Zero Dawn. The worker thread is a generic device worker which can also be used for other purposes if the need arises. --- libs/vkd3d/command.c | 4 ++ libs/vkd3d/device.c | 110 +++++++++++++++++++++++++++++++++++++++++++++ libs/vkd3d/resource.c | 9 ++++ libs/vkd3d/vkd3d_private.h | 10 +++++ 4 files changed, 133 insertions(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 15c8317b..549f6a45 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2644,6 +2644,8 @@ static bool d3d12_command_list_update_compute_pipeline(struct d3d12_command_list { const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; + vkd3d_cond_signal(&list->device->worker_cond); + if (list->current_pipeline != VK_NULL_HANDLE) return true; @@ -2665,6 +2667,8 @@ static bool d3d12_command_list_update_graphics_pipeline(struct d3d12_command_lis VkRenderPass vk_render_pass; VkPipeline vk_pipeline; + vkd3d_cond_signal(&list->device->worker_cond); + if (list->current_pipeline != VK_NULL_HANDLE) return true; diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 5c801ca4..d6e74d01 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2495,6 +2495,28 @@ static ULONG STDMETHODCALLTYPE d3d12_device_AddRef(ID3D12Device5 *iface) return refcount; } +static HRESULT device_worker_stop(struct d3d12_device *device) +{ + HRESULT hr; + + TRACE("device %p.\n", device); + + vkd3d_mutex_lock(&device->worker_mutex); + + device->worker_should_exit = true; + vkd3d_cond_signal(&device->worker_cond); + + vkd3d_mutex_unlock(&device->worker_mutex); + + if (FAILED(hr = vkd3d_join_thread(device->vkd3d_instance, &device->worker_thread))) + return hr; + + vkd3d_mutex_destroy(&device->worker_mutex); + vkd3d_cond_destroy(&device->worker_cond); + + return S_OK; +} + static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device5 *iface) { struct d3d12_device *device = impl_from_ID3D12Device5(iface); @@ -2520,6 +2542,9 @@ static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device5 *iface) d3d12_device_destroy_vkd3d_queues(device); vkd3d_desc_object_cache_cleanup(&device->view_desc_cache); vkd3d_desc_object_cache_cleanup(&device->cbuffer_desc_cache); + if (device->use_vk_heaps) + device_worker_stop(device); + vkd3d_free(device->heaps); VK_CALL(vkDestroyDevice(device->vk_device, NULL)); if (device->parent) IUnknown_Release(device->parent); @@ -4251,6 +4276,40 @@ struct d3d12_device *unsafe_impl_from_ID3D12Device5(ID3D12Device5 *iface) return impl_from_ID3D12Device5(iface); } +static void *device_worker_main(void *arg) +{ + struct d3d12_descriptor_heap *heap; + struct d3d12_device *device = arg; + size_t i; + + vkd3d_set_thread_name("device_worker"); + + vkd3d_mutex_lock(&device->worker_mutex); + + while (!device->worker_should_exit) + { + for (i = 0; i < device->heap_count; ++i) + { + /* Descriptor updates are not written to Vulkan descriptor sets until a command list + * is submitted to a queue, while the client is free to write d3d12 descriptors earlier, + * from any thread. This causes a delay right before command list execution, so + * handling these updates in a worker thread can speed up execution significantly. */ + heap = device->heaps[i]; + if (heap->dirty_list_head == UINT_MAX) + continue; + vkd3d_mutex_lock(&heap->vk_sets_mutex); + d3d12_desc_flush_vk_heap_updates_locked(heap, device); + vkd3d_mutex_unlock(&heap->vk_sets_mutex); + } + + vkd3d_cond_wait(&device->worker_cond, &device->worker_mutex); + } + + vkd3d_mutex_unlock(&device->worker_mutex); + + return NULL; +} + static HRESULT d3d12_device_init(struct d3d12_device *device, struct vkd3d_instance *instance, const struct vkd3d_device_create_info *create_info) { @@ -4270,6 +4329,14 @@ static HRESULT d3d12_device_init(struct d3d12_device *device, device->vk_device = VK_NULL_HANDLE; + device->heaps = NULL; + device->heap_capacity = 0; + device->heap_count = 0; + memset(&device->worker_thread, 0, sizeof(device->worker_thread)); + device->worker_should_exit = false; + vkd3d_mutex_init(&device->worker_mutex); + vkd3d_cond_init(&device->worker_cond); + if (FAILED(hr = vkd3d_create_vk_device(device, create_info))) goto out_free_instance; @@ -4291,6 +4358,13 @@ static HRESULT d3d12_device_init(struct d3d12_device *device, if (FAILED(hr = vkd3d_vk_descriptor_heap_layouts_init(device))) goto out_cleanup_uav_clear_state; + if (device->use_vk_heaps && FAILED(hr = vkd3d_create_thread(device->vkd3d_instance, + device_worker_main, device, &device->worker_thread))) + { + WARN("Failed to create worker thread, hr %#x.\n", hr); + goto out_cleanup_descriptor_heap_layouts; + } + vkd3d_render_pass_cache_init(&device->render_pass_cache); vkd3d_gpu_va_allocator_init(&device->gpu_va_allocator); vkd3d_time_domains_init(device); @@ -4308,6 +4382,8 @@ static HRESULT d3d12_device_init(struct d3d12_device *device, return S_OK; +out_cleanup_descriptor_heap_layouts: + vkd3d_vk_descriptor_heap_layouts_cleanup(device); out_cleanup_uav_clear_state: vkd3d_uav_clear_state_cleanup(&device->uav_clear_state, device); out_destroy_null_resources: @@ -4361,6 +4437,40 @@ void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason, device->removed_reason = reason; } +HRESULT d3d12_device_add_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap) +{ + vkd3d_mutex_lock(&device->worker_mutex); + + if (!vkd3d_array_reserve((void **)&device->heaps, &device->heap_capacity, device->heap_count + 1, + sizeof(*device->heaps))) + { + vkd3d_mutex_unlock(&device->worker_mutex); + return E_OUTOFMEMORY; + } + device->heaps[device->heap_count++] = heap; + + vkd3d_mutex_unlock(&device->worker_mutex); + + return S_OK; +} + +void d3d12_device_remove_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap) +{ + size_t i; + + vkd3d_mutex_lock(&device->worker_mutex); + + for (i = 0; i < device->heap_count; ++i) + { + if (device->heaps[i] == heap) + { + device->heaps[i] = device->heaps[--device->heap_count]; + break; + } + } + + vkd3d_mutex_unlock(&device->worker_mutex); +} #ifdef _WIN32 struct thread_data diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 0c9c911a..609c6710 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -3995,6 +3995,9 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHea { struct d3d12_desc *descriptors = (struct d3d12_desc *)heap->descriptors; + if (heap->use_vk_heaps) + d3d12_device_remove_descriptor_heap(device, heap); + for (i = 0; i < heap->desc.NumDescriptors; ++i) { d3d12_desc_destroy(&descriptors[i], device); @@ -4318,6 +4321,12 @@ HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device, dst[i].next = 0; } object->dirty_list_head = UINT_MAX; + + if (object->use_vk_heaps && FAILED(hr = d3d12_device_add_descriptor_heap(device, object))) + { + vkd3d_free(object); + return hr; + } } else { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index e0eb9f3d..025ad534 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1804,6 +1804,14 @@ struct d3d12_device unsigned int vk_pool_count; struct vkd3d_vk_descriptor_heap_layout vk_descriptor_heap_layouts[VKD3D_SET_INDEX_COUNT]; bool use_vk_heaps; + + struct d3d12_descriptor_heap **heaps; + size_t heap_capacity; + size_t heap_count; + union vkd3d_thread_handle worker_thread; + struct vkd3d_mutex worker_mutex; + struct vkd3d_cond worker_cond; + bool worker_should_exit; }; HRESULT d3d12_device_create(struct vkd3d_instance *instance, @@ -1813,6 +1821,8 @@ bool d3d12_device_is_uma(struct d3d12_device *device, bool *coherent); void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason, const char *message, ...) VKD3D_PRINTF_FUNC(3, 4); struct d3d12_device *unsafe_impl_from_ID3D12Device5(ID3D12Device5 *iface); +HRESULT d3d12_device_add_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap); +void d3d12_device_remove_descriptor_heap(struct d3d12_device *device, struct d3d12_descriptor_heap *heap); static inline HRESULT d3d12_device_query_interface(struct d3d12_device *device, REFIID iid, void **object) {
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
42
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
Results per page:
10
25
50
100
200