SPIR-V says this is undefined behaviour, but Direct3D actually specifies that it
should clamp. Most drivers do clamp, but llvmpipe does not. Hence this fixes a
couple of tests with llvmpipe.
This does of course add overhead to the ftou instruction, but I cannot imagine
that it is a common instruction to execute. This also is not the first time we
perform such checks; cf. udiv.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/289
--
v2: vkd3d-shader/hlsl: Use hlsl_block_add_instr() in clone_block().
vkd3d-shader/hlsl: Clean up the static_initializers block when the context is destroyed (Valgrind).
vkd3d-shader/hlsl: Pass a hlsl_block pointer to dump_instr_list().
vkd3d-shader/hlsl: Store the "instrs" field of struct hlsl_attribute as a hlsl_block.
vkd3d-shader/hlsl: Pass an hlsl_block pointer to add_load_component().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/290
Hans Leidekker (@hans) commented about programs/whoami/main.c:
> +#define WIN32_LEAN_AND_MEAN
> #define SECURITY_WIN32
> #include <windows.h>
> #include <security.h>
> +#include <sddl.h>
> +#include <stdarg.h>
>
> #include "wine/debug.h"
>
> WINE_DEFAULT_DEBUG_CHANNEL(whoami);
>
> -static int output_write(const WCHAR* str, int len)
> +/* Behaves like the regular wprintf, but is able to fall back to the OEMCP
> + * when redirected.
> + * Most importantly, it prints fully in Unicode by default,
> + * so any language characters are shown regardless of the current locale.
Can you give an example where wprintf() doesn't do the right thing?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3473#note_41157
Today, if media_source_Shutdown is called around the same time
as a work item is put on the async_commands_queue, we end up in
a deadlock if Shutdown enters media source's cs first, as it
waits for the queue's callback to finish, which, in turn,
waits for the object's cs to be released.
To avoid this leave the cs, before unlocking the workqueue,
to let any callback on the queue finish running.
Signed-off-by: Bernhard Kölbl <bkoelbl(a)codeweavers.com>
Blocks !3351
--
v2: winegstreamer: Leave media source critical section before unlocking workqueue.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3491