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
February 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
716 discussions
Start a n
N
ew thread
Petrichor Park : vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: vkd3d Branch: master Commit: 69294c290bad83470e55046f02e2d1c6167150cb URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/69294c290bad83470e55046f02e2d…
Author: Petrichor Park <ppark(a)codeweavers.com> Date: Sun Feb 11 11:06:01 2024 -0600 vkd3d-shader/hlsl: Implement acos and asin trig intrinsics. Tests have already been implemented in 92044d5e; this commit also reduces the scope of some of the todos (because now they're implemented!). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55154
--- libs/vkd3d-shader/hlsl.y | 57 +++++++++++++++++++++++++++++++++++++ tests/hlsl/inverse-trig.shader_test | 24 ++++++++-------- 2 files changed, 69 insertions(+), 12 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index dc7b4c1b..111fec17 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2666,6 +2666,55 @@ static bool intrinsic_abs(struct hlsl_ctx *ctx, return !!add_unary_arithmetic_expr(ctx, params->instrs, HLSL_OP1_ABS, params->args[0], loc); } +static bool write_acos_or_asin(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc, bool asin_mode) +{ + struct hlsl_ir_function_decl *func; + struct hlsl_type *type; + char *body; + + static const char template[] = + "%s %s(%s x)\n" + "{\n" + " %s abs_arg = abs(x);\n" + " %s poly_approx = (((-0.018729\n" + " * abs_arg + 0.074261)\n" + " * abs_arg - 0.212114)\n" + " * abs_arg + 1.570729);\n" + " %s correction = sqrt(1.0 - abs_arg);\n" + " %s zero_flip = (x < 0.0) * (-2.0 * correction * poly_approx + 3.141593);\n" + " %s result = poly_approx * correction + zero_flip;\n" + " return %s;\n" + "}"; + static const char fn_name_acos[] = "acos"; + static const char fn_name_asin[] = "asin"; + static const char return_stmt_acos[] = "result"; + static const char return_stmt_asin[] = "-result + 1.570796"; + + const char *fn_name = asin_mode ? fn_name_asin : fn_name_acos; + + type = params->args[0]->data_type; + type = hlsl_get_numeric_type(ctx, type->class, HLSL_TYPE_FLOAT, type->dimx, type->dimy); + + if (!(body = hlsl_sprintf_alloc(ctx, template, + type->name, fn_name, type->name, + type->name, type->name, type->name, type->name, type->name, + (asin_mode ? return_stmt_asin : return_stmt_acos)))) + return false; + func = hlsl_compile_internal_function(ctx, fn_name, body); + vkd3d_free(body); + if (!func) + return false; + + return add_user_call(ctx, func, params, loc); +} + +static bool intrinsic_acos(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + return write_acos_or_asin(ctx, params, loc, false); +} + static bool intrinsic_all(struct hlsl_ctx *ctx, const struct parse_initializer *params, const struct vkd3d_shader_location *loc) { @@ -2743,6 +2792,12 @@ static bool intrinsic_any(struct hlsl_ctx *ctx, return false; } +static bool intrinsic_asin(struct hlsl_ctx *ctx, + const struct parse_initializer *params, const struct vkd3d_shader_location *loc) +{ + return write_acos_or_asin(ctx, params, loc, true); +} + /* Find the type corresponding to the given source type, with the same * dimensions but a different base type. */ static struct hlsl_type *convert_numeric_type(const struct hlsl_ctx *ctx, @@ -3970,9 +4025,11 @@ intrinsic_functions[] = /* Note: these entries should be kept in alphabetical order. */ {"D3DCOLORtoUBYTE4", 1, true, intrinsic_d3dcolor_to_ubyte4}, {"abs", 1, true, intrinsic_abs}, + {"acos", 1, true, intrinsic_acos}, {"all", 1, true, intrinsic_all}, {"any", 1, true, intrinsic_any}, {"asfloat", 1, true, intrinsic_asfloat}, + {"asin", 1, true, intrinsic_asin}, {"asuint", -1, true, intrinsic_asuint}, {"ceil", 1, true, intrinsic_ceil}, {"clamp", 3, true, intrinsic_clamp}, diff --git a/tests/hlsl/inverse-trig.shader_test b/tests/hlsl/inverse-trig.shader_test index 0c1fdc01..01344204 100644 --- a/tests/hlsl/inverse-trig.shader_test +++ b/tests/hlsl/inverse-trig.shader_test @@ -3,7 +3,7 @@ % implementations. DXIL defines intrinsics for inverse trig, to be implemented % by the backend. -[pixel shader todo] +[pixel shader todo(sm<4)] uniform float4 a; float4 main() : sv_target @@ -13,26 +13,26 @@ float4 main() : sv_target [test] uniform 0 float4 -1.0 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (3.14159274, 0.0, 0.0, 0.0) 128 uniform 0 float4 -0.5 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (2.094441441, 0.0, 0.0, 0.0) 256 uniform 0 float4 0.0 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (1.57072878, 0.0, 0.0, 0.0) 1024 uniform 0 float4 0.5 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (1.04715133, 0.0, 0.0, 0.0) 512 uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (0.0, 0.0, 0.0, 0.0) 128 -[pixel shader todo] +[pixel shader todo(sm<4)] uniform float4 a; float4 main() : sv_target @@ -44,7 +44,7 @@ float4 main() : sv_target [test] uniform 0 float4 -1.0 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (-31416.0, 0.0, 0.0, 0.0) [require] @@ -52,15 +52,15 @@ shader model < 6.0 [test] uniform 0 float4 -0.5 0.0 0.0 0.0 -todo draw quad +todo(sm<4) draw quad probe all rgba (-10473.0, 0.0, 0.0, 0.0) uniform 0 float4 0.0 0.0 0.0 0.0 -todo draw quad +todo(sm<4) draw quad probe all rgba (1.0, 0.0, 0.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 -todo draw quad +todo(sm<4) draw quad probe all rgba (10473.0, 0.0, 0.0, 0.0) [require] @@ -88,7 +88,7 @@ probe all rgba (10472.0, 0.0, 0.0, 0.0) 4096 [test] uniform 0 float4 1.0 0.0 0.0 0.0 -todo(sm<6) draw quad +todo(sm<4) draw quad probe all rgba (31416.0, 0.0, 0.0, 0.0)
1
0
0
0
Henri Verbeet : vkd3d-shader/hlsl: Replace HLSL_MODIFIER_RASTERIZER_ORDERED with a hlsl_type.e.resource flag.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: vkd3d Branch: master Commit: d4223a03c854743c6be0b2839eb91e9a8bb3c709 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d4223a03c854743c6be0b2839eb91…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Feb 19 12:52:31 2024 +0100 vkd3d-shader/hlsl: Replace HLSL_MODIFIER_RASTERIZER_ORDERED with a hlsl_type.e.resource flag. --- libs/vkd3d-shader/hlsl.c | 11 ++++++++--- libs/vkd3d-shader/hlsl.h | 9 +++++---- libs/vkd3d-shader/hlsl.y | 4 ++-- libs/vkd3d-shader/tpf.c | 6 +++--- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 60ed77ab..353e34d2 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -758,8 +758,8 @@ struct hlsl_type *hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_ return type; } -struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, - enum hlsl_sampler_dim dim, struct hlsl_type *format, uint32_t modifiers) +struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim, + struct hlsl_type *format, bool rasteriser_ordered) { struct hlsl_type *type; @@ -770,8 +770,8 @@ struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, type->dimx = format->dimx; type->dimy = 1; type->sampler_dim = dim; - type->modifiers = modifiers; type->e.resource.format = format; + type->e.resource.rasteriser_ordered = rasteriser_ordered; hlsl_type_calculate_reg_size(ctx, type); list_add_tail(&ctx->types, &type->entry); return type; @@ -890,6 +890,8 @@ bool hlsl_types_are_equal(const struct hlsl_type *t1, const struct hlsl_type *t2 if (t1->base_type == HLSL_TYPE_TEXTURE && t1->sampler_dim != HLSL_SAMPLER_DIM_GENERIC && !hlsl_types_are_equal(t1->e.resource.format, t2->e.resource.format)) return false; + if (t1->base_type == HLSL_TYPE_UAV && t1->e.resource.rasteriser_ordered != t2->e.resource.rasteriser_ordered) + return false; } if ((t1->modifiers & HLSL_MODIFIER_ROW_MAJOR) != (t2->modifiers & HLSL_MODIFIER_ROW_MAJOR)) @@ -1009,7 +1011,10 @@ struct hlsl_type *hlsl_type_clone(struct hlsl_ctx *ctx, struct hlsl_type *old, if (type->base_type == HLSL_TYPE_TECHNIQUE) type->e.version = old->e.version; if (old->base_type == HLSL_TYPE_TEXTURE || old->base_type == HLSL_TYPE_UAV) + { type->e.resource.format = old->e.resource.format; + type->e.resource.rasteriser_ordered = old->e.resource.rasteriser_ordered; + } break; default: diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 5deac632..5b73857b 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -200,6 +200,8 @@ struct hlsl_type { /* Format of the data contained within the type. */ struct hlsl_type *format; + /* The type is a rasteriser-ordered view. */ + bool rasteriser_ordered; } resource; /* Additional field to distinguish object types. Currently used only for technique types. */ unsigned int version; @@ -370,11 +372,10 @@ struct hlsl_attribute #define HLSL_STORAGE_CENTROID 0x00004000 #define HLSL_STORAGE_NOPERSPECTIVE 0x00008000 #define HLSL_STORAGE_LINEAR 0x00010000 -#define HLSL_MODIFIER_RASTERIZER_ORDERED 0x00020000 #define HLSL_TYPE_MODIFIERS_MASK (HLSL_MODIFIER_PRECISE | HLSL_MODIFIER_VOLATILE | \ HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \ - HLSL_MODIFIER_COLUMN_MAJOR | HLSL_MODIFIER_RASTERIZER_ORDERED) + HLSL_MODIFIER_COLUMN_MAJOR) #define HLSL_INTERPOLATION_MODIFIERS_MASK (HLSL_STORAGE_NOINTERPOLATION | HLSL_STORAGE_CENTROID | \ HLSL_STORAGE_NOPERSPECTIVE | HLSL_STORAGE_LINEAR) @@ -1282,8 +1283,8 @@ struct hlsl_ir_var *hlsl_new_synthetic_var_named(struct hlsl_ctx *ctx, const cha struct hlsl_type *type, const struct vkd3d_shader_location *loc, bool dummy_scope); struct hlsl_type *hlsl_new_texture_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim, struct hlsl_type *format, unsigned int sample_count); -struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, - enum hlsl_sampler_dim dim, struct hlsl_type *format, uint32_t modifiers); +struct hlsl_type *hlsl_new_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim, + struct hlsl_type *format, bool rasteriser_ordered); struct hlsl_ir_node *hlsl_new_uint_constant(struct hlsl_ctx *ctx, unsigned int n, const struct vkd3d_shader_location *loc); struct hlsl_ir_node *hlsl_new_unary_expr(struct hlsl_ctx *ctx, enum hlsl_ir_expr_op op, struct hlsl_ir_node *arg, diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 5a5f77ed..dc7b4c1b 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -6263,12 +6263,12 @@ type_no_void: | uav_type '<' type '>' { validate_uav_type(ctx, $1, $3, &@3); - $$ = hlsl_new_uav_type(ctx, $1, $3, 0); + $$ = hlsl_new_uav_type(ctx, $1, $3, false); } | rov_type '<' type '>' { validate_uav_type(ctx, $1, $3, &@3); - $$ = hlsl_new_uav_type(ctx, $1, $3, HLSL_MODIFIER_RASTERIZER_ORDERED); + $$ = hlsl_new_uav_type(ctx, $1, $3, true); } | TYPE_IDENTIFIER { diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index 6561f1fb..10dde985 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -4259,6 +4259,9 @@ static void write_sm4_dcl_textures(const struct tpf_writer *tpf, const struct ex instr.opcode = VKD3D_SM5_OP_DCL_UAV_TYPED; break; } + + if (resource->data_type->e.resource.rasteriser_ordered) + instr.opcode |= VKD3DSUF_RASTERISER_ORDERED_VIEW << VKD3D_SM5_UAV_FLAGS_SHIFT; } else { @@ -4272,9 +4275,6 @@ static void write_sm4_dcl_textures(const struct tpf_writer *tpf, const struct ex instr.extra_bits |= component_type->sample_count << VKD3D_SM4_RESOURCE_SAMPLE_COUNT_SHIFT; } - if (resource->data_type->modifiers & HLSL_MODIFIER_RASTERIZER_ORDERED) - instr.opcode |= VKD3DSUF_RASTERISER_ORDERED_VIEW << VKD3D_SM5_UAV_FLAGS_SHIFT; - write_sm4_instruction(tpf, &instr); } }
1
0
0
0
Henri Verbeet : vkd3d-shader/hlsl: Introduce hlsl_type.e.resource.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: vkd3d Branch: master Commit: 49d14613a50d02abb9a03cc68c77409cc4d84ff2 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/49d14613a50d02abb9a03cc68c774…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Feb 19 13:57:54 2024 +0100 vkd3d-shader/hlsl: Introduce hlsl_type.e.resource. --- libs/vkd3d-shader/hlsl.c | 16 ++++++++-------- libs/vkd3d-shader/hlsl.h | 10 +++++++--- libs/vkd3d-shader/hlsl.y | 16 ++++++++-------- libs/vkd3d-shader/hlsl_codegen.c | 2 +- libs/vkd3d-shader/tpf.c | 6 +++--- 5 files changed, 27 insertions(+), 23 deletions(-)
1
0
0
0
Rémi Bernon : winevulkan: Remove now unnecessary vkGetPhysicalDevicePresentRectanglesKHR driver entry.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: d0eea21735a6600e19b7eaa12245d6c5619879aa URL:
https://gitlab.winehq.org/wine/wine/-/commit/d0eea21735a6600e19b7eaa12245d6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Nov 25 09:07:39 2023 +0100 winevulkan: Remove now unnecessary vkGetPhysicalDevicePresentRectanglesKHR driver entry. --- dlls/winemac.drv/vulkan.c | 1 - dlls/winevulkan/make_vulkan | 3 +-- dlls/winevulkan/vulkan.c | 2 +- dlls/winewayland.drv/vulkan.c | 15 --------------- dlls/winex11.drv/vulkan.c | 22 ---------------------- include/wine/vulkan_driver.h | 5 +---- 6 files changed, 3 insertions(+), 45 deletions(-) diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index bf0d66a30c0..11704d0a2ea 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -547,7 +547,6 @@ static const struct vulkan_funcs vulkan_funcs = macdrv_vkEnumerateInstanceExtensionProperties, macdrv_vkGetDeviceProcAddr, macdrv_vkGetInstanceProcAddr, - NULL, macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR, macdrv_vkGetPhysicalDeviceSurfaceFormatsKHR, macdrv_vkGetPhysicalDeviceWin32PresentationSupportKHR, diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 0030f6243d0..4417b3a04bf 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -160,7 +160,7 @@ PERF_CRITICAL_FUNCTIONS = [ # Functions part of our winevulkan graphics driver interface. # DRIVER_VERSION should be bumped on any change to driver interface # in FUNCTION_OVERRIDES -DRIVER_VERSION = 16 +DRIVER_VERSION = 17 # Table of functions for which we have a special implementation. # These are regular device / instance functions for which we need @@ -203,7 +203,6 @@ USER_DRIVER_FUNCS = { "vkEnumerateInstanceExtensionProperties", "vkGetDeviceProcAddr", "vkGetInstanceProcAddr", - "vkGetPhysicalDevicePresentRectanglesKHR", "vkGetPhysicalDeviceSurfaceFormats2KHR", "vkGetPhysicalDeviceSurfaceFormatsKHR", "vkGetPhysicalDeviceWin32PresentationSupportKHR", diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 8531fc82ddd..32cd900d83d 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1936,7 +1936,7 @@ VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice device_ha } return instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(physical_device->host_physical_device, - surface->driver_surface, rect_count, rects); + surface->host_surface, rect_count, rects); } VkResult wine_vkCreateDebugUtilsMessengerEXT(VkInstance handle, diff --git a/dlls/winewayland.drv/vulkan.c b/dlls/winewayland.drv/vulkan.c index 2ebe5be5641..35fa3b1eb85 100644 --- a/dlls/winewayland.drv/vulkan.c +++ b/dlls/winewayland.drv/vulkan.c @@ -60,7 +60,6 @@ static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocati static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *); static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *); -static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); static VkBool32 (*pvkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice, uint32_t, struct wl_display *); @@ -535,18 +534,6 @@ static void *wayland_vkGetInstanceProcAddr(VkInstance instance, const char *name return pvkGetInstanceProcAddr(instance, name); } -static VkResult wayland_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice phys_dev, - VkSurfaceKHR surface, - uint32_t *count, VkRect2D *rects) -{ - struct wine_vk_surface *wine_vk_surface = wine_vk_surface_from_handle(surface); - - TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), count, rects); - - return pvkGetPhysicalDevicePresentRectanglesKHR(phys_dev, wine_vk_surface->host_surface, - count, rects); -} - static VkResult wayland_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, @@ -662,7 +649,6 @@ static void wine_vk_init(void) LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties); LOAD_FUNCPTR(vkGetDeviceProcAddr); LOAD_FUNCPTR(vkGetInstanceProcAddr); - LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR); LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR); LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR); LOAD_FUNCPTR(vkGetPhysicalDeviceWaylandPresentationSupportKHR); @@ -689,7 +675,6 @@ static const struct vulkan_funcs vulkan_funcs = .p_vkEnumerateInstanceExtensionProperties = wayland_vkEnumerateInstanceExtensionProperties, .p_vkGetDeviceProcAddr = wayland_vkGetDeviceProcAddr, .p_vkGetInstanceProcAddr = wayland_vkGetInstanceProcAddr, - .p_vkGetPhysicalDevicePresentRectanglesKHR = wayland_vkGetPhysicalDevicePresentRectanglesKHR, .p_vkGetPhysicalDeviceSurfaceFormats2KHR = wayland_vkGetPhysicalDeviceSurfaceFormats2KHR, .p_vkGetPhysicalDeviceSurfaceFormatsKHR = wayland_vkGetPhysicalDeviceSurfaceFormatsKHR, .p_vkGetPhysicalDeviceWin32PresentationSupportKHR = wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR, diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index ecd85314f32..de00ccc34fa 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -83,7 +83,6 @@ static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocati static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *); static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *); -static VkResult (*pvkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice, uint32_t, Display *, VisualID); @@ -126,7 +125,6 @@ static void wine_vk_init(void) LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR); LOAD_FUNCPTR(vkGetSwapchainImagesKHR); LOAD_FUNCPTR(vkQueuePresentKHR); - LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR); #undef LOAD_FUNCPTR #undef LOAD_OPTIONAL_FUNCPTR @@ -477,25 +475,6 @@ static void *X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char *name) return pvkGetInstanceProcAddr(instance, name); } -static VkResult X11DRV_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice phys_dev, - VkSurfaceKHR surface, uint32_t *count, VkRect2D *rects) -{ - struct wine_vk_surface *x11_surface = surface_from_handle(surface); - - TRACE("%p, 0x%s, %p, %p\n", phys_dev, wine_dbgstr_longlong(surface), count, rects); - - if (!x11_surface->hwnd) - { - if (rects) - return VK_ERROR_SURFACE_LOST_KHR; - - *count = 1; - return VK_SUCCESS; - } - - return pvkGetPhysicalDevicePresentRectanglesKHR( phys_dev, x11_surface->host_surface, count, rects ); -} - static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev, const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, VkSurfaceFormat2KHR *formats) { @@ -609,7 +588,6 @@ static const struct vulkan_funcs vulkan_funcs = X11DRV_vkEnumerateInstanceExtensionProperties, X11DRV_vkGetDeviceProcAddr, X11DRV_vkGetInstanceProcAddr, - X11DRV_vkGetPhysicalDevicePresentRectanglesKHR, X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR, X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR, X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR, diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index 38500d4f801..1dd8dcadaed 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -13,7 +13,7 @@ #define __WINE_VULKAN_DRIVER_H /* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */ -#define WINE_VULKAN_DRIVER_VERSION 16 +#define WINE_VULKAN_DRIVER_VERSION 17 struct vulkan_funcs { @@ -30,7 +30,6 @@ struct vulkan_funcs VkResult (*p_vkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *); void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *); - VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *); VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); VkBool32 (*p_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice, uint32_t); @@ -84,8 +83,6 @@ static inline void *get_vulkan_driver_instance_proc_addr( return vulkan_funcs->p_vkDestroySurfaceKHR; if (!strcmp(name, "GetInstanceProcAddr")) return vulkan_funcs->p_vkGetInstanceProcAddr; - if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR")) - return vulkan_funcs->p_vkGetPhysicalDevicePresentRectanglesKHR; if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR")) return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormats2KHR; if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR"))
1
0
0
0
Rémi Bernon : winevulkan: Handle invalid window in vkGetPhysicalDevicePresentRectanglesKHR.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: b541b9661a2f10ace004a5384976ba29e5c0da03 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b541b9661a2f10ace004a5384976ba…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Dec 10 10:30:49 2023 +0100 winevulkan: Handle invalid window in vkGetPhysicalDevicePresentRectanglesKHR. --- dlls/vulkan-1/tests/vulkan.c | 6 +----- dlls/winevulkan/make_vulkan | 1 + dlls/winevulkan/vulkan.c | 19 +++++++++++++++++++ dlls/winevulkan/vulkan_thunks.c | 4 ++-- dlls/winevulkan/vulkan_thunks.h | 1 + 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index 371aef14255..716a524e796 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -656,14 +656,10 @@ static void test_win32_surface_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_ if (IsWindow(hwnd)) ok(vr == VK_SUCCESS, "Got unexpected vr %d.\n", vr); else - { - todo_wine ok(vr == VK_SUCCESS /* Nvidia */ || vr == VK_ERROR_UNKNOWN /* AMD */, "Got unexpected vr %d.\n", vr); - } memset(&rect, 0xcc, sizeof(rect)); vr = pvkGetPhysicalDevicePresentRectanglesKHR(vk_physical_device, surface, &count, &rect); - todo_wine_if(!IsWindow(hwnd)) ok(vr == VK_SUCCESS /* Nvidia */ || vr == VK_ERROR_UNKNOWN /* AMD */, "Got unexpected vr %d.\n", vr); if (vr == VK_SUCCESS) { @@ -676,7 +672,7 @@ static void test_win32_surface_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_ }; ok(count == 1, "Got unexpected count %u.\n", count); - todo_wine_if(IsRectEmpty(&client_rect)) + todo_wine_if(IsWindow(hwnd) && IsRectEmpty(&client_rect)) ok(EqualRect(&tmp_rect, &client_rect), "Got unexpected rect %s.\n", wine_dbgstr_rect(&tmp_rect)); } diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index c98ce300be6..0030f6243d0 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -259,6 +259,7 @@ MANUAL_UNIX_THUNKS = { "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", "vkGetPhysicalDeviceImageFormatProperties2", "vkGetPhysicalDeviceImageFormatProperties2KHR", + "vkGetPhysicalDevicePresentRectanglesKHR", "vkGetPhysicalDeviceSurfaceCapabilities2KHR", "vkGetPhysicalDeviceSurfaceCapabilitiesKHR", "vkMapMemory", diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 045f984731e..8531fc82ddd 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1920,6 +1920,25 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice device return res; } +VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice device_handle, VkSurfaceKHR surface_handle, + uint32_t *rect_count, VkRect2D *rects) +{ + struct wine_phys_dev *physical_device = wine_phys_dev_from_handle(device_handle); + struct wine_surface *surface = wine_surface_from_handle(surface_handle); + struct wine_instance *instance = physical_device->instance; + + if (!NtUserIsWindow(surface->hwnd)) + { + if (rects && !*rect_count) return VK_INCOMPLETE; + if (rects) memset(rects, 0, sizeof(VkRect2D)); + *rect_count = 1; + return VK_SUCCESS; + } + + return instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(physical_device->host_physical_device, + surface->driver_surface, rect_count, rects); +} + VkResult wine_vkCreateDebugUtilsMessengerEXT(VkInstance handle, const VkDebugUtilsMessengerCreateInfoEXT *create_info, const VkAllocationCallbacks *allocator, diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index ce61f5cc9cf..3667fc51d90 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -43065,7 +43065,7 @@ static NTSTATUS thunk64_vkGetPhysicalDevicePresentRectanglesKHR(void *args) TRACE("%p, 0x%s, %p, %p\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pRectCount, params->pRects); - params->result = wine_phys_dev_from_handle(params->physicalDevice)->instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(wine_phys_dev_from_handle(params->physicalDevice)->host_physical_device, wine_surface_from_handle(params->surface)->driver_surface, params->pRectCount, params->pRects); + params->result = wine_vkGetPhysicalDevicePresentRectanglesKHR(params->physicalDevice, params->surface, params->pRectCount, params->pRects); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -43083,7 +43083,7 @@ static NTSTATUS thunk32_vkGetPhysicalDevicePresentRectanglesKHR(void *args) TRACE("%#x, 0x%s, %#x, %#x\n", params->physicalDevice, wine_dbgstr_longlong(params->surface), params->pRectCount, params->pRects); - params->result = wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->instance->funcs.p_vkGetPhysicalDevicePresentRectanglesKHR(wine_phys_dev_from_handle((VkPhysicalDevice)UlongToPtr(params->physicalDevice))->host_physical_device, wine_surface_from_handle(params->surface)->driver_surface, (uint32_t *)UlongToPtr(params->pRectCount), (VkRect2D *)UlongToPtr(params->pRects)); + params->result = wine_vkGetPhysicalDevicePresentRectanglesKHR((VkPhysicalDevice)UlongToPtr(params->physicalDevice), params->surface, (uint32_t *)UlongToPtr(params->pRectCount), (VkRect2D *)UlongToPtr(params->pRects)); return STATUS_SUCCESS; } diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 2c2712291c1..28a8d8a0090 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -58,6 +58,7 @@ void wine_vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physic void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo *pExternalSemaphoreInfo, VkExternalSemaphoreProperties *pExternalSemaphoreProperties); VkResult wine_vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties); VkResult wine_vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo, VkImageFormatProperties2 *pImageFormatProperties); +VkResult wine_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pRectCount, VkRect2D *pRects); VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities); VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities); VkResult wine_vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData);
1
0
0
0
Rémi Bernon : winevulkan: Handle invalid window in vkCreateSwapchainKHR.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: 9a1362695b9ca08885ce68fd867cd2e129473d52 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9a1362695b9ca08885ce68fd867cd2…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Nov 25 01:44:49 2023 +0100 winevulkan: Handle invalid window in vkCreateSwapchainKHR. --- dlls/vulkan-1/tests/vulkan.c | 2 -- dlls/winevulkan/vulkan.c | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index e2ab609925b..371aef14255 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -858,7 +858,6 @@ static void test_win32_surface(VkInstance instance, VkPhysicalDevice physical_de swapchain = 0xdeadbeef; vr = create_swapchain(physical_device, surface, device, NULL, &swapchain); - todo_wine ok(vr == VK_ERROR_INITIALIZATION_FAILED /* Nvidia */ || vr == VK_SUCCESS /* AMD */, "Got unexpected vr %d.\n", vr); if (vr == VK_SUCCESS) @@ -928,7 +927,6 @@ static void test_win32_surface(VkInstance instance, VkPhysicalDevice physical_de swapchain = 0xdeadbeef; vr = create_swapchain(physical_device, surface, device, hwnd, &swapchain); - todo_wine ok(vr == VK_ERROR_INITIALIZATION_FAILED /* Nvidia */ || vr == VK_SUCCESS /* AMD */, "Got unexpected vr %d.\n", vr); if (vr == VK_SUCCESS) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 5d9d9e452b8..045f984731e 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1570,6 +1570,12 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea VkSurfaceCapabilitiesKHR capabilities; VkResult res; + if (!NtUserIsWindow(surface->hwnd)) + { + ERR("surface %p, hwnd %p is invalid!\n", surface, surface->hwnd); + return VK_ERROR_INITIALIZATION_FAILED; + } + if (surface) create_info_host.surface = surface->driver_surface; if (old_swapchain) create_info_host.oldSwapchain = old_swapchain->host_swapchain;
1
0
0
0
Rémi Bernon : winex11: Remove now unnecessary create_info HWND checks.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: 0d969b1764b08dccf8cc87e1b742ba983feac634 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0d969b1764b08dccf8cc87e1b742ba…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Nov 25 15:20:40 2023 +0100 winex11: Remove now unnecessary create_info HWND checks. --- dlls/winex11.drv/vulkan.c | 21 ++++++--------------- dlls/winex11.drv/window.c | 18 ------------------ dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 6 insertions(+), 34 deletions(-) diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index d812d9e8972..ecd85314f32 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -304,7 +304,7 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance, FIXME("Support for allocation callbacks not implemented yet\n"); /* TODO: support child window rendering. */ - if (create_info->hwnd && NtUserGetAncestor(create_info->hwnd, GA_PARENT) != NtUserGetDesktopWindow()) + if (NtUserGetAncestor( create_info->hwnd, GA_PARENT ) != NtUserGetDesktopWindow()) { FIXME("Application requires child window rendering, which is not implemented yet!\n"); return VK_ERROR_INCOMPATIBLE_DRIVER; @@ -316,15 +316,8 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance, x11_surface->ref = 1; x11_surface->hwnd = create_info->hwnd; - if (x11_surface->hwnd) - { - x11_surface->window = create_client_window(create_info->hwnd, &default_visual); - x11_surface->hwnd_thread_id = NtUserGetWindowThread(x11_surface->hwnd, NULL); - } - else - { - x11_surface->window = create_dummy_client_window(); - } + x11_surface->window = create_client_window( create_info->hwnd, &default_visual ); + x11_surface->hwnd_thread_id = NtUserGetWindowThread( x11_surface->hwnd, NULL ); if (!x11_surface->window) { @@ -349,11 +342,9 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance, } pthread_mutex_lock(&vulkan_mutex); - if (x11_surface->hwnd) - { - wine_vk_surface_destroy( x11_surface->hwnd ); - XSaveContext(gdi_display, (XID)create_info->hwnd, vulkan_hwnd_context, (char *)wine_vk_surface_grab(x11_surface)); - } + wine_vk_surface_destroy( x11_surface->hwnd ); + XSaveContext( gdi_display, (XID)create_info->hwnd, vulkan_hwnd_context, + (char *)wine_vk_surface_grab( x11_surface ) ); list_add_tail(&surface_list, &x11_surface->entry); pthread_mutex_unlock(&vulkan_mutex); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 8ab694450ef..84878e95e37 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1587,24 +1587,6 @@ Window get_dummy_parent(void) } -/********************************************************************** - * create_dummy_client_window - */ -Window create_dummy_client_window(void) -{ - XSetWindowAttributes attr; - - attr.colormap = default_colormap; - attr.bit_gravity = NorthWestGravity; - attr.win_gravity = NorthWestGravity; - attr.backing_store = NotUseful; - attr.border_pixel = 0; - - return XCreateWindow( gdi_display, get_dummy_parent(), 0, 0, 1, 1, 0, - default_visual.depth, InputOutput, default_visual.visual, - CWBitGravity | CWWinGravity | CWBackingStore | CWColormap | CWBorderPixel, &attr ); -} - /********************************************************************** * create_client_window */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 71a3582ff76..9c1b8012466 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -653,7 +653,6 @@ extern void update_user_time( Time time ); extern void read_net_wm_states( Display *display, struct x11drv_win_data *data ); extern void update_net_wm_states( struct x11drv_win_data *data ); extern void make_window_embedded( struct x11drv_win_data *data ); -extern Window create_dummy_client_window(void); extern Window create_client_window( HWND hwnd, const XVisualInfo *visual ); extern void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis, BOOL use_alpha ); extern void change_systray_owner( Display *display, Window systray_window );
1
0
0
0
Rémi Bernon : winevulkan: Handle creation of surfaces with no HWND directly.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: 8ba1b27f23684b4c26e33e60bfdcd47c998a79f6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8ba1b27f23684b4c26e33e60bfdcd4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sat Nov 25 15:15:44 2023 +0100 winevulkan: Handle creation of surfaces with no HWND directly. --- dlls/winevulkan/vulkan.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 9123e65da4c..5d9d9e452b8 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1503,18 +1503,31 @@ VkResult wine_vkCreateWin32SurfaceKHR(VkInstance handle, const VkWin32SurfaceCre const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface) { struct wine_instance *instance = wine_instance_from_handle(handle); + VkWin32SurfaceCreateInfoKHR create_info_host = *create_info; struct wine_surface *object; + HWND dummy = NULL; VkResult res; if (allocator) FIXME("Support for allocation callbacks not implemented yet\n"); if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY; - object->hwnd = create_info->hwnd; - res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, create_info, + /* Windows allows surfaces to be created with no HWND, they return VK_ERROR_SURFACE_LOST_KHR later */ + if (!(object->hwnd = create_info->hwnd)) + { + static const WCHAR staticW[] = {'s','t','a','t','i','c',0}; + UNICODE_STRING static_us = RTL_CONSTANT_STRING(staticW); + dummy = NtUserCreateWindowEx(0, &static_us, &static_us, &static_us, WS_POPUP, + 0, 0, 0, 0, NULL, NULL, NULL, NULL, 0, NULL, 0, FALSE); + WARN("Created dummy window %p for null surface window\n", dummy); + create_info_host.hwnd = object->hwnd = dummy; + } + + res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, &create_info_host, NULL /* allocator */, &object->driver_surface); if (res != VK_SUCCESS) { + if (dummy) NtUserDestroyWindow(dummy); free(object); return res; } @@ -1522,6 +1535,9 @@ VkResult wine_vkCreateWin32SurfaceKHR(VkInstance handle, const VkWin32SurfaceCre object->host_surface = vk_funcs->p_wine_get_host_surface(object->driver_surface); WINE_VK_ADD_NON_DISPATCHABLE_MAPPING(instance, object, object->host_surface, object); + *surface = wine_surface_to_handle(object); + if (dummy) NtUserDestroyWindow(dummy); + *surface = wine_surface_to_handle(object); return VK_SUCCESS;
1
0
0
0
Ivo Ivanov : hidclass.sys: Use HID_DEVICE in the mfg_section to match the recent changes.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: e24cf32f810b73556bbf7c51584de45224721d3e URL:
https://gitlab.winehq.org/wine/wine/-/commit/e24cf32f810b73556bbf7c51584de4…
Author: Ivo Ivanov <logos128(a)gmail.com> Date: Wed Feb 21 13:09:52 2024 +0200 hidclass.sys: Use HID_DEVICE in the mfg_section to match the recent changes. --- dlls/hidclass.sys/input.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/hidclass.sys/input.inf b/dlls/hidclass.sys/input.inf index d9222b13672..8be8335edad 100644 --- a/dlls/hidclass.sys/input.inf +++ b/dlls/hidclass.sys/input.inf @@ -7,7 +7,7 @@ Class=HIDClass Wine=mfg_section [mfg_section] -Wine HID device=device_section,HID\ +Wine HID device=device_section,HID_DEVICE [device_section.Services] AddService = ,0x2
1
0
0
0
Rémi Bernon : winegstreamer: Rename struct h264_decoder to struct video_decoder.
by Alexandre Julliard
21 Feb '24
21 Feb '24
Module: wine Branch: master Commit: 437d304c7249f55329c14b3d30533e98daa62291 URL:
https://gitlab.winehq.org/wine/wine/-/commit/437d304c7249f55329c14b3d30533e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Jan 23 12:14:03 2024 +0100 winegstreamer: Rename struct h264_decoder to struct video_decoder. --- MAINTAINERS | 2 +- dlls/winegstreamer/Makefile.in | 2 +- .../{h264_decoder.c => video_decoder.c} | 56 +++++++++++----------- 3 files changed, 30 insertions(+), 30 deletions(-)
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
72
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
Results per page:
10
25
50
100
200