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
October 2021
----- 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
2 participants
1165 discussions
Start a n
N
ew thread
Zebediah Figura : wined3d: Move the "coherent" field from struct wined3d_bo_gl to struct wined3d_bo.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: wine Branch: master Commit: 2d05178b28a74064f1600caf9642d6f8dda16fbc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d05178b28a74064f1600caf…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Oct 14 23:44:17 2021 -0500 wined3d: Move the "coherent" field from struct wined3d_bo_gl to struct wined3d_bo. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/adapter_vk.c | 4 ++-- dlls/wined3d/context_gl.c | 6 +++--- dlls/wined3d/context_vk.c | 1 + dlls/wined3d/resource.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 8c3e63aac49..ffeffb4d145 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -983,7 +983,7 @@ static void *adapter_vk_map_bo_address(struct wined3d_context *context, wined3d_context_vk_reference_bo(context_vk, bo); } - if (!(bo->memory_type & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) + if (!bo->b.coherent) { range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; range.pNext = NULL; @@ -1024,7 +1024,7 @@ static void adapter_vk_unmap_bo_address(struct wined3d_context *context, vk_info = context_vk->vk_info; device_vk = wined3d_device_vk(context->device); - if (!(bo->memory_type & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) + if (!bo->b.coherent) { range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; range.pNext = NULL; diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 4510fe5b155..2bc63464f7b 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2684,7 +2684,7 @@ static void *wined3d_bo_gl_map(struct wined3d_bo_gl *bo, if ((flags & WINED3D_MAP_DISCARD) && bo->command_fence_id > device_gl->completed_fence_id) { if (wined3d_context_gl_create_bo(context_gl, bo->size, - bo->binding, bo->usage, bo->coherent, bo->flags, &tmp)) + bo->binding, bo->usage, bo->b.coherent, bo->flags, &tmp)) { list_move_head(&tmp.b.users, &bo->b.users); wined3d_context_gl_destroy_bo(context_gl, bo); @@ -2754,7 +2754,7 @@ void wined3d_context_gl_unmap_bo_address(struct wined3d_context_gl *context_gl, gl_info = context_gl->gl_info; wined3d_context_gl_bind_bo(context_gl, bo->binding, bo->id); - if (!bo->coherent) + if (!bo->b.coherent) { if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { @@ -2889,7 +2889,7 @@ bool wined3d_context_gl_create_bo(struct wined3d_context_gl *context_gl, GLsizei bo->binding = binding; bo->usage = usage; bo->flags = flags; - bo->coherent = coherent; + bo->b.coherent = coherent; list_init(&bo->b.users); bo->command_fence_id = 0; bo->b.memory_offset = 0; diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index ad2f7adfe0b..8e055202ec2 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -492,6 +492,7 @@ BOOL wined3d_context_vk_create_bo(struct wined3d_context_vk *context_vk, VkDevic bo->size = size; bo->usage = usage; bo->memory_type = adapter_vk->memory_properties.memoryTypes[memory_type_idx].propertyFlags; + bo->b.coherent = !!(bo->memory_type & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); list_init(&bo->b.users); bo->command_buffer_id = 0; bo->slab = NULL; diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index abf07682c76..c8fb4cf2e29 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -395,7 +395,7 @@ GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d if (d3d_flags & WINED3D_MAP_WRITE) { ret |= GL_MAP_WRITE_BIT; - if (!bo->coherent) + if (!bo->b.coherent) ret |= GL_MAP_FLUSH_EXPLICIT_BIT; } if (d3d_flags & WINED3D_MAP_READ) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 41956f1f061..993d0b3c4e4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1592,6 +1592,7 @@ struct wined3d_bo { struct list users; size_t memory_offset; + bool coherent; }; struct wined3d_bo_gl @@ -1604,7 +1605,6 @@ struct wined3d_bo_gl GLenum usage; GLbitfield flags; - bool coherent; uint64_t command_fence_id; };
1
0
0
0
Zebediah Figura : wined3d: Omit GL_MAP_FLUSH_EXPLICIT_BIT for incoherent maps when ARB_MAP_BUFFER_RANGE is used.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: wine Branch: master Commit: 86e4d3aa8c971182661ad07afe0499dd598cb3fe URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86e4d3aa8c971182661ad07a…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Oct 14 23:44:16 2021 -0500 wined3d: Omit GL_MAP_FLUSH_EXPLICIT_BIT for incoherent maps when ARB_MAP_BUFFER_RANGE is used. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context_gl.c | 27 +++++++++++++++------------ dlls/wined3d/resource.c | 8 ++++++-- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index b08003c697a..4510fe5b155 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2712,7 +2712,7 @@ map: if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { - map_ptr = GL_EXTCALL(glMapBufferRange(bo->binding, offset, size, wined3d_resource_gl_map_flags(flags))); + map_ptr = GL_EXTCALL(glMapBufferRange(bo->binding, offset, size, wined3d_resource_gl_map_flags(bo, flags))); } else { @@ -2754,21 +2754,24 @@ void wined3d_context_gl_unmap_bo_address(struct wined3d_context_gl *context_gl, gl_info = context_gl->gl_info; wined3d_context_gl_bind_bo(context_gl, bo->binding, bo->id); - if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + if (!bo->coherent) { - for (i = 0; i < range_count; ++i) + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { - GL_EXTCALL(glFlushMappedBufferRange(bo->binding, - (UINT_PTR)data->addr + ranges[i].offset, ranges[i].size)); + for (i = 0; i < range_count; ++i) + { + GL_EXTCALL(glFlushMappedBufferRange(bo->binding, + (UINT_PTR)data->addr + ranges[i].offset, ranges[i].size)); + } } - } - else if (!bo->coherent && gl_info->supported[APPLE_FLUSH_BUFFER_RANGE]) - { - for (i = 0; i < range_count; ++i) + else if (gl_info->supported[APPLE_FLUSH_BUFFER_RANGE]) { - GL_EXTCALL(glFlushMappedBufferRangeAPPLE(bo->binding, - (uintptr_t)data->addr + ranges[i].offset, ranges[i].size)); - checkGLcall("glFlushMappedBufferRangeAPPLE"); + for (i = 0; i < range_count; ++i) + { + GL_EXTCALL(glFlushMappedBufferRangeAPPLE(bo->binding, + (uintptr_t)data->addr + ranges[i].offset, ranges[i].size)); + checkGLcall("glFlushMappedBufferRangeAPPLE"); + } } } diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 8f31996595c..abf07682c76 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -388,12 +388,16 @@ GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *reso return flags; } -GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) +GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d3d_flags) { GLbitfield ret = 0; if (d3d_flags & WINED3D_MAP_WRITE) - ret |= GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + { + ret |= GL_MAP_WRITE_BIT; + if (!bo->coherent) + ret |= GL_MAP_FLUSH_EXPLICIT_BIT; + } if (d3d_flags & WINED3D_MAP_READ) ret |= GL_MAP_READ_BIT; else diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 161d36ad76c..41956f1f061 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4217,7 +4217,7 @@ void wined3d_resource_free_sysmem(struct wined3d_resource *resource) DECLSPEC_HI const struct wined3d_format *wined3d_resource_get_decompress_format( const struct wined3d_resource *resource) DECLSPEC_HIDDEN; unsigned int wined3d_resource_get_sample_count(const struct wined3d_resource *resource) DECLSPEC_HIDDEN; -GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; +GLbitfield wined3d_resource_gl_map_flags(const struct wined3d_bo_gl *bo, DWORD d3d_flags) DECLSPEC_HIDDEN; GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; GLbitfield wined3d_resource_gl_storage_flags(const struct wined3d_resource *resource) DECLSPEC_HIDDEN; BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : include: Use the standard va_list instead of __ms_va_list when building with msvcrt.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: wine Branch: master Commit: 2a92c58e1152e1d80395cf31d7cd3f282d094540 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a92c58e1152e1d80395cf31…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 15 18:07:41 2021 +0200 include: Use the standard va_list instead of __ms_va_list when building with msvcrt. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/action.c | 2 +- dlls/msi/msipriv.h | 2 +- dlls/msvcrt/undname.c | 2 +- dlls/rsaenh/mpi.c | 4 +- dlls/rsaenh/tomcrypt.h | 4 +- dlls/ucrtbase/printf.c | 4 +- include/msvcrt/corecrt.h | 26 +++--- include/msvcrt/corecrt_wstdio.h | 174 ++++++++++++++++++++-------------------- include/msvcrt/stdio.h | 162 ++++++++++++++++++------------------- programs/winedbg/dbg.y | 2 +- programs/winedbg/debugger.h | 4 +- programs/winedbg/expr.c | 2 +- 12 files changed, 191 insertions(+), 197 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2a92c58e1152e1d80395…
1
0
0
0
Alexandre Julliard : include: Define fpclassify().
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: wine Branch: master Commit: 29717168359b152fe7a8d7dd53d990955692d693 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=29717168359b152fe7a8d7dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 15 11:05:38 2021 +0200 include: Define fpclassify(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/msvcrt/math.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/msvcrt/math.h b/include/msvcrt/math.h index d4db618f542..da07303bcd9 100644 --- a/include/msvcrt/math.h +++ b/include/msvcrt/math.h @@ -251,11 +251,22 @@ static const union { #define FP_ILOGB0 (-0x7fffffff - _C2) #define FP_ILOGBNAN 0x7fffffff +#if _MSVCR_VER >= 120 + _ACRTIMP short __cdecl _dclass(double); _ACRTIMP short __cdecl _fdclass(float); _ACRTIMP int __cdecl _dsign(double); _ACRTIMP int __cdecl _fdsign(float); +#define fpclassify(x) (sizeof(x) == sizeof(float) ? _fdclass(x) : _dclass(x)) +#define signbit(x) (sizeof(x) == sizeof(float) ? _fdsign(x) : _dsign(x)) +#define isinf(x) (fpclassify(x) == FP_INFINITE) +#define isnan(x) (fpclassify(x) == FP_NAN) +#define isnormal(x) (fpclassify(x) == FP_NORMAL) +#define isfinite(x) (fpclassify(x) <= 0) + +#else + static inline int __isnanf(float x) { union { float x; unsigned int i; } u = { x }; @@ -303,6 +314,8 @@ static inline int __signbit(double x) #define signbit(x) (sizeof(x) == sizeof(float) ? __signbitf(x) : __signbit(x)) #define isfinite(x) (!isinf(x) && !isnan(x)) +#endif + #ifdef __cplusplus } #endif
1
0
0
0
Alexandre Julliard : msvcrt: Move _fdclass/_dclass to avoid forward references.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: wine Branch: master Commit: da8176df6178e1dbf076fc2a88979e481cba13a0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da8176df6178e1dbf076fc2a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Oct 15 11:05:13 2021 +0200 msvcrt: Move _fdclass/_dclass to avoid forward references. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 60 +++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 7f59a4d20d4..3af44f83a08 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -703,6 +703,36 @@ static const UINT64 exp2f_T[] = { }; #endif +/********************************************************************* + * _fdclass (MSVCR120.@) + * + * Copied from musl: src/math/__fpclassifyf.c + */ +short CDECL _fdclass(float x) +{ + union { float f; UINT32 i; } u = { x }; + int e = u.i >> 23 & 0xff; + + if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; + if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE; + return FP_NORMAL; +} + +/********************************************************************* + * _dclass (MSVCR120.@) + * + * Copied from musl: src/math/__fpclassify.c + */ +short CDECL _dclass(double x) +{ + union { double f; UINT64 i; } u = { x }; + int e = u.i >> 52 & 0x7ff; + + if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; + if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE; + return FP_NORMAL; +} + #ifndef __i386__ /********************************************************************* @@ -7827,36 +7857,6 @@ void __cdecl __libm_sse2_sqrt_precise(void) } #endif /* __i386__ */ -/********************************************************************* - * _fdclass (MSVCR120.@) - * - * Copied from musl: src/math/__fpclassifyf.c - */ -short CDECL _fdclass(float x) -{ - union { float f; UINT32 i; } u = { x }; - int e = u.i >> 23 & 0xff; - - if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; - if (e == 0xff) return u.i << 9 ? FP_NAN : FP_INFINITE; - return FP_NORMAL; -} - -/********************************************************************* - * _dclass (MSVCR120.@) - * - * Copied from musl: src/math/__fpclassify.c - */ -short CDECL _dclass(double x) -{ - union { double f; UINT64 i; } u = { x }; - int e = u.i >> 52 & 0x7ff; - - if (!e) return u.i << 1 ? FP_SUBNORMAL : FP_ZERO; - if (e == 0x7ff) return (u.i << 12) ? FP_NAN : FP_INFINITE; - return FP_NORMAL; -} - #if _MSVCR_VER>=120 /*********************************************************************
1
0
0
0
Conor McCarthy : vkd3d: Pass descriptor offset info to vkd3d-shader for graphics pipelines.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: vkd3d Branch: master Commit: 3948056256eb891c7991fc6a0309bf8e5369f6bc URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=3948056256eb891c7991fc6…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri Oct 15 01:37:46 2021 +0200 vkd3d: Pass descriptor offset info to vkd3d-shader for graphics pipelines. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index e27c98e..ef74d7f 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -2403,6 +2403,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s struct vkd3d_shader_transform_feedback_info xfb_info; struct vkd3d_shader_spirv_target_info ps_target_info; struct vkd3d_shader_interface_info shader_interface; + struct vkd3d_shader_descriptor_offset_info offset_info; struct vkd3d_shader_spirv_target_info *target_info; const struct d3d12_root_signature *root_signature; struct vkd3d_shader_signature input_signature; @@ -2643,6 +2644,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s shader_interface.combined_samplers = NULL; shader_interface.combined_sampler_count = 0; + if (root_signature->descriptor_offsets) + { + offset_info.type = VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO; + offset_info.next = NULL; + offset_info.binding_offsets = root_signature->descriptor_offsets; + offset_info.uav_counter_offsets = NULL; + vkd3d_prepend_struct(&shader_interface, &offset_info); + } + for (i = 0; i < ARRAY_SIZE(shader_stages); ++i) { struct vkd3d_shader_scan_descriptor_info shader_info =
1
0
0
0
Conor McCarthy : vkd3d: Pass descriptor offset info to vkd3d-shader for compute pipelines.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: vkd3d Branch: master Commit: 1edbd3d6989ffea6bbfe0841d4673a2744e8ccc3 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=1edbd3d6989ffea6bbfe084…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri Oct 15 01:37:45 2021 +0200 vkd3d: Pass descriptor offset info to vkd3d-shader for compute pipelines. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 30 ++++++++++++++++++++++++------ libs/vkd3d/vkd3d_private.h | 1 + tests/d3d12.c | 1 - 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 29d8618..e27c98e 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -91,6 +91,7 @@ static void d3d12_root_signature_cleanup(struct d3d12_root_signature *root_signa if (root_signature->descriptor_mapping) vkd3d_free(root_signature->descriptor_mapping); + vkd3d_free(root_signature->descriptor_offsets); if (root_signature->root_constants) vkd3d_free(root_signature->root_constants); @@ -713,10 +714,11 @@ static HRESULT d3d12_root_signature_init_descriptor_array_binding(struct d3d12_r } static void d3d12_root_signature_map_vk_unbounded_binding(struct d3d12_root_signature *root_signature, - const struct d3d12_root_descriptor_table_range *range, bool buffer_descriptor, + const struct d3d12_root_descriptor_table_range *range, unsigned int descriptor_offset, bool buffer_descriptor, enum vkd3d_shader_visibility shader_visibility, struct vkd3d_descriptor_set_context *context) { - struct vkd3d_shader_resource_binding *mapping = &root_signature->descriptor_mapping[context->descriptor_index++]; + struct vkd3d_shader_resource_binding *mapping = &root_signature->descriptor_mapping[context->descriptor_index]; + unsigned int *offset = &root_signature->descriptor_offsets[context->descriptor_index++]; mapping->type = range->type; mapping->register_space = range->register_space; @@ -727,18 +729,21 @@ static void d3d12_root_signature_map_vk_unbounded_binding(struct d3d12_root_sign || range->type == VKD3D_SHADER_DESCRIPTOR_TYPE_UAV) && !buffer_descriptor); mapping->binding.binding = range->binding; mapping->binding.count = range->vk_binding_count; + *offset = descriptor_offset; } static void d3d12_root_signature_map_descriptor_unbounded_binding(struct d3d12_root_signature *root_signature, - const struct d3d12_root_descriptor_table_range *range, + const struct d3d12_root_descriptor_table_range *range, unsigned int descriptor_offset, enum vkd3d_shader_visibility shader_visibility, struct vkd3d_descriptor_set_context *context) { bool is_buffer = range->type == VKD3D_SHADER_DESCRIPTOR_TYPE_CBV; if (range->type == VKD3D_SHADER_DESCRIPTOR_TYPE_SRV || range->type == VKD3D_SHADER_DESCRIPTOR_TYPE_UAV) - d3d12_root_signature_map_vk_unbounded_binding(root_signature, range, true, shader_visibility, context); + d3d12_root_signature_map_vk_unbounded_binding(root_signature, range, + descriptor_offset, true, shader_visibility, context); - d3d12_root_signature_map_vk_unbounded_binding(root_signature, range, is_buffer, shader_visibility, context); + d3d12_root_signature_map_vk_unbounded_binding(root_signature, range, + descriptor_offset, is_buffer, shader_visibility, context); } static int compare_register_range(const void *a, const void *b) @@ -882,7 +887,7 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo range->binding = base_range->binding; range->vk_binding_count = base_range->vk_binding_count - rel_offset; d3d12_root_signature_map_descriptor_unbounded_binding(root_signature, range, - shader_visibility, context); + rel_offset, shader_visibility, context); continue; } else if (range->descriptor_count == UINT_MAX) @@ -1165,6 +1170,9 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa if (!(root_signature->descriptor_mapping = vkd3d_calloc(root_signature->binding_count, sizeof(*root_signature->descriptor_mapping)))) goto fail; + if (!(root_signature->descriptor_offsets = vkd3d_calloc(root_signature->binding_count, + sizeof(*root_signature->descriptor_offsets)))) + goto fail; root_signature->root_constant_count = info.root_constant_count; if (!(root_signature->root_constants = vkd3d_calloc(root_signature->root_constant_count, sizeof(*root_signature->root_constants)))) @@ -1878,6 +1886,7 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs; struct vkd3d_shader_scan_descriptor_info shader_info; struct vkd3d_shader_interface_info shader_interface; + struct vkd3d_shader_descriptor_offset_info offset_info; const struct d3d12_root_signature *root_signature; struct vkd3d_shader_spirv_target_info target_info; VkPipelineLayout vk_pipeline_layout; @@ -1917,6 +1926,15 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st target_info.extensions = device->vk_info.shader_extensions; target_info.extension_count = device->vk_info.shader_extension_count; + if (root_signature->descriptor_offsets) + { + offset_info.type = VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO; + offset_info.next = NULL; + offset_info.binding_offsets = root_signature->descriptor_offsets; + offset_info.uav_counter_offsets = NULL; + vkd3d_prepend_struct(&target_info, &offset_info); + } + shader_interface.type = VKD3D_SHADER_STRUCTURE_TYPE_INTERFACE_INFO; shader_interface.next = &target_info; shader_interface.bindings = root_signature->descriptor_mapping; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 0594eea..496372e 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -736,6 +736,7 @@ struct d3d12_root_signature unsigned int binding_count; struct vkd3d_shader_resource_binding *descriptor_mapping; + unsigned int *descriptor_offsets; unsigned int root_constant_count; struct vkd3d_shader_push_constant_buffer *root_constants; diff --git a/tests/d3d12.c b/tests/d3d12.c index c73e15b..460445b 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -35105,7 +35105,6 @@ static void test_unbounded_resource_arrays(void) D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE); get_buffer_readback_with_command_list(output_buffers[i], DXGI_FORMAT_R32_UINT, &rb, queue, command_list); /* Buffers at index >= 64 are aliased. */ - todo_if(i != 74 && i > 63) check_readback_data_uint(&rb, NULL, (i < 64 ? 63 - i : 127 - i) ^ 0x35, 0); release_resource_readback(&rb); reset_command_list(command_list, context.allocator);
1
0
0
0
Conor McCarthy : vkd3d: Introduce a helper function to chain vkd3d structures.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: vkd3d Branch: master Commit: 6a88c57f5d776ad4978ffad3918e4c3a75b9c332 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=6a88c57f5d776ad4978ffad…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri Oct 15 01:37:44 2021 +0200 vkd3d: Introduce a helper function to chain vkd3d structures. Analogous to vk_prepend_struct(). Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 9 ++++----- libs/vkd3d/vkd3d_private.h | 13 +++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 277afe4..29d8618 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -2689,12 +2689,11 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s goto fail; } - shader_interface.next = shader_stages[i].stage == xfb_stage ? &xfb_info : NULL; + shader_interface.next = NULL; + if (shader_stages[i].stage == xfb_stage) + vkd3d_prepend_struct(&shader_interface, &xfb_info); if (target_info) - { - target_info->next = shader_interface.next; - shader_interface.next = target_info; - } + vkd3d_prepend_struct(&shader_interface, target_info); if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count], shader_stages[i].stage, b, &shader_interface))) diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index f8474ca..0594eea 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1395,4 +1395,17 @@ static inline void vk_prepend_struct(void *header, void *structure) vk_header->pNext = vk_structure; } +static inline void vkd3d_prepend_struct(void *header, void *structure) +{ + struct + { + unsigned int type; + const void *next; + } *vkd3d_header = header, *vkd3d_structure = structure; + + assert(!vkd3d_structure->next); + vkd3d_structure->next = vkd3d_header->next; + vkd3d_header->next = vkd3d_structure; +} + #endif /* __VKD3D_PRIVATE_H */
1
0
0
0
Conor McCarthy : vkd3d-shader/spirv: Implement support for descriptor array offsets.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: vkd3d Branch: master Commit: e328d0b17871c32aaf89b3505c09a6bdcc6c1e5d URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=e328d0b17871c32aaf89b35…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri Oct 15 01:37:43 2021 +0200 vkd3d-shader/spirv: Implement support for descriptor array offsets. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 72 +++++++++++++++++++++++++++++++++++++++++++++-- libs/vkd3d-shader/spirv.c | 12 +++++++- 2 files changed, 81 insertions(+), 3 deletions(-) diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 37b5936..3ba84a5 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -64,6 +64,11 @@ enum vkd3d_shader_structure_type * \since 1.3 */ VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO, + /** + * The structure is a vkd3d_shader_descriptor_offset_info structure. + * \since 1.3 + */ + VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO, VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_STRUCTURE_TYPE), }; @@ -208,8 +213,9 @@ struct vkd3d_shader_descriptor_binding /** The binding index of the descriptor. */ unsigned int binding; /** - * The size of this descriptor array. Descriptor arrays are not supported in - * this version of vkd3d-shader, and therefore this value must be 1. + * The size of this descriptor array. If an offset is specified for this + * binding by the vkd3d_shader_descriptor_offset_info structure, counting + * starts at that offset. */ unsigned int count; }; @@ -452,6 +458,68 @@ struct vkd3d_shader_transform_feedback_info unsigned int buffer_stride_count; }; +/** + * A chained structure containing descriptor offsets. + * + * This structure is optional. + * + * This structure extends vkd3d_shader_interface_info. + * + * This structure contains only input parameters. + * + * \since 1.3 + */ +struct vkd3d_shader_descriptor_offset_info +{ + /** Must be set to VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO. */ + enum vkd3d_shader_structure_type type; + /** Optional pointer to a structure containing further parameters. */ + const void *next; + + /** + * Pointer to an array of offsets into the descriptor arrays referenced by + * the 'bindings' array in struct vkd3d_shader_interface_info. This allows + * mapping multiple shader resource arrays to a single binding point in + * the target environment. + * + * For example, to map Direct3D constant buffer registers 'cb0[0:3]' and + * 'cb1[6:7]' to descriptors 8-12 and 4-5 in the Vulkan descriptor array in + * descriptor set 3 and with binding 2, set the following values in the + * 'bindings' array in struct vkd3d_shader_interface_info: + * + * \code + * type = VKD3D_SHADER_DESCRIPTOR_TYPE_CBV + * register_space = 0 + * register_index = 0 + * binding.set = 3 + * binding.binding = 2 + * binding.count = 4 + * + * type = VKD3D_SHADER_DESCRIPTOR_TYPE_CBV + * register_space = 0 + * register_index = 6 + * binding.set = 3 + * binding.binding = 2 + * binding.count = 2 + * \endcode + * + * and then pass \c {8, \c 4} as \a binding_offsets here. + * + * This field may be NULL, in which case the corresponding offsets are + * specified to be 0. + */ + const unsigned int *binding_offsets; + + /** + * Pointer to an array of offsets into the descriptor arrays referenced by + * the 'uav_counters' array in struct vkd3d_shader_interface_info. This + * works the same way as \ref binding_offsets above. UAV counter arrays are + * not supported in this version of vkd3d-shader, and therefore this field + * must either be NULL or specify 0 offsets. + */ + const unsigned int *uav_counter_offsets; +}; + /** The format of a shader to be compiled or scanned. */ enum vkd3d_shader_source_type { diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index f9124fc..6cf438d 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2231,6 +2231,7 @@ struct vkd3d_dxbc_compiler size_t control_flow_info_size; struct vkd3d_shader_interface_info shader_interface; + struct vkd3d_shader_descriptor_offset_info offset_info; struct vkd3d_push_constant_buffer_binding *push_constants; const struct vkd3d_shader_spirv_target_info *spirv_target_info; @@ -2292,6 +2293,7 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader const struct vkd3d_shader_signature *patch_constant_signature = &shader_desc->patch_constant_signature; const struct vkd3d_shader_signature *output_signature = &shader_desc->output_signature; const struct vkd3d_shader_interface_info *shader_interface; + const struct vkd3d_shader_descriptor_offset_info *offset_info; const struct vkd3d_shader_spirv_target_info *target_info; struct vkd3d_dxbc_compiler *compiler; unsigned int max_element_count; @@ -2385,6 +2387,13 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader for (i = 0; i < shader_interface->push_constant_buffer_count; ++i) compiler->push_constants[i].pc = shader_interface->push_constant_buffers[i]; } + + if ((offset_info = vkd3d_find_struct(shader_interface->next, DESCRIPTOR_OFFSET_INFO))) + { + compiler->offset_info = *offset_info; + if (offset_info->uav_counter_offsets) + WARN("Ignoring UAV counter offsets %p.\n", offset_info->uav_counter_offsets); + } } compiler->scan_descriptor_info = scan_descriptor_info; @@ -2546,6 +2555,7 @@ static struct vkd3d_shader_descriptor_binding vkd3d_dxbc_compiler_get_descriptor { const struct vkd3d_shader_interface_info *shader_interface = &compiler->shader_interface; unsigned int register_last = (range->last == ~0u) ? range->first : range->last; + const unsigned int *binding_offsets = compiler->offset_info.binding_offsets; enum vkd3d_shader_descriptor_type descriptor_type; enum vkd3d_shader_binding_flag resource_type_flag; struct vkd3d_shader_descriptor_binding binding; @@ -2626,7 +2636,7 @@ static struct vkd3d_shader_descriptor_binding vkd3d_dxbc_compiler_get_descriptor || current->binding.count <= register_last - current->register_index) continue; - *binding_base_idx = current->register_index; + *binding_base_idx = current->register_index - (binding_offsets ? binding_offsets[i] : 0); return current->binding; } if (shader_interface->binding_count)
1
0
0
0
Philip Rebohle : vkd3d-shader/spirv: Implement texel offset support for sample_c instructions.
by Alexandre Julliard
15 Oct '21
15 Oct '21
Module: vkd3d Branch: master Commit: ea1b01b1f80e5a5b4e2920be71a802d36347759e URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=ea1b01b1f80e5a5b4e2920b…
Author: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Date: Fri Oct 15 01:37:42 2021 +0200 vkd3d-shader/spirv: Implement texel offset support for sample_c instructions. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/spirv.c | 13 +++++++++---- tests/d3d12.c | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 58bf3d9..f9124fc 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -8235,12 +8235,9 @@ static void vkd3d_dxbc_compiler_emit_sample_c(struct vkd3d_dxbc_compiler *compil SpvImageOperandsMask operands_mask = 0; unsigned int image_operand_count = 0; struct vkd3d_shader_image image; - uint32_t image_operands[1]; + uint32_t image_operands[2]; SpvOp op; - if (vkd3d_shader_instruction_has_texel_offset(instruction)) - FIXME("Texel offset not supported.\n"); - if (instruction->handler_idx == VKD3DSIH_SAMPLE_C_LZ) { op = SpvOpImageSampleDrefExplicitLod; @@ -8255,6 +8252,14 @@ static void vkd3d_dxbc_compiler_emit_sample_c(struct vkd3d_dxbc_compiler *compil vkd3d_dxbc_compiler_prepare_image(compiler, &image, &src[1].reg, &src[2].reg, VKD3D_IMAGE_FLAG_SAMPLED | VKD3D_IMAGE_FLAG_DEPTH); + + if (vkd3d_shader_instruction_has_texel_offset(instruction)) + { + operands_mask |= SpvImageOperandsConstOffsetMask; + image_operands[image_operand_count++] = vkd3d_dxbc_compiler_emit_texel_offset(compiler, + instruction, image.resource_type_info); + } + sampled_type_id = vkd3d_spirv_get_type_id(builder, image.sampled_type, 1); coordinate_id = vkd3d_dxbc_compiler_emit_load_src(compiler, &src[0], VKD3DSP_WRITEMASK_ALL); dref_id = vkd3d_dxbc_compiler_emit_load_src(compiler, &src[3], VKD3DSP_WRITEMASK_0); diff --git a/tests/d3d12.c b/tests/d3d12.c index 93cd56d..c73e15b 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -14784,8 +14784,7 @@ static void test_sample_c_lz(void) transition_resource_state(command_list, context.render_target, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - todo_if(j && tests[i].d_ref > 0.0f) - check_sub_resource_float(context.render_target, 0, queue, command_list, tests[i].expected, 2); + check_sub_resource_float(context.render_target, 0, queue, command_list, tests[i].expected, 2); reset_command_list(command_list, context.allocator); transition_resource_state(command_list, context.render_target,
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
117
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200