Module: vkd3d
Branch: master
Commit: a34cf2e64e6c5c534b810ebb74dfb3da1458474c
URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a34cf2e64e6c5c534b810ebb74dfb…
Author: Francisco Casas <fcasas(a)codeweavers.com>
Date: Mon Jun 26 14:50:16 2023 -0400
vkd3d-shader/hlsl: Split declare_vars().
Basically, declare_vars() is separated in three functions:
1. check_invalid_in_out_modifiers(), which is to be called once per
declaration and emits an error when in or out modifiers are used for
these non-parameter variables.
2. declare_var(), which now handles one variable at the time and doesn't
free any memory.
3. initialize_vars(), which takes care of preparing the initialization
instructions of several variables and frees their struct
parse_variable_def, using exclusively free_parse_variable_def().
This allows to declare variables individually before the initializer of
the next variable in the same declaration is parsed, which is used in
the following patches.
Also, simplifies memory management.
---
libs/vkd3d-shader/hlsl.y | 388 ++++++++++++++++++++++++++---------------------
1 file changed, 218 insertions(+), 170 deletions(-)
Module: wine
Branch: master
Commit: f032ccc2715a5525601f741337a7bc7df6873c9d
URL: https://gitlab.winehq.org/wine/wine/-/commit/f032ccc2715a5525601f741337a7bc…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Sun May 6 03:09:44 2018 +0200
wined3d: Reduce CS spin count to 2000.
Over the last few Wine releases we greatly reduced the need for the
application thread to wait for replies from the CS thread. Compared to
the time when the command stream was initially introduced, it's now
quite likely that, when the command queues become empty, they are
going to stay like that for a while (e.g. the game is throttling the
framerate or is busy doing some CPU work on its part before generating
more commands).
As a first step, reduce the spin count to reduce the busy waiting in
wined3d_cs_run(). In my tests this significantly reduces CPU usage,
with minimally decreased performance in a few rare cases but also
significantly improved performance in many cases (notably with
integrated GPUs where freeing the CPU directly allows more power to be
allocated to the GPU).
---
dlls/wined3d/wined3d_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c71ac59270b..efdcff41e58 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -5079,7 +5079,7 @@ enum wined3d_push_constants
#else
#define WINED3D_CS_QUEUE_SIZE 0x400000u
#endif
-#define WINED3D_CS_SPIN_COUNT 10000000u
+#define WINED3D_CS_SPIN_COUNT 2000u
#define WINED3D_CS_QUEUE_MASK (WINED3D_CS_QUEUE_SIZE - 1)
C_ASSERT(!(WINED3D_CS_QUEUE_SIZE & (WINED3D_CS_QUEUE_SIZE - 1)));
Module: wine
Branch: master
Commit: 203cbab6444922079e5e39d0bb68f6562b1ba19d
URL: https://gitlab.winehq.org/wine/wine/-/commit/203cbab6444922079e5e39d0bb68f6…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Wed Mar 8 18:40:56 2017 +0100
wined3d: Increase the CS queue size to 16 MiB on 64-bit architectures.
With the buffer / texture mapping acceleration bits working properly, we
can get many outstanding commands and, to avoid blocking the client thread
while waiting for free space, we need a larger queue. 16 MiB was always
enough in my testing (8 MiB wasn't in a few cases).
Keep a lower limit on 32-bit since we're often times address
space-starved there.
Tweaked by Zebediah Figura.
---
dlls/wined3d/wined3d_private.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 001534e8c38..be576fcfbde 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -5074,7 +5074,11 @@ enum wined3d_push_constants
};
#define WINED3D_CS_QUERY_POLL_INTERVAL 10u
+#if defined(_WIN64)
+#define WINED3D_CS_QUEUE_SIZE 0x1000000u
+#else
#define WINED3D_CS_QUEUE_SIZE 0x400000u
+#endif
#define WINED3D_CS_SPIN_COUNT 10000000u
#define WINED3D_CS_QUEUE_MASK (WINED3D_CS_QUEUE_SIZE - 1)