Before this fix, the regex engine would run into an infinite loop and OOM when encountering a
quantifier allowing a zero amount of items in a REG_GLOB regex.
Minimizing the window might trigger a focus change to the dummy window,
while restoring and setting foreground should change the foreground
back to the focus window.
However, the X window manager will instead send WM_TAKE_FOCUS event to
the dummy window and to the focus window concurrently, and the dummy
window might reply to it *after* we've restored the foreground to the
focus window. This will later cause the device window to fail to get
foreground, and the tests to randomly fail.
This will allow us to replace the GLSL FFP pipes, and is useful for testing
the FFP HLSL backend before the Vulkan backend is mature enough in other
respects.
This patch introduces the d3d setting "ffp_hlsl", set to a DWORD value.
It is disabled by default, and only has an effect on the GL renderer.
In most cases, it is possible to construct a D3D shader which behaves
identically to a given FFP pipeline.
There are two exceptions, related to fog and texture transforms, where the FFP
pipeline has special behaviour that cannot be emulated with shaders, and we
handle those here by checking whether our shader is actually an FFP replacement
shader.
We only compute ffp_frag_settings and stash that in the shader byte_code.
The HLSL shader will be compiled to sm2 bytecode on the CS side, and then parsed
and interpreted by the shader backend (and all other code) as if it were a real
shader.
In theory, we could take the extra step of retrieving the settings from this
shader in the GLSL backend, instead of from the current state.
This however requires changing a number of places which currently check
"state->shader[WINED3D_SHADER_TYPE_PIXEL]" to also check "is_ffp_ps", and it
also means we need to handle some more states (shade mode, fog, etc.) as part of
ffp_frag_settings. Both of these will go away as soon as the GLSL backend can
simply consume the generated HLSL shader.
The idea is that we will have wined3d_shader objects that represent shaders
not yet in d3d form (specifically, in HLSL form or containing only an FFP
settings struct.) Hence we need to make it possible to delay d3d shader parsing,
but still keep the rest of shader_init().
Revision 78bdd23406 (Oct 13 2023) introduced "true" as a variable name
in DPWSCB_EnumSessions.
This is a reserved identifier in C++ and recent versions of C and with
GCC 15 going to move to -std=gnu23 (so essentically C23) we'd break.