From 1196bcb86b5f1ca2bf807c7082c87a3870110939 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 11 Jun 2019 09:19:17 +1000 Subject: [PATCH] Updated wined3d-SWVP-shaders patchset --- ...for-vertex-shader-float-constants-if.patch | 64 +++++++++++-------- ...P-vertex-shader-float-constants-limi.patch | 16 ++--- ...ctual-vertex-shader-float-constants-.patch | 34 ++++------ ...SWVP-vertex-shader-constants-limit-i.patch | 44 ++++++------- ...d3d-Support-SWVP-mode-vertex-shaders.patch | 58 ++++++++--------- 5 files changed, 108 insertions(+), 108 deletions(-) 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 5993c91d..e038cb83 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 0d2c06af4d5b53beb632ec54c4432341d840d4a5 Mon Sep 17 00:00:00 2001 +From 940ff566fa1192c46622e3a107b087993b02063e Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 13:17:01 +0300 Subject: [PATCH 1/5] wined3d: Use UBO for vertex shader float constants if @@ -9,12 +9,12 @@ Signed-off-by: Paul Gofman dlls/d3d8/directx.c | 2 +- dlls/d3d9/directx.c | 2 +- dlls/wined3d/adapter_gl.c | 3 + - dlls/wined3d/glsl_shader.c | 144 ++++++++++++++++++++++++++++++--- + dlls/wined3d/glsl_shader.c | 145 ++++++++++++++++++++++++++++++--- dlls/wined3d/shader.c | 2 + dlls/wined3d/state.c | 5 ++ dlls/wined3d/wined3d_private.h | 2 + include/wine/wined3d.h | 1 + - 8 files changed, 147 insertions(+), 14 deletions(-) + 8 files changed, 148 insertions(+), 14 deletions(-) diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index f78ff3e5af..847cfd17bf 100644 @@ -43,10 +43,10 @@ index c507991aaa..7cdf5ddbb9 100644 if (!extended) flags |= WINED3D_VIDMEM_ACCOUNTING; diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c -index 3157c49a59..d94f63b3e4 100644 +index c8ebe34643..4071ed0f82 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c -@@ -3072,6 +3072,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct +@@ -3122,6 +3122,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct 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); @@ -57,7 +57,7 @@ index 3157c49a59..d94f63b3e4 100644 } if (gl_info->supported[ARB_TESSELLATION_SHADER]) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 7c41158191..e6ac84e3e2 100644 +index ab62c1ca59..fc3093f4d1 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -138,6 +138,10 @@ struct shader_glsl_priv @@ -87,7 +87,7 @@ index 7c41158191..e6ac84e3e2 100644 }; struct glsl_ps_compiled_shader -@@ -1145,12 +1151,54 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i +@@ -1175,12 +1181,54 @@ static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_i checkGLcall("walk_constant_heap_clamped()"); } @@ -143,7 +143,7 @@ index 7c41158191..e6ac84e3e2 100644 /* 1.X pshaders have the constants clamped to [-1;1] implicitly. */ if (shader->reg_maps.shader_version.major == 1 -@@ -1783,7 +1831,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]; @@ -152,7 +152,7 @@ index 7c41158191..e6ac84e3e2 100644 struct glsl_shader_prog_link *prog = ctx_data->glsl_program; const struct wined3d_gl_info *gl_info = context->gl_info; float position_fixup[4 * WINED3D_MAX_VIEWPORTS]; -@@ -1799,9 +1847,32 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1531,9 +1579,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; @@ -186,7 +186,7 @@ index 7c41158191..e6ac84e3e2 100644 if (update_mask & WINED3D_SHADER_CONST_VS_I) shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i, -@@ -1954,7 +2025,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1686,7 +1757,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, @@ -195,7 +195,7 @@ index 7c41158191..e6ac84e3e2 100644 if (update_mask & WINED3D_SHADER_CONST_PS_I) shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i, -@@ -2093,6 +2164,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev +@@ -1825,6 +1896,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev struct constant_heap *heap = &priv->vconst_heap; UINT i; @@ -208,7 +208,7 @@ index 7c41158191..e6ac84e3e2 100644 for (i = start; i < count + start; ++i) { update_heap_entry(heap, i, priv->next_constant_version); -@@ -2105,6 +2182,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi +@@ -1837,6 +1914,9 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi struct constant_heap *heap = &priv->pconst_heap; UINT i; @@ -218,7 +218,7 @@ index 7c41158191..e6ac84e3e2 100644 for (i = start; i < count + start; ++i) { update_heap_entry(heap, i, priv->next_constant_version); -@@ -2408,6 +2488,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont +@@ -2140,6 +2220,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont const struct wined3d_shader_version *version = ®_maps->shader_version; const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args; const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args; @@ -226,7 +226,7 @@ index 7c41158191..e6ac84e3e2 100644 const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_shader_indexable_temp *idx_temp_reg; unsigned int uniform_block_base, uniform_block_count; -@@ -2428,7 +2509,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont +@@ -2160,7 +2241,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } /* Declare the constants (aka uniforms) */ @@ -243,7 +243,7 @@ index 7c41158191..e6ac84e3e2 100644 { unsigned max_constantsF; -@@ -2493,11 +2582,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont +@@ -2225,11 +2314,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } else { @@ -258,7 +258,7 @@ index 7c41158191..e6ac84e3e2 100644 } /* Always declare the full set of constants, the compiler can remove the -@@ -10107,17 +10197,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str +@@ -9818,17 +9908,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, @@ -300,7 +300,15 @@ index 7c41158191..e6ac84e3e2 100644 for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) { -@@ -11196,6 +11305,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -10900,6 +11009,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win + const struct fragment_pipeline *fragment_pipe) + { + SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1; ++ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct fragment_caps fragment_caps; + void *vertex_priv, *fragment_priv; + struct shader_glsl_priv *priv; +@@ -10907,6 +11017,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win if (!(priv = heap_alloc_zero(sizeof(*priv)))) return E_OUTOFMEMORY; @@ -309,7 +317,7 @@ index 7c41158191..e6ac84e3e2 100644 string_buffer_list_init(&priv->string_buffers); if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv))) -@@ -11250,6 +11361,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -10961,6 +11073,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win device->fragment_priv = fragment_priv; device->shader_priv = priv; @@ -318,7 +326,7 @@ index 7c41158191..e6ac84e3e2 100644 return WINED3D_OK; fail: -@@ -11277,6 +11390,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte +@@ -10988,6 +11102,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); @@ -333,7 +341,7 @@ index 7c41158191..e6ac84e3e2 100644 device->shader_priv = NULL; } diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 8fae8e2213..5f8bc1d47d 100644 +index a8fee07c6c..d7fdc9cfdb 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -764,6 +764,8 @@ static BOOL shader_record_register_usage(struct wined3d_shader *shader, struct w @@ -346,10 +354,10 @@ index 8fae8e2213..5f8bc1d47d 100644 } } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index 87fe69030e..f68f225cfb 100644 +index c52e25d6ce..435aaa598b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c -@@ -4382,6 +4382,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state +@@ -4387,6 +4387,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state unsigned int i, base, count; TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); @@ -362,10 +370,10 @@ index 87fe69030e..f68f225cfb 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 e4f3b5b94a..c55022c1d5 100644 +index 8272a56203..444ffdba1e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -1054,6 +1054,7 @@ struct wined3d_shader_reg_maps +@@ -1065,6 +1065,7 @@ struct wined3d_shader_reg_maps struct wined3d_shader_tgsm *tgsm; SIZE_T tgsm_capacity; unsigned int tgsm_count; @@ -373,7 +381,7 @@ index e4f3b5b94a..c55022c1d5 100644 }; /* Keeps track of details for TEX_M#x# instructions which need to maintain -@@ -2593,6 +2594,7 @@ struct wined3d_gl_limits +@@ -2638,6 +2639,7 @@ struct wined3d_gl_limits UINT glsl_varyings; UINT glsl_vs_float_constants; UINT glsl_ps_float_constants; @@ -382,10 +390,10 @@ index e4f3b5b94a..c55022c1d5 100644 UINT arb_vs_float_constants; UINT arb_vs_native_constants; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index ed8bd40fd1..f491eee26c 100644 +index ada5636550..302c5b4fa4 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -1346,6 +1346,7 @@ enum wined3d_shader_type +@@ -1334,6 +1334,7 @@ enum wined3d_shader_type #define WINED3D_NO_PRIMITIVE_RESTART 0x00000800 #define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000 #define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000 @@ -394,5 +402,5 @@ index ed8bd40fd1..f491eee26c 100644 #define WINED3D_RESZ_CODE 0x7fa05000 -- -2.20.1 +2.21.0 diff --git a/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch b/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch index bcdbfbba..bd34514d 100644 --- a/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch +++ b/patches/wined3d-SWVP-shaders/0002-d3d9-Support-SWVP-vertex-shader-float-constants-limi.patch @@ -1,4 +1,4 @@ -From d5675989004022652718a00047e8608ce87fbc4d Mon Sep 17 00:00:00 2001 +From b1847ff5d7fad8558dc0be7ef67dc496b8c7725a Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 14:24:50 +0300 Subject: [PATCH 2/5] d3d9: Support SWVP vertex shader float constants limits. @@ -11,7 +11,7 @@ Signed-off-by: Paul Gofman 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h -index b07d72a066..a9b332ff92 100644 +index 8ee521b14b..971c0748e7 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -41,6 +41,7 @@ @@ -32,7 +32,7 @@ index b07d72a066..a9b332ff92 100644 struct d3d9 { diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c -index 4a41443e84..5e505b4cfa 100644 +index 9fbdcebf07..21f286ff38 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -362,7 +362,7 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch @@ -56,7 +56,7 @@ index 4a41443e84..5e505b4cfa 100644 caps->NumSimultaneousRTs = min(D3D_MAX_SIMULTANEOUS_RENDERTARGETS, caps->NumSimultaneousRTs); if (caps->PixelShaderVersion > 3) -@@ -679,6 +682,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect +@@ -682,6 +685,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCAPS9 *caps) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -64,7 +64,7 @@ index 4a41443e84..5e505b4cfa 100644 struct wined3d_caps wined3d_caps; HRESULT hr; -@@ -687,13 +691,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA +@@ -690,13 +694,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA if (!caps) return D3DERR_INVALIDCALL; @@ -81,7 +81,7 @@ index 4a41443e84..5e505b4cfa 100644 return hr; } -@@ -3433,14 +3439,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i +@@ -3450,14 +3456,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i UINT reg_idx, const float *data, UINT count) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -104,7 +104,7 @@ index 4a41443e84..5e505b4cfa 100644 return D3DERR_INVALIDCALL; } -@@ -3456,14 +3468,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i +@@ -3473,14 +3485,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i UINT reg_idx, float *data, UINT count) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); @@ -141,5 +141,5 @@ index 7cdf5ddbb9..1d37e900c2 100644 return hr; } -- -2.20.1 +2.21.0 diff --git a/patches/wined3d-SWVP-shaders/0003-wined3d-Report-actual-vertex-shader-float-constants-.patch b/patches/wined3d-SWVP-shaders/0003-wined3d-Report-actual-vertex-shader-float-constants-.patch index da42aeee..a5e96259 100644 --- a/patches/wined3d-SWVP-shaders/0003-wined3d-Report-actual-vertex-shader-float-constants-.patch +++ b/patches/wined3d-SWVP-shaders/0003-wined3d-Report-actual-vertex-shader-float-constants-.patch @@ -1,4 +1,4 @@ -From 62db64d73683192e892ea998d4392bb903f030cf Mon Sep 17 00:00:00 2001 +From 61bec7b8c33b6dd1119821135e74d8045d76d635 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 14:47:28 +0300 Subject: [PATCH 3/5] wined3d: Report actual vertex shader float constants @@ -8,15 +8,15 @@ Signed-off-by: Paul Gofman --- dlls/wined3d/adapter_gl.c | 3 ++- dlls/wined3d/device.c | 13 ++++++++++++- - dlls/wined3d/glsl_shader.c | 6 +++++- + dlls/wined3d/glsl_shader.c | 5 ++++- dlls/wined3d/wined3d_private.h | 2 ++ - 4 files changed, 21 insertions(+), 3 deletions(-) + 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c -index d94f63b3e4..d8ad17050c 100644 +index 4071ed0f82..382ba2c71c 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c -@@ -3722,7 +3722,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, +@@ -3768,7 +3768,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, d3d_info->limits.gs_version = shader_caps.gs_version; d3d_info->limits.ps_version = shader_caps.ps_version; d3d_info->limits.cs_version = shader_caps.cs_version; @@ -27,10 +27,10 @@ index d94f63b3e4..d8ad17050c 100644 d3d_info->limits.varying_count = shader_caps.varying_count; d3d_info->shader_double_precision = !!(shader_caps.wined3d_caps & WINED3D_SHADER_CAP_DOUBLE_PRECISION); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index ddf3302332..23796f712d 100644 +index 4ec4022dce..29c7f09c5e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -3599,10 +3599,21 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d +@@ -4074,10 +4074,21 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps) { @@ -54,18 +54,10 @@ index ddf3302332..23796f712d 100644 HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index e6ac84e3e2..2298d75cef 100644 +index fc3093f4d1..78e9070e9e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -11298,6 +11298,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win - const struct fragment_pipeline *fragment_pipe) - { - SIZE_T stack_size = wined3d_log2i(max(WINED3D_MAX_VS_CONSTS_F, WINED3D_MAX_PS_CONSTS_F)) + 1; -+ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct fragment_caps fragment_caps; - void *vertex_priv, *fragment_priv; - struct shader_glsl_priv *priv; -@@ -11473,7 +11474,10 @@ static void shader_glsl_get_caps(const struct wined3d_adapter *adapter, struct s +@@ -11185,7 +11185,10 @@ static void shader_glsl_get_caps(const struct wined3d_adapter *adapter, struct s caps->vs_version = gl_info->supported[ARB_VERTEX_SHADER] ? caps->vs_version : 0; caps->ps_version = gl_info->supported[ARB_FRAGMENT_SHADER] ? caps->ps_version : 0; @@ -78,10 +70,10 @@ index e6ac84e3e2..2298d75cef 100644 caps->varying_count = gl_info->limits.glsl_varyings; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index c55022c1d5..49746f3dfd 100644 +index 444ffdba1e..aa3152aee5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -164,6 +164,7 @@ struct wined3d_d3d_limits +@@ -166,6 +166,7 @@ struct wined3d_d3d_limits { unsigned int vs_version, hs_version, ds_version, gs_version, ps_version, cs_version; DWORD vs_uniform_count; @@ -89,7 +81,7 @@ index c55022c1d5..49746f3dfd 100644 DWORD ps_uniform_count; unsigned int varying_count; unsigned int ffp_textures; -@@ -684,6 +685,7 @@ enum wined3d_shader_conditional_op +@@ -695,6 +696,7 @@ enum wined3d_shader_conditional_op #define WINED3D_MAX_CONSTS_B 16 #define WINED3D_MAX_CONSTS_I 16 #define WINED3D_MAX_VS_CONSTS_F 256 @@ -98,5 +90,5 @@ index c55022c1d5..49746f3dfd 100644 /* FIXME: This needs to go up to 2048 for -- -2.20.1 +2.21.0 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 666f40e9..6f27753f 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 db88c8fc7440ddab35c8916c4986d536c338ff2e Mon Sep 17 00:00:00 2001 +From 5c7a094ac9505e402d8590b58066ff38181ccd0d Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 15:05:12 +0300 Subject: [PATCH 4/5] wined3d: Support SWVP vertex shader constants limit in @@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index f79f26125c..463ad3b34c 100644 +index f5c89723cb..6b56073d13 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c -@@ -6437,13 +6437,10 @@ static void test_vertex_shader_constant(void) +@@ -6455,13 +6455,10 @@ static void test_vertex_shader_constant(void) ok(consts_swvp == 8192, "Unexpected consts_swvp %u.\n", consts_swvp); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1); @@ -32,7 +32,7 @@ index f79f26125c..463ad3b34c 100644 ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); -@@ -6468,7 +6465,6 @@ static void test_vertex_shader_constant(void) +@@ -6486,7 +6483,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 f79f26125c..463ad3b34c 100644 ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); -@@ -6476,7 +6472,6 @@ static void test_vertex_shader_constant(void) +@@ -6494,7 +6490,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 f79f26125c..463ad3b34c 100644 hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c -index 8be58bfc63..740c4c565f 100644 +index 89571a126b..4be22728ae 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c -@@ -24705,7 +24705,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -24708,7 +24708,6 @@ static void test_mvp_software_vertex_shaders(void) hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, c_index, 1); ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, (unsigned int)c_index[0], c_color, 1); @@ -61,10 +61,10 @@ index 8be58bfc63..740c4c565f 100644 hr = IDirect3DDevice9_BeginScene(device); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 23796f712d..393f515796 100644 +index 29c7f09c5e..0056097ecc 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -2533,13 +2533,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, +@@ -2515,13 +2515,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -84,7 +84,7 @@ index 23796f712d..393f515796 100644 return WINED3DERR_INVALIDCALL; memcpy(&device->update_stateblock_state->vs_consts_f[start_idx], constants, count * sizeof(*constants)); -@@ -2566,12 +2570,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device +@@ -2548,12 +2552,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants) { const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; @@ -104,10 +104,10 @@ index 23796f712d..393f515796 100644 memcpy(constants, &device->state.vs_consts_f[start_idx], count * sizeof(*constants)); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 2298d75cef..d0da94b553 100644 +index 78e9070e9e..bdf5e221ca 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -2170,7 +2170,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev +@@ -1902,7 +1902,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev if (priv->consts_ubo) return; @@ -117,10 +117,10 @@ index 2298d75cef..d0da94b553 100644 update_heap_entry(heap, i, priv->next_constant_version); } diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c -index ec79e68eeb..5f87d864d7 100644 +index 80e58114c1..05149ad1af 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c -@@ -316,7 +316,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) +@@ -312,7 +312,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) } } @@ -129,7 +129,7 @@ index ec79e68eeb..5f87d864d7 100644 { if (stateblock->changed.vs_consts_f[i]) { -@@ -1579,7 +1579,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, +@@ -1588,7 +1588,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, stateblock_init_lights(stateblock->stateblock_state.light_state.light_map, device->stateblock_state.light_state.light_map); stateblock_savedstates_set_all(&stateblock->changed, @@ -138,7 +138,7 @@ index ec79e68eeb..5f87d864d7 100644 break; case WINED3D_SBT_PIXEL_STATE: -@@ -1591,7 +1591,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, +@@ -1600,7 +1600,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, stateblock_init_lights(stateblock->stateblock_state.light_state.light_map, device->stateblock_state.light_state.light_map); stateblock_savedstates_set_vertex(&stateblock->changed, @@ -148,10 +148,10 @@ index ec79e68eeb..5f87d864d7 100644 default: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 49746f3dfd..8170869bc9 100644 +index aa3152aee5..ccafddde39 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2975,7 +2975,7 @@ struct wined3d_state +@@ -3059,7 +3059,7 @@ struct wined3d_state BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I]; @@ -160,7 +160,7 @@ index 49746f3dfd..8170869bc9 100644 BOOL ps_consts_b[WINED3D_MAX_CONSTS_B]; struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I]; -@@ -3031,7 +3031,7 @@ struct wined3d_stateblock_state +@@ -3115,7 +3115,7 @@ struct wined3d_stateblock_state int base_vertex_index; struct wined3d_shader *vs; @@ -169,7 +169,7 @@ index 49746f3dfd..8170869bc9 100644 struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I]; BOOL vs_consts_b[WINED3D_MAX_CONSTS_B]; -@@ -3625,7 +3625,7 @@ struct wined3d_saved_states +@@ -3728,7 +3728,7 @@ struct wined3d_saved_states BOOL ps_consts_f[WINED3D_MAX_PS_CONSTS_F]; WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */ @@ -178,7 +178,7 @@ index 49746f3dfd..8170869bc9 100644 DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */ DWORD indices : 1; DWORD material : 1; -@@ -3661,7 +3661,7 @@ struct wined3d_stateblock +@@ -3765,7 +3765,7 @@ struct wined3d_stateblock unsigned int num_contained_vs_consts_i; DWORD contained_vs_consts_b[WINED3D_MAX_CONSTS_B]; unsigned int num_contained_vs_consts_b; @@ -188,5 +188,5 @@ index 49746f3dfd..8170869bc9 100644 DWORD contained_ps_consts_i[WINED3D_MAX_CONSTS_I]; unsigned int num_contained_ps_consts_i; -- -2.20.1 +2.21.0 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 b7f3f3ad..51b96084 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 5600740193109af864560cdc1d962de4eeb2e8a2 Mon Sep 17 00:00:00 2001 +From cc320513a8e038e2f87ec2953e71e5139fa33d55 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Mon, 25 Feb 2019 15:23:33 +0300 Subject: [PATCH 5/5] wined3d: Support SWVP mode vertex shaders. @@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman 7 files changed, 104 insertions(+), 49 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c -index 463ad3b34c..57521a5648 100644 +index 6b56073d13..0d1845b806 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c -@@ -6925,15 +6925,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET +@@ -6943,15 +6943,11 @@ float4 main(const float4 color : COLOR) : SV_TARGET vs = NULL; hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs); @@ -36,7 +36,7 @@ index 463ad3b34c..57521a5648 100644 refcount = IDirect3DDevice9_Release(device); ok(!refcount, "Device has %u references left.\n", refcount); -@@ -6950,20 +6946,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET +@@ -6968,20 +6964,16 @@ float4 main(const float4 color : COLOR) : SV_TARGET ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vs_1_256, &vs); @@ -60,10 +60,10 @@ index 463ad3b34c..57521a5648 100644 cleanup: refcount = IDirect3DDevice9_Release(device); diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c -index 740c4c565f..ec27adef80 100644 +index 4be22728ae..1fa168e4db 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c -@@ -24631,7 +24631,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -24634,7 +24634,6 @@ static void test_mvp_software_vertex_shaders(void) hr = IDirect3DDevice9_CreateVertexShader(device, reladdr_shader_code, &reladdr_shader); ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, pure_sw_shader_code, &pure_sw_shader); @@ -71,7 +71,7 @@ index 740c4c565f..ec27adef80 100644 ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration); ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); -@@ -24669,7 +24668,7 @@ static void test_mvp_software_vertex_shaders(void) +@@ -24672,7 +24671,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); @@ -80,7 +80,7 @@ index 740c4c565f..ec27adef80 100644 expected_color, color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); -@@ -24688,7 +24687,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -24691,7 +24690,6 @@ static void test_mvp_software_vertex_shaders(void) expected_color = 0x00ffffff; color = getPixelColor(device, 5, 5); @@ -88,7 +88,7 @@ index 740c4c565f..ec27adef80 100644 ok(color == expected_color, "Expected color 0x%08x, got 0x%08x (sw shader in sw mode).\n", expected_color, color); -@@ -24738,7 +24736,6 @@ static void test_mvp_software_vertex_shaders(void) +@@ -24741,7 +24739,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); @@ -97,10 +97,10 @@ index 740c4c565f..ec27adef80 100644 expected_color, color); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 393f515796..ad249eed84 100644 +index 0056097ecc..0ffb995784 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4056,6 +4056,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device * +@@ -4526,6 +4526,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device * warned = TRUE; } @@ -116,7 +116,7 @@ index 393f515796..ad249eed84 100644 } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index d0da94b553..c07ff2680c 100644 +index bdf5e221ca..d3f91ed37b 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -140,7 +140,9 @@ struct shader_glsl_priv @@ -139,7 +139,7 @@ index d0da94b553..c07ff2680c 100644 GLint uniform_i_locations[WINED3D_MAX_CONSTS_I]; GLint uniform_b_locations[WINED3D_MAX_CONSTS_B]; GLint pos_fixup_location; -@@ -1155,7 +1157,7 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st +@@ -1185,7 +1187,7 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st { GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c)); checkGLcall("glBindBuffer"); @@ -148,7 +148,7 @@ index d0da94b553..c07ff2680c 100644 NULL, GL_STREAM_DRAW)); checkGLcall("glBufferData"); } -@@ -1163,14 +1165,16 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st +@@ -1193,14 +1195,16 @@ static void bind_and_orphan_consts_ubo(const struct wined3d_gl_info *gl_info, st /* Context activation is done by the caller. */ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, const struct wined3d_vec4 *constants, const GLint *constant_locations, const struct constant_heap *heap, @@ -166,7 +166,7 @@ index d0da94b553..c07ff2680c 100644 unsigned max_const_used; if (priv->ubo_vs_c == -1) -@@ -1180,22 +1184,32 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co +@@ -1210,22 +1214,32 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co } bind_and_orphan_consts_ubo(gl_info, priv); @@ -205,7 +205,7 @@ index d0da94b553..c07ff2680c 100644 checkGLcall("glBufferSubData"); return; } -@@ -1860,7 +1874,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1592,7 +1606,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context GL_EXTCALL(glGenBuffers(1, &priv->ubo_vs_c)); GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_vs_c)); checkGLcall("glBindBuffer (UBO)"); @@ -214,7 +214,7 @@ index d0da94b553..c07ff2680c 100644 NULL, GL_STREAM_DRAW)); checkGLcall("glBufferData"); } -@@ -1872,7 +1886,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1604,7 +1618,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context if (update_mask & WINED3D_SHADER_CONST_VS_F) shader_glsl_load_constants_f(vshader, gl_info, state->vs_consts_f, @@ -224,7 +224,7 @@ index d0da94b553..c07ff2680c 100644 if (update_mask & WINED3D_SHADER_CONST_VS_I) shader_glsl_load_constants_i(vshader, gl_info, state->vs_consts_i, -@@ -2025,7 +2040,8 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1757,7 +1772,8 @@ 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, @@ -234,7 +234,7 @@ index d0da94b553..c07ff2680c 100644 if (update_mask & WINED3D_SHADER_CONST_PS_I) shader_glsl_load_constants_i(pshader, gl_info, state->ps_consts_i, -@@ -2170,7 +2186,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev +@@ -1902,7 +1918,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev if (priv->consts_ubo) return; @@ -243,7 +243,7 @@ index d0da94b553..c07ff2680c 100644 { update_heap_entry(heap, i, priv->next_constant_version); } -@@ -2515,7 +2531,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont +@@ -2247,7 +2263,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont shader_addline(buffer,"layout(std140) uniform vs_c_ubo\n" "{ \n" " vec4 %s_c[%u];\n" @@ -252,7 +252,7 @@ index d0da94b553..c07ff2680c 100644 } else if (shader->limits->constant_float > 0) { -@@ -10220,12 +10236,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * +@@ -9931,12 +9947,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * } else if (!priv->consts_ubo) { @@ -268,7 +268,7 @@ index d0da94b553..c07ff2680c 100644 } for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i) -@@ -10544,6 +10561,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const +@@ -10255,6 +10272,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const vs_list = &ffp_shader->linked_programs; } @@ -279,7 +279,7 @@ index d0da94b553..c07ff2680c 100644 hshader = state->shader[WINED3D_SHADER_TYPE_HULL]; if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_HULL)) && ctx_data->glsl_program) hs_id = ctx_data->glsl_program->hs.id; -@@ -11297,7 +11318,7 @@ static void constant_heap_free(struct constant_heap *heap) +@@ -11008,7 +11029,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 fragment_pipeline *fragment_pipe) { @@ -288,7 +288,7 @@ index d0da94b553..c07ff2680c 100644 const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct fragment_caps fragment_caps; void *vertex_priv, *fragment_priv; -@@ -11308,6 +11329,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11019,6 +11040,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]; @@ -307,7 +307,7 @@ index d0da94b553..c07ff2680c 100644 string_buffer_list_init(&priv->string_buffers); if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv))) -@@ -11337,7 +11370,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win +@@ -11048,7 +11081,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win goto fail; } @@ -317,7 +317,7 @@ index d0da94b553..c07ff2680c 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 5f8bc1d47d..87b02fc24c 100644 +index d7fdc9cfdb..68cea78778 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -589,7 +589,7 @@ static void shader_delete_constant_list(struct list *clist) @@ -483,10 +483,10 @@ index 0c6bb93317..1051307e88 100644 WARN("Invalid shader version %u.%u (%#x).\n", major, minor, *byte_code); return NULL; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 8170869bc9..edc96f8af9 100644 +index ccafddde39..bfeec8c0b0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -4433,6 +4433,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader, +@@ -4537,6 +4537,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader, return FALSE; } @@ -501,5 +501,5 @@ index 8170869bc9..edc96f8af9 100644 void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int index, struct wined3d_matrix *mat) DECLSPEC_HIDDEN; -- -2.20.1 +2.21.0