Rebase against da0ec7fbbde45126320e15b2bfb00b357b45ffb6.

This commit is contained in:
Alistair Leslie-Hughes 2023-03-29 13:53:46 +11:00
parent df3886edb6
commit e0766792bd
3 changed files with 50 additions and 43 deletions

View File

@ -1,18 +1,18 @@
From b08427ea0575faf213100269bf5bc931ec05930b Mon Sep 17 00:00:00 2001
From b1fa0df72c80753864dd001f45278f45c162bb2e Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 21 May 2021 21:52:06 -0500
Subject: [PATCH] ntdll: Always start the initial process through start.exe.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/ntdll/unix/env.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
dlls/ntdll/unix/env.c | 26 +++-----------------------
1 file changed, 3 insertions(+), 23 deletions(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index ae1afb2797b..02af2c5ca5a 100644
index 3c178350f2b..eb7a1d6c7e5 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -2116,6 +2116,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
@@ -1901,6 +1901,7 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module )
*/
static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
{
@ -20,15 +20,22 @@ index ae1afb2797b..02af2c5ca5a 100644
static const WCHAR valueW[] = {'1',0};
static const WCHAR pathW[] = {'P','A','T','H'};
RTL_USER_PROCESS_PARAMETERS *params = NULL;
@@ -2144,22 +2145,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
@@ -1929,29 +1930,8 @@ static RTL_USER_PROCESS_PARAMETERS *build_initial_params( void **module )
add_registry_environment( &env, &env_pos, &env_size );
env[env_pos++] = 0;
- status = load_main_exe( NULL, main_argv[1], curdir, &image, module );
- if (!status)
- {
- char *loader;
-
- if (main_image_info.ImageCharacteristics & IMAGE_FILE_DLL) status = STATUS_INVALID_IMAGE_FORMAT;
- if (main_image_info.Machine != current_machine) status = STATUS_INVALID_IMAGE_FORMAT;
- /* if we have to use a different loader, fall back to start.exe */
- if ((loader = get_alternate_wineloader( main_image_info.Machine )))
- {
- free( loader );
- status = STATUS_INVALID_IMAGE_FORMAT;
- }
- }
-
- if (status) /* try launching it through start.exe */
@ -46,5 +53,5 @@ index ae1afb2797b..02af2c5ca5a 100644
main_wargv = build_wargv( get_dos_path( image ));
cmdline = build_command_line( main_wargv );
--
2.32.0
2.40.0

View File

@ -1,4 +1,4 @@
From 5416d2737c78ddef1406e09b79903f93b0065104 Mon Sep 17 00:00:00 2001
From 722f6a749e5ca1784bd493fdf10ee1fa4c26b4f7 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Mon, 25 Feb 2019 13:17:01 +0300
Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
@ -16,20 +16,20 @@ Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
8 files changed, 148 insertions(+), 14 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 973c7fea779..3c2f270015e 100644
index b35abc6b699..fc6c394569d 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -476,7 +476,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
- | WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_NO_DRAW_INDIRECT;
+ | WINED3D_LEGACY_CUBEMAP_FILTERING | WINED3D_NO_DRAW_INDIRECT | WINED3D_LEGACY_SHADER_CONSTANTS;
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_HANDLE_RESTORE
| WINED3D_PIXEL_CENTER_INTEGER | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
| WINED3D_NO_PRIMITIVE_RESTART | WINED3D_LEGACY_CUBEMAP_FILTERING
- | WINED3D_NO_DRAW_INDIRECT;
+ | WINED3D_NO_DRAW_INDIRECT | WINED3D_LEGACY_SHADER_CONSTANTS;
unsigned int adapter_idx, output_idx, adapter_count, output_count = 0;
struct wined3d_adapter *wined3d_adapter;
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index 64291c586bb..cd76dfdcf74 100644
index 3dc7ff6da53..2a7a0ff3368 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -685,7 +685,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
@ -42,10 +42,10 @@ index 64291c586bb..cd76dfdcf74 100644
struct wined3d_adapter *wined3d_adapter;
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index 15fb5218610..11a1665c8e8 100644
index d4163b88d26..9017199c5a8 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -3107,6 +3107,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
@@ -3108,6 +3108,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX] = min(gl_max, WINED3D_MAX_CBS);
TRACE("Max vertex uniform blocks: %u (%d).\n",
gl_info->limits.uniform_blocks[WINED3D_SHADER_TYPE_VERTEX], gl_max);
@ -56,7 +56,7 @@ index 15fb5218610..11a1665c8e8 100644
}
if (gl_info->supported[ARB_TESSELLATION_SHADER])
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 594fdf73f46..36246a5cd60 100644
index 7dc0de1b596..db0e01515a7 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -132,6 +132,10 @@ struct shader_glsl_priv
@ -86,7 +86,7 @@ index 594fdf73f46..36246a5cd60 100644
};
struct glsl_ps_compiled_shader
@@ -1179,12 +1185,54 @@ static void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info,
@@ -1177,12 +1183,54 @@ static void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info,
checkGLcall("walk_constant_heap_clamped()");
}
@ -142,7 +142,7 @@ index 594fdf73f46..36246a5cd60 100644
/* 1.X pshaders have the constants clamped to [-1;1] implicitly. */
if (shader->reg_maps.shader_version.major == 1
@@ -1517,7 +1565,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1515,7 +1563,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
{
const struct wined3d_shader *vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX];
const struct wined3d_shader *pshader = state->shader[WINED3D_SHADER_TYPE_PIXEL];
@ -151,7 +151,7 @@ index 594fdf73f46..36246a5cd60 100644
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
@@ -1534,9 +1582,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1532,9 +1580,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
constant_version = prog->constant_version;
update_mask = context->constant_update_mask & prog->constant_update_mask;
@ -185,7 +185,7 @@ index 594fdf73f46..36246a5cd60 100644
if (update_mask & WINED3D_SHADER_CONST_VS_I)
shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i,
@@ -1689,7 +1760,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
@@ -1687,7 +1758,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
if (update_mask & WINED3D_SHADER_CONST_PS_F)
shader_glsl_load_constants_f(pshader, gl_info, state->ps_consts_f,
@ -194,7 +194,7 @@ index 594fdf73f46..36246a5cd60 100644
if (update_mask & WINED3D_SHADER_CONST_PS_I)
shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i,
@@ -1828,6 +1899,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@@ -1826,6 +1897,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
struct constant_heap *heap = &priv->vconst_heap;
UINT i;
@ -207,7 +207,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = start; i < count + start; ++i)
{
update_heap_entry(heap, i, priv->next_constant_version);
@@ -1840,6 +1917,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
@@ -1838,6 +1915,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi
struct constant_heap *heap = &priv->pconst_heap;
UINT i;
@ -217,7 +217,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = start; i < count + start; ++i)
{
update_heap_entry(heap, i, priv->next_constant_version);
@@ -2157,6 +2237,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2155,6 +2235,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
const struct wined3d_shader_reg_maps *reg_maps, const struct shader_glsl_ctx_priv *ctx_priv)
{
const struct wined3d_shader_version *version = &reg_maps->shader_version;
@ -225,7 +225,7 @@ index 594fdf73f46..36246a5cd60 100644
const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args;
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
const struct wined3d_gl_info *gl_info = context_gl->gl_info;
@@ -2190,7 +2271,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2188,7 +2269,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
/* Declare the constants (aka uniforms) */
@ -242,7 +242,7 @@ index 594fdf73f46..36246a5cd60 100644
{
unsigned max_constantsF;
@@ -2255,11 +2344,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
@@ -2253,11 +2342,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
}
else
{
@ -257,7 +257,7 @@ index 594fdf73f46..36246a5cd60 100644
}
/* Always declare the full set of constants, the compiler can remove the
@@ -9943,17 +10033,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
@@ -9941,17 +10031,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *gl_info,
@ -299,7 +299,7 @@ index 594fdf73f46..36246a5cd60 100644
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
@@ -11025,6 +11134,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11023,6 +11132,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
const struct wined3d_fragment_pipe_ops *fragment_pipe)
{
SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1;
@ -307,7 +307,7 @@ index 594fdf73f46..36246a5cd60 100644
struct fragment_caps fragment_caps;
void *vertex_priv, *fragment_priv;
struct shader_glsl_priv *priv;
@@ -11032,6 +11142,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11030,6 +11140,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
if (!(priv = heap_alloc_zero(sizeof(*priv))))
return E_OUTOFMEMORY;
@ -316,7 +316,7 @@ index 594fdf73f46..36246a5cd60 100644
string_buffer_list_init(&priv->string_buffers);
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
@@ -11086,6 +11198,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
@@ -11084,6 +11196,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
device->fragment_priv = fragment_priv;
device->shader_priv = priv;
@ -325,7 +325,7 @@ index 594fdf73f46..36246a5cd60 100644
return WINED3D_OK;
fail:
@@ -11113,6 +11227,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
@@ -11111,6 +11225,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
priv->fragment_pipe->free_private(device, context);
priv->vertex_pipe->vp_free(device, context);
@ -340,10 +340,10 @@ index 594fdf73f46..36246a5cd60 100644
device->shader_priv = NULL;
}
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index a156d27e7ac..982e8dd3748 100644
index 9924a2d806e..2a9d76622f6 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -765,6 +765,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
@@ -715,6 +715,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w
}
else
{
@ -353,10 +353,10 @@ index a156d27e7ac..982e8dd3748 100644
}
}
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index eb25f01130e..c4605dc3f08 100644
index 6262df2090d..d0f65301eec 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4594,6 +4594,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
@@ -4367,6 +4367,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
struct wined3d_bo_gl *bo_gl;
TRACE("context %p, state %p, state_id %#lx.\n", context, state, state_id);
@ -369,10 +369,10 @@ index eb25f01130e..c4605dc3f08 100644
if (STATE_IS_GRAPHICS_CONSTANT_BUFFER(state_id))
shader_type = state_id - STATE_GRAPHICS_CONSTANT_BUFFER(0);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 7abf77bb445..eb6ff00e9a9 100644
index 2d420a60369..f6077fe724b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1217,6 +1217,7 @@ struct wined3d_shader_reg_maps
@@ -1239,6 +1239,7 @@ struct wined3d_shader_reg_maps
struct wined3d_shader_tgsm *tgsm;
SIZE_T tgsm_capacity;
unsigned int tgsm_count;
@ -380,7 +380,7 @@ index 7abf77bb445..eb6ff00e9a9 100644
};
/* Keeps track of details for TEX_M#x# instructions which need to maintain
@@ -3355,6 +3356,7 @@ struct wined3d_gl_limits
@@ -3380,6 +3381,7 @@ struct wined3d_gl_limits
UINT glsl_varyings;
UINT glsl_vs_float_constants;
UINT glsl_ps_float_constants;
@ -389,7 +389,7 @@ index 7abf77bb445..eb6ff00e9a9 100644
UINT arb_vs_float_constants;
UINT arb_vs_native_constants;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index f4ec2470bba..14392de1291 100644
index 9dd6352f599..fcf7ea697f2 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -1324,6 +1324,7 @@ enum wined3d_memory_segment_group
@ -401,5 +401,5 @@ index f4ec2470bba..14392de1291 100644
#define WINED3D_RESZ_CODE 0x7fa05000
--
2.38.1
2.40.0

View File

@ -1 +1 @@
d62e2268d77c237e8430e158bb337958d88486ba
da0ec7fbbde45126320e15b2bfb00b357b45ffb6