If the length of wszApplicationName exceeds 1024, it will cause an error
when writing to the subsequent stack space after exceeding the wcmd space,
Wcmd needs to be modified to dynamic allocation.
Signed-off-by: Jiajin Cui <cuijiajin@uniontech.com>
4.18+ Linux kernels remove support for IPX but keep SOL_IPX defined, which
causes compilation errors as wine unconditionally uses IPX structures if
this is the case. Instead check for IPX_MTU to determine IPX support as it is
defined within the ipx.h header itself.
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).
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.
This is to eventually allow d3d12_swapchain_queue_present() to
operate on a certain VkImage even if current_buffer_index has
already been modified since the corresponding Present() call.
This is an oversight in eec9c3a2f6:
vk_format specifies the format used for the frontend resources. The backend
images could use a different format, depending on what the swapchain
supports.
Also, introduce the terms "frontend" and "backend" for the two sides
of the swapchain, which are probably easier to understand.