diff --git a/patches/cmd-launch-association/0001-cmd-Support-for-launching-programs-based-on-file-ass.patch b/patches/cmd-launch-association/0001-cmd-Support-for-launching-programs-based-on-file-ass.patch index 22d16244..b3da3250 100644 --- a/patches/cmd-launch-association/0001-cmd-Support-for-launching-programs-based-on-file-ass.patch +++ b/patches/cmd-launch-association/0001-cmd-Support-for-launching-programs-based-on-file-ass.patch @@ -67,7 +67,7 @@ index cacb7ea7751..19a807c1624 100644 - Note: Launching internal wine processes cannot specify a full path to exe */ - status = CreateProcessW(thisDir, - command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe); -- heap_free(st.lpReserved2); +- free(st.lpReserved2); - if ((opt_c || opt_k) && !opt_s && !status - && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') { - /* strip first and last quote WCHARacters and try again */ @@ -143,7 +143,7 @@ index cacb7ea7751..19a807c1624 100644 + WINE_TRACE("Launching via CreateProcess\n"); + status = CreateProcessW(thisDir, + command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe); -+ heap_free(st.lpReserved2); ++ free(st.lpReserved2); + if ((opt_c || opt_k) && !opt_s && !status + && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') { + /* strip first and last quote WCHARacters and try again */ diff --git a/patches/d3dx9_36-UpdateSkinnedMesh/0001-d3dx9_36-Implement-ID3DXSkinInfoImpl_UpdateSkinnedMe.patch b/patches/d3dx9_36-UpdateSkinnedMesh/0001-d3dx9_36-Implement-ID3DXSkinInfoImpl_UpdateSkinnedMe.patch index 2c015442..74ff4e86 100644 --- a/patches/d3dx9_36-UpdateSkinnedMesh/0001-d3dx9_36-Implement-ID3DXSkinInfoImpl_UpdateSkinnedMe.patch +++ b/patches/d3dx9_36-UpdateSkinnedMesh/0001-d3dx9_36-Implement-ID3DXSkinInfoImpl_UpdateSkinnedMe.patch @@ -1,16 +1,16 @@ -From 33e4e3219056f09ed8b406d154b87bafedb1ebe0 Mon Sep 17 00:00:00 2001 +From 7ba5e4a89be15deeb704078ad8321c7cc5aa02eb Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 22 Jul 2013 21:51:20 +0200 -Subject: d3dx9_36: Implement ID3DXSkinInfoImpl_UpdateSkinnedMesh. +Subject: [PATCH] d3dx9_36: Implement ID3DXSkinInfoImpl_UpdateSkinnedMesh. This patch fixes last problem of bug 32572. --- - dlls/d3dx9_36/skin.c | 86 ++++++++++++++++++++++++++++++++++++++++++++-- - dlls/d3dx9_36/tests/mesh.c | 83 ++++++++++++++++++++++++++++++++++++++++++++ + dlls/d3dx9_36/skin.c | 86 ++++++++++++++++++++++++++++++++++++-- + dlls/d3dx9_36/tests/mesh.c | 83 ++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/skin.c b/dlls/d3dx9_36/skin.c -index aa5acf2..bd7e581 100644 +index b81fb6863d3..75ee6d44a95 100644 --- a/dlls/d3dx9_36/skin.c +++ b/dlls/d3dx9_36/skin.c @@ -2,6 +2,7 @@ @@ -21,7 +21,7 @@ index aa5acf2..bd7e581 100644 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public -@@ -375,10 +376,89 @@ static HRESULT WINAPI d3dx9_skin_info_GetDeclaration(ID3DXSkinInfo *iface, +@@ -399,10 +400,89 @@ static HRESULT WINAPI d3dx9_skin_info_GetDeclaration(ID3DXSkinInfo *iface, static HRESULT WINAPI d3dx9_skin_info_UpdateSkinnedMesh(ID3DXSkinInfo *iface, const D3DXMATRIX *bone_transforms, const D3DXMATRIX *bone_inv_transpose_transforms, const void *src_vertices, void *dst_vertices) { @@ -115,11 +115,11 @@ index aa5acf2..bd7e581 100644 static HRESULT WINAPI d3dx9_skin_info_ConvertToBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in, diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c -index 17c5d9c..e255eac 100644 +index 1daec158a5f..64b02276843 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c -@@ -5152,6 +5152,88 @@ static void test_create_skin_info(void) - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); +@@ -5241,6 +5241,88 @@ static void test_create_skin_info(void) + ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#lx\n", hr); } +static void test_update_skinned_mesh(void) @@ -207,7 +207,7 @@ index 17c5d9c..e255eac 100644 static void test_convert_adjacency_to_point_reps(void) { HRESULT hr; -@@ -10468,6 +10550,7 @@ START_TEST(mesh) +@@ -11484,6 +11566,7 @@ START_TEST(mesh) D3DXGenerateAdjacencyTest(); test_update_semantics(); test_create_skin_info(); @@ -216,5 +216,5 @@ index 17c5d9c..e255eac 100644 test_convert_point_reps_to_adjacency(); test_weld_vertices(); -- -2.1.2 +2.38.1 diff --git a/patches/wined3d-SWVP-shaders/0001-wined3d-Use-UBO-for-vertex-shader-float-constants-if.patch b/patches/wined3d-SWVP-shaders/0001-wined3d-Use-UBO-for-vertex-shader-float-constants-if.patch index cf65511a..2ee91205 100644 --- a/patches/wined3d-SWVP-shaders/0001-wined3d-Use-UBO-for-vertex-shader-float-constants-if.patch +++ b/patches/wined3d-SWVP-shaders/0001-wined3d-Use-UBO-for-vertex-shader-float-constants-if.patch @@ -1,4 +1,4 @@ -From e18ad6deca23d2e49f898692a3127f58fd5cc5d8 Mon Sep 17 00:00:00 2001 +From 5416d2737c78ddef1406e09b79903f93b0065104 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 13:17:01 +0300 Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if @@ -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 60a168b5cef..02643b7b3fe 100644 +index 15fb5218610..11a1665c8e8 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c -@@ -3095,6 +3095,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) +@@ -3107,6 +3107,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 60a168b5cef..02643b7b3fe 100644 } if (gl_info->supported[ARB_TESSELLATION_SHADER]) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 40b5442ed04..3e3f9f79da0 100644 +index 594fdf73f46..36246a5cd60 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -132,6 +132,10 @@ struct shader_glsl_priv @@ -257,7 +257,7 @@ index 40b5442ed04..3e3f9f79da0 100644 } /* Always declare the full set of constants, the compiler can remove the -@@ -9942,17 +10032,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str +@@ -9943,17 +10033,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 40b5442ed04..3e3f9f79da0 100644 for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) { -@@ -11024,6 +11133,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11025,6 +11134,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 40b5442ed04..3e3f9f79da0 100644 struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; struct shader_glsl_priv *priv; -@@ -11031,6 +11141,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11032,6 +11142,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 40b5442ed04..3e3f9f79da0 100644 string_buffer_list_init(&priv->string_buffers); if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv))) -@@ -11085,6 +11197,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11086,6 +11198,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 40b5442ed04..3e3f9f79da0 100644 return WINED3D_OK; fail: -@@ -11112,6 +11226,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte +@@ -11113,6 +11227,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,7 +340,7 @@ index 40b5442ed04..3e3f9f79da0 100644 device->shader_priv = NULL; } diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index c2e77021bb3..3c22e01094e 100644 +index a156d27e7ac..982e8dd3748 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 @@ -353,13 +353,13 @@ index c2e77021bb3..3c22e01094e 100644 } } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index ee3e083e812..0569eafd48f 100644 +index eb25f01130e..c4605dc3f08 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 struct wined3d_bo_gl *bo_gl; - TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); + TRACE("context %p, state %p, state_id %#lx.\n", context, state, state_id); + if (context->d3d_info->wined3d_creation_flags & WINED3D_LEGACY_SHADER_CONSTANTS) + { + WARN("Called in legacy shader constant mode.\n"); @@ -369,7 +369,7 @@ index ee3e083e812..0569eafd48f 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 b7d3b579ed2..8b1ac25321f 100644 +index 7abf77bb445..eb6ff00e9a9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1217,6 +1217,7 @@ struct wined3d_shader_reg_maps @@ -389,10 +389,10 @@ index b7d3b579ed2..8b1ac25321f 100644 UINT arb_vs_float_constants; UINT arb_vs_native_constants; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index a18dcda45be..14c89680771 100644 +index f4ec2470bba..14392de1291 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -1323,6 +1323,7 @@ enum wined3d_memory_segment_group +@@ -1324,6 +1324,7 @@ enum wined3d_memory_segment_group #define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000 #define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000 #define WINED3D_NO_DRAW_INDIRECT 0x00004000 @@ -401,5 +401,5 @@ index a18dcda45be..14c89680771 100644 #define WINED3D_RESZ_CODE 0x7fa05000 -- -2.35.1 +2.38.1 diff --git a/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch b/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch index cb9dc0b3..4aa9a8a2 100644 --- a/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch +++ b/patches/wined3d-SWVP-shaders/0004-wined3d-Support-SWVP-vertex-shader-constants-limit-i.patch @@ -1,4 +1,4 @@ -From 900a4d6309b753df0ca09a604d6f317462c9edca Mon Sep 17 00:00:00 2001 +From 050a25663f403b0286453e90c4abd4e35df668eb Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 15:05:12 +0300 Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state @@ -15,10 +15,10 @@ Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state 7 files changed, 31 insertions(+), 20 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index a939b18a5e1..037a58ea8c8 100644 +index 5c4417a2568..21bd83fc1e0 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c -@@ -6964,13 +6964,10 @@ static void test_vertex_shader_constant(void) +@@ -6971,13 +6971,10 @@ static void test_vertex_shader_constant(void) ok(consts_swvp == 8192, "Unexpected consts_swvp %lu.\n", consts_swvp); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1); @@ -32,7 +32,7 @@ index a939b18a5e1..037a58ea8c8 100644 ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); -@@ -6995,7 +6992,6 @@ static void test_vertex_shader_constant(void) +@@ -7002,7 +6999,6 @@ static void test_vertex_shader_constant(void) IDirect3DDevice9_SetSoftwareVertexProcessing(device, 0); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1); @@ -40,7 +40,7 @@ index a939b18a5e1..037a58ea8c8 100644 ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); -@@ -7003,7 +6999,6 @@ static void test_vertex_shader_constant(void) +@@ -7010,7 +7006,6 @@ static void test_vertex_shader_constant(void) IDirect3DDevice9_SetSoftwareVertexProcessing(device, 1); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1); @@ -49,10 +49,10 @@ index a939b18a5e1..037a58ea8c8 100644 hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c -index 034cfeef55c..c03e8a84820 100644 +index d1bcaf39c14..290e37728f9 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c -@@ -24973,7 +24973,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -25184,7 +25184,6 @@ static void test_mvp_software_vertex_shaders(void) hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, c_index, 1); ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, (unsigned int)c_index[0], c_color, 1); @@ -61,10 +61,10 @@ index 034cfeef55c..c03e8a84820 100644 hr = IDirect3DDevice9_BeginScene(device); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index f5e9aebd44b..69174308a48 100644 +index 0762f90b6a5..f205e95c3b5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -3919,7 +3919,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3922,7 +3922,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, const struct wined3d_saved_states *changed = &stateblock->changed; const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT; struct wined3d_device_context *context = &device->cs->c; @@ -73,7 +73,7 @@ index f5e9aebd44b..69174308a48 100644 struct wined3d_range range; uint32_t map; -@@ -3930,9 +3930,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, +@@ -3933,9 +3933,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, if (changed->pixelShader) wined3d_device_context_set_shader(context, WINED3D_SHADER_TYPE_PIXEL, state->ps); @@ -87,7 +87,7 @@ index f5e9aebd44b..69174308a48 100644 wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 5ad0c132933..55e68d21c23 100644 +index 1422871a2b3..53de4803a3f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1905,7 +1905,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev @@ -100,7 +100,7 @@ index 5ad0c132933..55e68d21c23 100644 update_heap_entry(heap, i, priv->next_constant_version); } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c -index 1b82d387de8..27fb57e2465 100644 +index 16f58b726d0..f0ad28d37a0 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -731,8 +731,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock, @@ -110,7 +110,7 @@ index 1b82d387de8..27fb57e2465 100644 + unsigned int i, start, vs_uniform_count; struct wined3d_range range; - unsigned int i, start; - DWORD map; + uint32_t map; TRACE("stateblock %p, device_state %p.\n", stateblock, device_state); @@ -748,9 +748,11 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock, @@ -126,14 +126,13 @@ index 1b82d387de8..27fb57e2465 100644 break; memcpy(&stateblock->stateblock_state.vs_consts_f[range.offset], &state->vs_consts_f[range.offset], -@@ -994,8 +996,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock, - struct wined3d_stateblock *device_state) +@@ -995,7 +997,7 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock, { const struct wined3d_stateblock_state *state = &stateblock->stateblock_state; -+ unsigned int i, start, vs_uniform_count; struct wined3d_range range; - unsigned int i, start; - DWORD map; ++ unsigned int i, start, vs_uniform_count; + uint32_t map; TRACE("stateblock %p, device_state %p.\n", stateblock, device_state); @@ -1005,9 +1007,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock, @@ -185,10 +184,10 @@ index 1b82d387de8..27fb57e2465 100644 default: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 5a6adc4f404..08485076c02 100644 +index d0f7600171a..c4ac93c2d58 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3854,7 +3854,7 @@ struct wined3d_state +@@ -3891,7 +3891,7 @@ struct wined3d_state struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS]; struct wined3d_unordered_access_view *unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS]; @@ -197,7 +196,7 @@ index 5a6adc4f404..08485076c02 100644 struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I]; BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; -@@ -4039,6 +4039,15 @@ static inline void wined3d_device_bo_map_unlock(struct wined3d_device *device) +@@ -4073,6 +4073,15 @@ static inline void wined3d_device_bo_map_unlock(struct wined3d_device *device) LeaveCriticalSection(&device->bo_map_lock); } @@ -213,7 +212,7 @@ index 5a6adc4f404..08485076c02 100644 struct wined3d_device_no3d { struct wined3d_device d; -@@ -4921,7 +4930,7 @@ struct wined3d_vertex_declaration +@@ -4961,7 +4970,7 @@ struct wined3d_vertex_declaration struct wined3d_saved_states { @@ -223,10 +222,10 @@ index 5a6adc4f404..08485076c02 100644 WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)]; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 72f12551c3c..faa696855d6 100644 +index 0ce807fc5c8..ba8e8759a58 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -2205,7 +2205,7 @@ struct wined3d_stateblock_state +@@ -2162,7 +2162,7 @@ struct wined3d_stateblock_state int base_vertex_index; struct wined3d_shader *vs; @@ -236,5 +235,5 @@ index 72f12551c3c..faa696855d6 100644 BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; -- -2.35.1 +2.38.1 diff --git a/patches/wined3d-SWVP-shaders/0005-wined3d-Support-SWVP-mode-vertex-shaders.patch b/patches/wined3d-SWVP-shaders/0005-wined3d-Support-SWVP-mode-vertex-shaders.patch index fa0c0463..ecdb9f60 100644 --- a/patches/wined3d-SWVP-shaders/0005-wined3d-Support-SWVP-mode-vertex-shaders.patch +++ b/patches/wined3d-SWVP-shaders/0005-wined3d-Support-SWVP-mode-vertex-shaders.patch @@ -1,4 +1,4 @@ -From 8885f74f77c1db6a4d4776bf4d0186a84dcb74ad Mon Sep 17 00:00:00 2001 +From a4d28ab4e362bd30c52442e8fa6bf4706194775e Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 15:23:33 +0300 Subject: [PATCH] wined3d: Support SWVP mode vertex shaders. @@ -14,10 +14,10 @@ Subject: [PATCH] wined3d: Support SWVP mode vertex shaders. 7 files changed, 104 insertions(+), 49 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index 037a58ea8c8..2d63044e291 100644 +index 21bd83fc1e0..360650f9723 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c -@@ -7453,15 +7453,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET +@@ -7460,15 +7460,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET vs = NULL; hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs); @@ -35,7 +35,7 @@ index 037a58ea8c8..2d63044e291 100644 refcount = IDirect3DDevice9_Release(device); ok(!refcount, "Device has %lu references left.\n", refcount); -@@ -7478,20 +7474,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET +@@ -7485,20 +7481,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs); @@ -59,10 +59,10 @@ index 037a58ea8c8..2d63044e291 100644 cleanup: refcount = IDirect3DDevice9_Release(device); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c -index c03e8a84820..34210dd7c88 100644 +index 290e37728f9..92cdbfe8167 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c -@@ -24899,7 +24899,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -25110,7 +25110,6 @@ static void test_mvp_software_vertex_shaders(void) hr = IDirect3DDevice9_CreateVertexShader(device, reladdr_shader_code, &reladdr_shader); ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, pure_sw_shader_code, &pure_sw_shader); @@ -70,7 +70,7 @@ index c03e8a84820..34210dd7c88 100644 ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration); ok(SUCCEEDED(hr), "Got unexpected hr %#lx.\n", hr); -@@ -24937,7 +24936,7 @@ static void test_mvp_software_vertex_shaders(void) +@@ -25148,7 +25147,7 @@ static void test_mvp_software_vertex_shaders(void) expected_color = 0x00ff0000; /* Color from vertex data and not from the shader. */ color = getPixelColor(device, 5, 5); @@ -79,7 +79,7 @@ index c03e8a84820..34210dd7c88 100644 expected_color, color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); -@@ -24956,7 +24955,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -25167,7 +25166,6 @@ static void test_mvp_software_vertex_shaders(void) expected_color = 0x00ffffff; color = getPixelColor(device, 5, 5); @@ -87,7 +87,7 @@ index c03e8a84820..34210dd7c88 100644 ok(color == expected_color, "Expected color 0x%08x, got 0x%08x (sw shader in sw mode).\n", expected_color, color); -@@ -25006,7 +25004,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -25217,7 +25215,6 @@ static void test_mvp_software_vertex_shaders(void) expected_color = 0x0000ffff; /* c[256] is c_color for SW shader. */ color = getPixelColor(device, 5, 5); @@ -96,10 +96,10 @@ index c03e8a84820..34210dd7c88 100644 expected_color, color); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 69174308a48..4f7192d1d59 100644 +index f205e95c3b5..07de7a962cc 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4699,6 +4699,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device * +@@ -4682,6 +4682,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device * warned = TRUE; } @@ -115,7 +115,7 @@ index 69174308a48..4f7192d1d59 100644 } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 55e68d21c23..f3123f69fc9 100644 +index 53de4803a3f..e8835d88de7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -134,7 +134,9 @@ struct shader_glsl_priv @@ -251,7 +251,7 @@ index 55e68d21c23..f3123f69fc9 100644 } else if (shader->limits->constant_float > 0) { -@@ -10055,12 +10071,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * +@@ -10056,12 +10072,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * } else if (!priv->consts_ubo) { @@ -267,7 +267,7 @@ index 55e68d21c23..f3123f69fc9 100644 } for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) -@@ -10378,6 +10395,10 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl, +@@ -10379,6 +10396,10 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl, vs_list = &ffp_shader->linked_programs; } @@ -278,7 +278,7 @@ index 55e68d21c23..f3123f69fc9 100644 hshader = state->shader[WINED3D_SHADER_TYPE_HULL]; if (!(context_gl->c.shader_update_mask & (1u << WINED3D_SHADER_TYPE_HULL)) && ctx_data->glsl_program) hs_id = ctx_data->glsl_program->hs.id; -@@ -11132,7 +11153,7 @@ static void constant_heap_free(struct constant_heap *heap) +@@ -11133,7 +11154,7 @@ static void constant_heap_free(struct constant_heap *heap) static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct wined3d_fragment_pipe_ops *fragment_pipe) { @@ -287,7 +287,7 @@ index 55e68d21c23..f3123f69fc9 100644 const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; -@@ -11143,6 +11164,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11144,6 +11165,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win priv->consts_ubo = (device->adapter->d3d_info.wined3d_creation_flags & WINED3D_LEGACY_SHADER_CONSTANTS) && gl_info->supported[ARB_UNIFORM_BUFFER_OBJECT]; @@ -306,7 +306,7 @@ index 55e68d21c23..f3123f69fc9 100644 string_buffer_list_init(&priv->string_buffers); if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv))) -@@ -11172,7 +11205,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11173,7 +11206,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win goto fail; } @@ -316,7 +316,7 @@ index 55e68d21c23..f3123f69fc9 100644 ERR("Failed to initialize vertex shader constant heap\n"); goto fail; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 3c22e01094e..7c63c472803 100644 +index 982e8dd3748..6c815faae0c 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -590,7 +590,7 @@ static void shader_delete_constant_list(struct list *clist) @@ -469,7 +469,7 @@ index 3c22e01094e..7c63c472803 100644 shader_cleanup(object); heap_free(object); diff --git a/dlls/wined3d/shader_sm1.c b/dlls/wined3d/shader_sm1.c -index 50969c058f2..a69d37c1b24 100644 +index ed4af5a0409..991f96b6dd1 100644 --- a/dlls/wined3d/shader_sm1.c +++ b/dlls/wined3d/shader_sm1.c @@ -540,7 +540,7 @@ static void *shader_sm1_init(const DWORD *byte_code, size_t byte_code_size, @@ -479,13 +479,13 @@ index 50969c058f2..a69d37c1b24 100644 - if (WINED3D_SHADER_VERSION(major, minor) > WINED3D_SHADER_VERSION(3, 0)) + if (WINED3D_SHADER_VERSION(major, minor) > WINED3D_SHADER_VERSION(3, 255)) { - WARN("Invalid shader version %u.%u (%#x).\n", major, minor, *byte_code); + WARN("Invalid shader version %u.%u (%#lx).\n", major, minor, *byte_code); return NULL; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 08485076c02..1485f362985 100644 +index c4ac93c2d58..76e2eb63c8a 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -4039,6 +4039,13 @@ static inline void wined3d_device_bo_map_unlock(struct wined3d_device *device) +@@ -4073,6 +4073,13 @@ static inline void wined3d_device_bo_map_unlock(struct wined3d_device *device) LeaveCriticalSection(&device->bo_map_lock); } @@ -500,5 +500,5 @@ index 08485076c02..1485f362985 100644 { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; -- -2.35.1 +2.38.1 diff --git a/staging/upstream-commit b/staging/upstream-commit index b5b606c4..d67dabb8 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -7acd3aa429f2d45d96f4699906dc81e47ebd9c13 +772badd0d7f3286a7881a71f16fad417e2d7787d