diff options
Diffstat (limited to 'subprojects/packagefiles/libplacebo')
| -rw-r--r-- | subprojects/packagefiles/libplacebo/no_dlltool.diff | 47 | ||||
| -rw-r--r-- | subprojects/packagefiles/libplacebo/stretch.diff | 15 |
2 files changed, 62 insertions, 0 deletions
diff --git a/subprojects/packagefiles/libplacebo/no_dlltool.diff b/subprojects/packagefiles/libplacebo/no_dlltool.diff new file mode 100644 index 0000000..e5c017c --- /dev/null +++ b/subprojects/packagefiles/libplacebo/no_dlltool.diff @@ -0,0 +1,47 @@ +diff --git a/src/meson.build b/src/meson.build +index 5958254..ee33055 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -18,24 +18,24 @@ link_args = [] + link_depends = [] + + # Looks like meson in certain configuration returns ' ' instead of empty string +-mingw32 = cc.get_define('__MINGW32__').strip() +-if host_machine.system() == 'windows' and mingw32 != '' and host_machine.cpu() in ['aarch64', 'arm', 'x86_64'] +- # MinGW-w64 math functions are significantly slower than the UCRT ones. +- # In particular powf is over 7 times slower than UCRT counterpart. +- # MinGW-w64 explicitly excludes some math functions from their ucrtbase def +- # file and replaces with own versions. To workaround the issue, generate the +- # import library and link it with UCRT versions of math functions. +- dlltool = find_program('llvm-dlltool', 'dlltool') +- ucrt_math = custom_target('ucrt_math.lib', +- output : ['ucrt_math.lib'], +- input : 'ucrt_math.def', +- command : [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@']) +- link_args += ucrt_math.full_path() +- link_depends += ucrt_math +- # MinGW-w64 inlines functions like powf, rewriting them to pow. We want to use +- # the powf specialization from UCRT, so disable inlining. +- add_project_arguments(['-D__CRT__NO_INLINE'], language: ['c', 'cpp']) +-endif ++#mingw32 = cc.get_define('__MINGW32__').strip() ++#if host_machine.system() == 'windows' and mingw32 != '' and host_machine.cpu() in ['aarch64', 'arm', 'x86_64'] ++# # MinGW-w64 math functions are significantly slower than the UCRT ones. ++# # In particular powf is over 7 times slower than UCRT counterpart. ++# # MinGW-w64 explicitly excludes some math functions from their ucrtbase def ++# # file and replaces with own versions. To workaround the issue, generate the ++# # import library and link it with UCRT versions of math functions. ++# dlltool = find_program('llvm-dlltool', 'dlltool') ++# ucrt_math = custom_target('ucrt_math.lib', ++# output : ['ucrt_math.lib'], ++# input : 'ucrt_math.def', ++# command : [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@']) ++# link_args += ucrt_math.full_path() ++# link_depends += ucrt_math ++# # MinGW-w64 inlines functions like powf, rewriting them to pow. We want to use ++# # the powf specialization from UCRT, so disable inlining. ++# add_project_arguments(['-D__CRT__NO_INLINE'], language: ['c', 'cpp']) ++#endif + + # Work around missing atomics on some (obscure) platforms + atomic_test = ''' diff --git a/subprojects/packagefiles/libplacebo/stretch.diff b/subprojects/packagefiles/libplacebo/stretch.diff new file mode 100644 index 0000000..40544bc --- /dev/null +++ b/subprojects/packagefiles/libplacebo/stretch.diff @@ -0,0 +1,15 @@ +diff --git a/src/renderer.c b/src/renderer.c +index a052bc5..639fbfd 100644 +--- a/src/renderer.c ++++ b/src/renderer.c +@@ -1845,8 +1845,8 @@ static bool pass_read_image(struct pass_state *pass) + .rect = { + off_x, + off_y, +- off_x + pl_rect_w(ref->img.rect), +- off_y + pl_rect_h(ref->img.rect), ++ off_x + pl_rect_w(ref->img.rect) / stretch_x, ++ off_y + pl_rect_h(ref->img.rect) / stretch_y, + }, + }; + |