summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiancarlo Razzolini2017-05-23 00:50:16 -0300
committerGiancarlo Razzolini2017-05-23 00:50:16 -0300
commitd795dd2e7c6dc89cf5641d1e5a03edf3910a2875 (patch)
tree7c9d297ec5a431a0fc77ab35b7c9c0da5126cdea
parentf31f781975a77cd4c402a3d066f5141745302229 (diff)
downloadaur-d795dd2e7c6dc89cf5641d1e5a03edf3910a2875.tar.gz
Updating to version 2.6 of the patch
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD14
-rw-r--r--patch-2.6-ivb.patch (renamed from patch-1.9.20-ivb.patch)199
3 files changed, 129 insertions, 112 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2a8106c5d4ad..2f550837d396 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Tue Oct 25 17:35:29 UTC 2016
pkgbase = wine-staging-ivb
pkgdesc = A compatibility layer for running Windows programs - Staging branch: indexed vertex blending - https://bugs.winehq.org/show_bug.cgi?id=39057
- pkgver = 1.9.20
+ pkgver = 2.6
pkgrel = 1
url = http://www.wine-staging.com
arch = i686
@@ -46,8 +44,8 @@ pkgbase = wine-staging-ivb
makedepends = lib32-mesa
makedepends = mesa-libgl
makedepends = lib32-mesa-libgl
- makedepends = libcl
- makedepends = lib32-libcl
+ makedepends = opencl-icd-loader
+ makedepends = lib32-opencl-icd-loader
makedepends = libxslt
makedepends = lib32-libxslt
makedepends = libpulse
@@ -117,8 +115,8 @@ pkgbase = wine-staging-ivb
optdepends = lib32-libxinerama
optdepends = ncurses
optdepends = lib32-ncurses
- optdepends = libcl
- optdepends = lib32-libcl
+ optdepends = opencl-icd-loader
+ optdepends = lib32-opencl-icd-loader
optdepends = libxslt
optdepends = lib32-libxslt
optdepends = libva
@@ -132,20 +130,24 @@ pkgbase = wine-staging-ivb
optdepends = cups
optdepends = samba
optdepends = dosbox
- provides = wine=1.9.20
- provides = wine-wow64=1.9.20
+ provides = wine=2.6
+ provides = wine-wow64=2.6
conflicts = wine
conflicts = wine-ivb
conflicts = wine-staging
conflicts = wine-wow64
options = staticlibs
- source = wine-staging-ivb-1.9.20.tar.gz::https://github.com/wine-compholio/wine-patched/archive/staging-1.9.20.tar.gz
+ source = wine-staging-ivb-2.6.tar.gz::https://github.com/wine-compholio/wine-patched/archive/staging-2.6.tar.gz
source = 30-win32-aliases.conf
- source = patch-1.9.20-ivb.patch
+ source = patch-2.6-ivb.patch
source = patch_temp_constants.patch
- sha512sums = 4fb7c18f4c1451c94eb9ea7239da45b40781f4e044266b651bf3079ee0605dc27599fab72cf9259e31c59c89f161596c6d65513165125f560a50800e3f946a72
+ sha1sums = d4659ab167ece2a296eb4712cb93d8aef402870e
+ sha1sums = 023a5c901c6a091c56e76b6a62d141d87cce9fdb
+ sha1sums = 792e97592b3a391b985c4990a966ee826bef53ab
+ sha1sums = 3f94ad1c60213eac5d7e68c959423d0f18ed0b5f
+ sha512sums = 05c9edb47c85778c1a44de80c1a477d4677a6cc11f6dfbf78201fb1c09145ab7aa309ca82c30061dabe7ae97430acde55e322a7fc368154a9f8c371c5b8dec2a
sha512sums = 6e54ece7ec7022b3c9d94ad64bdf1017338da16c618966e8baf398e6f18f80f7b0576edf1d1da47ed77b96d577e4cbb2bb0156b0b11c183a0accf22654b0a2bb
- sha512sums = 42af4c34688119e38df40802d1450a7623749ea268ea25400ad6acddba11c55c4a3efc3a658bfcf071595e3ac7d45b9885b7efbd0eaebd22cb7ac1f7cc601529
+ sha512sums = 3caf6fb7ad80f2b6cf6eba16570ac68a07cd8e5bed4af59c21e7509301014a76d27d714fd148f35cb04b085236469f08d7df4ab7e9d82173879c91dab2cbfb2b
sha512sums = 54e7927ea07137f2383734f65147ae18366a65a17c1970af06b13d5597f501ade3b2b435311bfae1759070895473f09382d75676e8b774c52ce540bc06cf5461
pkgname = wine-staging-ivb
diff --git a/PKGBUILD b/PKGBUILD
index 7c45417ff8a0..dc358f7ced1f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
pkgname=wine-staging-ivb
-pkgver=1.9.20
+pkgver=2.6
pkgrel=1
_pkgbasever=${pkgver/rc/-rc}
@@ -16,9 +16,13 @@ source=("${pkgname}-${pkgver}.tar.gz::https://github.com/wine-compholio/wine-pat
30-win32-aliases.conf
patch-$pkgver-ivb.patch
patch_temp_constants.patch)
-sha512sums=('4fb7c18f4c1451c94eb9ea7239da45b40781f4e044266b651bf3079ee0605dc27599fab72cf9259e31c59c89f161596c6d65513165125f560a50800e3f946a72'
+sha1sums=('d4659ab167ece2a296eb4712cb93d8aef402870e'
+ '023a5c901c6a091c56e76b6a62d141d87cce9fdb'
+ '792e97592b3a391b985c4990a966ee826bef53ab'
+ '3f94ad1c60213eac5d7e68c959423d0f18ed0b5f')
+sha512sums=('05c9edb47c85778c1a44de80c1a477d4677a6cc11f6dfbf78201fb1c09145ab7aa309ca82c30061dabe7ae97430acde55e322a7fc368154a9f8c371c5b8dec2a'
'6e54ece7ec7022b3c9d94ad64bdf1017338da16c618966e8baf398e6f18f80f7b0576edf1d1da47ed77b96d577e4cbb2bb0156b0b11c183a0accf22654b0a2bb'
- '42af4c34688119e38df40802d1450a7623749ea268ea25400ad6acddba11c55c4a3efc3a658bfcf071595e3ac7d45b9885b7efbd0eaebd22cb7ac1f7cc601529'
+ '3caf6fb7ad80f2b6cf6eba16570ac68a07cd8e5bed4af59c21e7509301014a76d27d714fd148f35cb04b085236469f08d7df4ab7e9d82173879c91dab2cbfb2b'
'54e7927ea07137f2383734f65147ae18366a65a17c1970af06b13d5597f501ade3b2b435311bfae1759070895473f09382d75676e8b774c52ce540bc06cf5461')
pkgdesc="A compatibility layer for running Windows programs - Staging branch: indexed vertex blending - https://bugs.winehq.org/show_bug.cgi?id=39057"
@@ -62,7 +66,7 @@ makedepends=(autoconf ncurses bison perl fontforge flex
libxcomposite lib32-libxcomposite
mesa lib32-mesa
mesa-libgl lib32-mesa-libgl
- libcl lib32-libcl
+ opencl-icd-loader lib32-opencl-icd-loader
libxslt lib32-libxslt
libpulse lib32-libpulse
libva lib32-libva
@@ -87,7 +91,7 @@ optdepends=(
libxcomposite lib32-libxcomposite
libxinerama lib32-libxinerama
ncurses lib32-ncurses
- libcl lib32-libcl
+ opencl-icd-loader lib32-opencl-icd-loader
libxslt lib32-libxslt
libva lib32-libva
gtk3 lib32-gtk3
diff --git a/patch-1.9.20-ivb.patch b/patch-2.6-ivb.patch
index 78dc16754d6f..d0c6a4c844f1 100644
--- a/patch-1.9.20-ivb.patch
+++ b/patch-2.6-ivb.patch
@@ -1,8 +1,8 @@
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
-index a308311..3afa992 100644
+index f8860b7..2547b02 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
-@@ -19602,6 +19602,261 @@ done:
+@@ -19680,6 +19680,263 @@ done:
DestroyWindow(window);
}
@@ -156,7 +156,8 @@ index a308311..3afa992 100644
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_VERTEXBLEND, D3DVBF_3WEIGHTS);
+ ok(hr == D3D_OK, "(%s) IDirect3DDevice9_SetRenderState failed %08x\n", test_id_str, hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_INDEXEDVERTEXBLENDENABLE, TRUE);
-+ ok(hr == D3D_OK, "(%s) IDirect3DDevice9_SetRenderState D3DRS_INDEXEDVERTEXBLENDENABLE failed %08x\n", test_id_str, hr);
++ ok(hr == D3D_OK, "(%s) IDirect3DDevice9_SetRenderState D3DRS_INDEXEDVERTEXBLENDENABLE failed %08x\n",
++ test_id_str, hr);
+
+ for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i)
+ {
@@ -171,7 +172,8 @@ index a308311..3afa992 100644
+ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZB4 | D3DFVF_LASTBETA_UBYTE4);
+ ok(SUCCEEDED(hr), "(%s) Failed to set FVF, hr %#x.\n", test_id_str, hr);
+
-+ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, tests[i].vertex_data, 6 * sizeof(float) + sizeof(DWORD));
++ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, tests[i].vertex_data,
++ 6 * sizeof(float) + sizeof(DWORD));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_EndScene(device);
@@ -197,7 +199,7 @@ index a308311..3afa992 100644
+ ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr);
+ }
+done:
-+ ;
++ ;
+}
+
+static void test_indexed_vertex_blending(void)
@@ -263,8 +265,8 @@ index a308311..3afa992 100644
+
static void test_updatetexture(void)
{
- IDirect3DDevice9 *device;
-@@ -21790,6 +22045,7 @@ START_TEST(visual)
+ BOOL r32f_supported, ati2n_supported, do_visual_test;
+@@ -22717,6 +22974,7 @@ START_TEST(visual)
test_multisample_mismatch();
test_texcoordindex();
test_vertex_blending();
@@ -273,10 +275,10 @@ index a308311..3afa992 100644
test_depthbias();
test_flip();
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
-index f07b3ab..d49c8bb 100644
+index 4d1c2a8..0ef947e 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
-@@ -3430,6 +3430,8 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
+@@ -3685,6 +3685,8 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
{
device->shader_backend->shader_load_constants(device->shader_priv, context, state);
context->constant_update_mask = 0;
@@ -286,10 +288,10 @@ index f07b3ab..d49c8bb 100644
if (context->update_shader_resource_bindings)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
-index c91b114..7ef05c8 100644
+index 43352eb..d5974a2 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
-@@ -857,7 +857,8 @@ static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
+@@ -1409,7 +1409,8 @@ static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
const struct wined3d_cs_set_transform *op = data;
cs->state.transforms[op->state] = op->matrix;
@@ -300,10 +302,10 @@ index c91b114..7ef05c8 100644
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
-index 84834a4..eef6bb3 100644
+index 7e90be5..8a7f294 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
-@@ -3281,10 +3281,14 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
+@@ -3290,10 +3290,14 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps)
{
@@ -320,22 +322,22 @@ index 84834a4..eef6bb3 100644
HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx,
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
-index 9233016..f8b0df7 100644
+index b5a8e47..f8e7f29 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
-@@ -3825,6 +3825,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD
- adapter->d3d_info.xyzrhw = vertex_caps.xyzrhw;
+@@ -4189,6 +4189,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
adapter->d3d_info.ffp_generic_attributes = vertex_caps.ffp_generic_attributes;
adapter->d3d_info.limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices;
+ adapter->d3d_info.limits.active_light_count = vertex_caps.max_active_lights;
+ adapter->d3d_info.limits.ffp_max_vertex_blend_matrix_index = vertex_caps.max_vertex_blend_matrix_index;
adapter->d3d_info.emulated_flatshading = vertex_caps.emulated_flatshading;
adapter->fragment_pipe->get_caps(gl_info, &fragment_caps);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
-index 898cabf..25992b5 100644
+index 1451116..3def3cc 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
-@@ -110,6 +110,10 @@ struct shader_glsl_priv {
+@@ -131,6 +131,10 @@ struct shader_glsl_priv
struct wine_rb_tree ffp_fragment_shaders;
BOOL ffp_proj_control;
BOOL legacy_lighting;
@@ -346,17 +348,17 @@ index 898cabf..25992b5 100644
};
struct glsl_vs_program
-@@ -122,7 +126,8 @@ struct glsl_vs_program
+@@ -143,7 +147,8 @@ struct glsl_vs_program
GLint uniform_b_locations[WINED3D_MAX_CONSTS_B];
GLint pos_fixup_location;
- GLint modelview_matrix_location[MAX_VERTEX_BLENDS];
-+ GLint modelview_matrix_location[MAX_VERTEX_BLEND_IND_UNF+1];
++ GLint modelview_matrix_location[MAX_VERTEX_BLEND_IND_UNF + 1];
+ GLint modelview_block_index;
GLint projection_matrix_location;
GLint normal_matrix_location;
GLint texture_matrix_location[MAX_TEXTURES];
-@@ -1369,18 +1374,47 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
+@@ -1745,18 +1750,47 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
shader_glsl_ffp_vertex_normalmatrix_uniform(context, state, prog);
}
@@ -374,7 +376,7 @@ index 898cabf..25992b5 100644
- get_modelview_matrix(context, state, i, &mat);
- GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[i], 1, FALSE, &mat._11));
- checkGLcall("glUniformMatrix4fv");
-+ if (context->blend_mat_update_mask[i/32] & (1<<(i&31)))
++ if (context->blend_mat_update_mask[i / 32] & (1 << (i & 31)))
+ {
+ get_modelview_matrix(context, state, i, &mat);
+ GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[i], 1, FALSE, &mat._11));
@@ -383,14 +385,14 @@ index 898cabf..25992b5 100644
+ }
+ if (prog->vs.modelview_block_index != -1 && priv->ivb_use_ubo && priv->ubo_blend_mat_need_update)
+ {
-+ struct wined3d_matrix* p;
++ struct wined3d_matrix *p;
+
+ if (priv->ubo_modelview == -1)
+ {
+ FIXME("UBO buffer with vertex blend matrices is not initialized");
+ }
+ GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_modelview));
-+ p = (struct wined3d_matrix*)GL_EXTCALL(glMapBuffer(GL_UNIFORM_BUFFER, GL_WRITE_ONLY));
++ p = (struct wined3d_matrix *)GL_EXTCALL(glMapBuffer(GL_UNIFORM_BUFFER, GL_WRITE_ONLY));
+ checkGLcall("glMapBuffer");
+ if (p == NULL)
+ FIXME("Could not map UBO buffer with vertex blend matrices");
@@ -398,7 +400,7 @@ index 898cabf..25992b5 100644
+ {
+ for (i = 0; i <= MAX_VERTEX_BLEND_IND_UBO; ++i)
+ {
-+ if (context->blend_mat_update_mask[i/32] & (1<<(i&31)))
++ if (context->blend_mat_update_mask[i / 32] & (1 << (i & 31)))
+ {
+ get_modelview_matrix(context, state, i, &p[i]);
+ }
@@ -410,25 +412,25 @@ index 898cabf..25992b5 100644
}
}
-@@ -6299,8 +6333,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7838,8 +7872,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
{
{"vec4", "ffp_attrib_position"}, /* WINED3D_FFP_POSITION */
{"vec4", "ffp_attrib_blendweight"}, /* WINED3D_FFP_BLENDWEIGHT */
- /* TODO: Indexed vertex blending */
- {"float", ""}, /* WINED3D_FFP_BLENDINDICES */
-+ {"vec4", "ffp_attrib_blendindices"}, /* WINED3D_FFP_BLENDINDICES */
++ {"vec4", "ffp_attrib_blendindices"}, /* WINED3D_FFP_BLENDINDICES */
{"vec3", "ffp_attrib_normal"}, /* WINED3D_FFP_NORMAL */
{"float", "ffp_attrib_psize"}, /* WINED3D_FFP_PSIZE */
{"vec4", "ffp_attrib_diffuse"}, /* WINED3D_FFP_DIFFUSE */
-@@ -6312,10 +6345,15 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7851,10 +7884,15 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+ BOOL legacy_lighting = priv->legacy_lighting;
+ GLuint shader_obj;
unsigned int i;
- BOOL legacy_context = gl_info->supported[WINED3D_GL_LEGACY_CONTEXT];
- BOOL output_legacy_fogcoord = legacy_context;
+ BOOL use_ubo;
string_buffer_clear(buffer);
- shader_addline(buffer, "%s\n", shader_glsl_get_version_declaration(gl_info, NULL));
+ shader_glsl_add_version_declaration(buffer, gl_info, NULL);
+ use_ubo = settings->vertexblends > 0 && settings->vb_indices && priv->ivb_use_ubo;
+ TRACE("settings->vb_indices: %d, use_ubo: %d\n",settings->vb_indices, use_ubo);
+ if (use_ubo)
@@ -436,7 +438,7 @@ index 898cabf..25992b5 100644
if (shader_glsl_use_explicit_attrib_location(gl_info))
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
-@@ -6325,7 +6363,16 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7869,7 +7907,16 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
}
shader_addline(buffer, "\n");
@@ -446,15 +448,15 @@ index 898cabf..25992b5 100644
+ if (use_ubo)
+ {
+ shader_addline(buffer,"layout(std140) uniform ffp_modelview_ubo\n\
-+ { \n\
-+ mat4 ffp_modelviews[%u];\n\
-+ };\n",MAX_VERTEX_BLEND_IND_UBO+1);
++ { \n\
++ mat4 ffp_modelviews[%u];\n\
++ };\n", MAX_VERTEX_BLEND_IND_UBO + 1);
+ }
+
shader_addline(buffer, "uniform mat4 ffp_projection_matrix;\n");
shader_addline(buffer, "uniform mat3 ffp_normal_matrix;\n");
shader_addline(buffer, "uniform mat4 ffp_texture_matrix[%u];\n", MAX_TEXTURES);
-@@ -6384,6 +6431,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7931,6 +7978,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, "\nvoid main()\n{\n");
shader_addline(buffer, "float m;\n");
shader_addline(buffer, "vec3 r;\n");
@@ -463,35 +465,38 @@ index 898cabf..25992b5 100644
for (i = 0; i < ARRAY_SIZE(attrib_info); ++i)
{
-@@ -6412,9 +6461,24 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7959,9 +8008,27 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
for (i = 0; i < settings->vertexblends; ++i)
shader_addline(buffer, "ffp_attrib_blendweight[%u] -= ffp_attrib_blendweight[%u];\n", settings->vertexblends, i);
- shader_addline(buffer, "vec4 ec_pos = vec4(0.0);\n");
- for (i = 0; i < settings->vertexblends + 1; ++i)
- shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * (ffp_modelview_matrix[%u] * ffp_attrib_position);\n", i, i);
-+ if (settings->vb_indices)
-+ {
++ if (settings->vb_indices)
++ {
+ shader_addline(buffer, "vec4 ec_pos = vec4(0.0);\n");
+ for (i = 0; i < settings->vertexblends + 1; ++i)
+ {
-+ shader_addline(buffer, "ind = int(ffp_attrib_blendindices[%u]+0.1);\n", i);
++ shader_addline(buffer, "ind = int(ffp_attrib_blendindices[%u] + 0.1);\n", i);
+ if (use_ubo)
-+ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * (ffp_modelviews[ind] * ffp_attrib_position);\n", i);
++ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * "
++ "(ffp_modelviews[ind] * ffp_attrib_position);\n", i);
+ else
-+ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * (ffp_modelview_matrix[ind] * ffp_attrib_position);\n", i);
++ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * "
++ "(ffp_modelview_matrix[ind] * ffp_attrib_position);\n", i);
+ }
+ }
+ else
+ {
+ shader_addline(buffer, "vec4 ec_pos = vec4(0.0);\n");
+ for (i = 0; i < settings->vertexblends + 1; ++i)
-+ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * (ffp_modelview_matrix[%u] * ffp_attrib_position);\n", i, i);
++ shader_addline(buffer, "ec_pos += ffp_attrib_blendweight[%u] * "
++ "(ffp_modelview_matrix[%u] * ffp_attrib_position);\n", i, i);
+ }
shader_addline(buffer, "gl_Position = ffp_projection_matrix * ec_pos;\n");
if (settings->clipping)
-@@ -6432,7 +6496,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
+@@ -7985,7 +8052,23 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
else
{
for (i = 0; i < settings->vertexblends + 1; ++i)
@@ -499,19 +504,24 @@ index 898cabf..25992b5 100644
+ {
+ if (settings->vb_indices)
+ {
-+ shader_addline(buffer, "ind = int(ffp_attrib_blendindices[%u]+0.1);\n", i);
++ shader_addline(buffer, "ind = int(ffp_attrib_blendindices[%u] + 0.1);\n", i);
+ if (use_ubo)
-+ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * (mat3(ffp_modelviews[ind]) * ffp_attrib_normal);\n", i);
++ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * "
++ "(mat3(ffp_modelviews[ind]) * ffp_attrib_normal);\n", i);
+ else
-+ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * (mat3(ffp_modelview_matrix[ind]) * ffp_attrib_normal);\n", i);
-+ }
++ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * "
++ "(mat3(ffp_modelview_matrix[ind]) * ffp_attrib_normal);\n", i);
++ }
+ else
-+ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * (mat3(ffp_modelview_matrix[%u]) * ffp_attrib_normal);\n", i, i);
++ {
++ shader_addline(buffer, "normal += ffp_attrib_blendweight[%u] * "
++ "(mat3(ffp_modelview_matrix[%u]) * ffp_attrib_normal);\n", i, i);
++ }
+ }
}
if (settings->normalize)
-@@ -7278,11 +7353,35 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
+@@ -8858,11 +8941,36 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
vs->pos_fixup_location = GL_EXTCALL(glGetUniformLocation(program_id, "pos_fixup"));
@@ -536,7 +546,8 @@ index 898cabf..25992b5 100644
+ GL_EXTCALL(glGenBuffers(1, &priv->ubo_modelview));
+ GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_modelview));
+ checkGLcall("glBindBuffer (UBO)");
-+ GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER, sizeof(struct wined3d_matrix)*(MAX_VERTEX_BLEND_IND_UBO+1), NULL, GL_DYNAMIC_DRAW));
++ GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER,
++ sizeof(struct wined3d_matrix) * (MAX_VERTEX_BLEND_IND_UBO + 1), NULL, GL_DYNAMIC_DRAW));
+ checkGLcall("glBufferData (UBO)");
+ GL_EXTCALL(glBindBufferBase(GL_UNIFORM_BUFFER, 1, priv->ubo_modelview));
+ checkGLcall("glBindBufferBase");
@@ -548,7 +559,7 @@ index 898cabf..25992b5 100644
vs->projection_matrix_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_projection_matrix"));
vs->normal_matrix_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_normal_matrix"));
for (i = 0; i < MAX_TEXTURES; ++i)
-@@ -7694,7 +7793,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
+@@ -9395,7 +9503,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW
| WINED3D_SHADER_CONST_FFP_PROJ;
@@ -557,7 +568,7 @@ index 898cabf..25992b5 100644
{
if (entry->vs.modelview_matrix_location[i] != -1)
{
-@@ -7703,6 +7802,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
+@@ -9404,6 +9512,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
}
}
@@ -567,7 +578,7 @@ index 898cabf..25992b5 100644
for (i = 0; i < MAX_TEXTURES; ++i)
{
if (entry->vs.texture_matrix_location[i] != -1)
-@@ -7947,7 +8049,12 @@ static void shader_glsl_select(void *shader_priv, struct wined3d_context *contex
+@@ -9538,7 +9649,12 @@ static void shader_glsl_select(void *shader_priv, struct wined3d_context *contex
checkGLcall("glUseProgram");
if (program_id)
@@ -578,9 +589,9 @@ index 898cabf..25992b5 100644
+ context->blend_mat_update_mask[i] = 0xFFFFFFFF;
+ }
}
- }
-@@ -8265,6 +8372,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
+ context->shader_update_mask |= (1u << WINED3D_SHADER_TYPE_COMPUTE);
+@@ -9860,6 +9976,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
fragment_pipe->get_caps(gl_info, &fragment_caps);
priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL;
priv->legacy_lighting = device->wined3d->flags & WINED3D_LEGACY_FFP_LIGHTING;
@@ -589,19 +600,20 @@ index 898cabf..25992b5 100644
device->vertex_priv = vertex_priv;
device->fragment_priv = fragment_priv;
-@@ -8310,6 +8419,11 @@ static void shader_glsl_free(struct wined3d_device *device)
+@@ -9891,6 +10009,12 @@ static void shader_glsl_free(struct wined3d_device *device)
string_buffer_free(&priv->shader_buffer);
priv->fragment_pipe->free_private(device);
priv->vertex_pipe->vp_free(device);
+ if (priv->ubo_modelview != -1)
+ {
++ const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
+ GL_EXTCALL(glDeleteBuffers(1, &priv->ubo_modelview));
+ priv->ubo_modelview = -1;
+ }
HeapFree(GetProcessHeap(), 0, device->shader_priv);
device->shader_priv = NULL;
-@@ -8631,7 +8745,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
+@@ -10299,7 +10423,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
caps->ffp_generic_attributes = TRUE;
caps->max_active_lights = MAX_ACTIVE_LIGHTS;
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;
@@ -614,12 +626,12 @@ index 898cabf..25992b5 100644
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
| WINED3DVTXPCAPS_MATERIALSOURCE7
| WINED3DVTXPCAPS_VERTEXFOG
-@@ -8792,23 +8910,38 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
+@@ -10464,23 +10592,38 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
static void glsl_vertex_pipe_world(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id)
{
+ unsigned int i;
-+ struct shader_glsl_priv *priv = context->swapchain->device->shader_priv;
++ struct shader_glsl_priv *priv = context->device->shader_priv;
context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW;
+ for (i = 0; i < MAX_VB_UPD_WORDS; i++)
+ context->blend_mat_update_mask[i] = 0xFFFFFFFF;
@@ -630,10 +642,10 @@ index 898cabf..25992b5 100644
const struct wined3d_state *state, DWORD state_id)
{
+ UINT matrix_ind;
-+ struct shader_glsl_priv *priv = context->swapchain->device->shader_priv;
++ struct shader_glsl_priv *priv = context->device->shader_priv;
+ matrix_ind = state_id - STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0));
context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_VERTEXBLEND;
-+ context->blend_mat_update_mask[matrix_ind/32] |= 1 << (matrix_ind & 31);
++ context->blend_mat_update_mask[matrix_ind / 32] |= 1 << (matrix_ind & 31);
+ priv->ubo_blend_mat_need_update = TRUE;
}
@@ -642,7 +654,7 @@ index 898cabf..25992b5 100644
const struct wined3d_gl_info *gl_info = context->gl_info;
unsigned int k;
+ unsigned int i;
-+ struct shader_glsl_priv *priv = context->swapchain->device->shader_priv;
++ struct shader_glsl_priv *priv = context->device->shader_priv;
context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW
| WINED3D_SHADER_CONST_FFP_LIGHTS
@@ -651,9 +663,9 @@ index 898cabf..25992b5 100644
+ context->blend_mat_update_mask[i] = 0xFFFFFFFF;
+ priv->ubo_blend_mat_need_update = TRUE;
- for (k = 0; k < gl_info->limits.clipplanes; ++k)
+ if (needs_legacy_glsl_syntax(gl_info))
{
-@@ -8977,6 +9110,258 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
+@@ -10700,6 +10843,258 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
@@ -913,10 +925,10 @@ index 898cabf..25992b5 100644
{STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), glsl_vertex_pipe_texmatrix}, WINED3D_GL_EXT_NONE },
{STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), glsl_vertex_pipe_texmatrix}, WINED3D_GL_EXT_NONE },
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
-index dabc5cf..6b48542 100644
+index 2c47ce6..ae15c27 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
-@@ -5819,7 +5819,8 @@ static void prune_invalid_states(struct StateEntry *state_table, const struct wi
+@@ -5950,7 +5950,8 @@ static void prune_invalid_states(struct StateEntry *state_table, const struct wi
state_table[i].apply = state_undefined;
}
@@ -927,25 +939,24 @@ index dabc5cf..6b48542 100644
for (i = start; i <= last; ++i)
{
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
-index abe52dd..ba502eb 100644
+index 0eacc82..a90a3b0 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
-@@ -5471,6 +5471,10 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
+@@ -5783,6 +5783,9 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
settings->flatshading = FALSE;
- settings->padding = 0;
+ settings->swizzle_map = si->swizzle_map;
+
-+ settings->vb_indices = 0;
-+ if (state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] != 0 && (si->use_map & (1 << WINED3D_FFP_BLENDINDICES)) != 0)
++ if (state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] && (si->use_map & (1 << WINED3D_FFP_BLENDINDICES)))
+ settings->vb_indices = 1;
}
- static int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
+ int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c
-index febd695..c213950 100644
+index 4fa6d54..65cdd3b 100644
--- a/dlls/wined3d/vertexdeclaration.c
+++ b/dlls/wined3d/vertexdeclaration.c
-@@ -111,6 +111,16 @@ static BOOL declaration_element_valid_ffp(const struct wined3d_vertex_element *e
+@@ -119,6 +119,16 @@ static BOOL declaration_element_valid_ffp(const struct wined3d_vertex_element *e
return FALSE;
}
@@ -963,45 +974,45 @@ index febd695..c213950 100644
switch(element->format)
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
-index 6a8bbcb..0b376b6 100644
+index 9e48b49..a71ee87 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
-@@ -190,6 +190,9 @@ void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN;
- #define MAX_SHADER_RESOURCE_VIEWS 128
+@@ -164,6 +164,7 @@ struct wined3d_d3d_limits
+ unsigned int ffp_blend_stages;
+ unsigned int ffp_vertex_blend_matrices;
+ unsigned int active_light_count;
++ unsigned int ffp_max_vertex_blend_matrix_index;
+ };
+
+ typedef void (WINE_GLAPI *wined3d_ffp_attrib_func)(const void *data);
+@@ -272,6 +273,9 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
+ #define MAX_TGSM_REGISTERS 8192
#define MAX_VERTEX_BLENDS 4
#define MAX_MULTISAMPLE_TYPES 8
+#define MAX_VERTEX_BLEND_IND_UBO 255
+#define MAX_VERTEX_BLEND_IND_UNF 149
-+#define MAX_VB_UPD_WORDS ((MAX_VERTEX_BLEND_IND_UBO+1 + 31)/32)
++#define MAX_VB_UPD_WORDS ((MAX_VERTEX_BLEND_IND_UBO + 1 + 31) / 32)
struct min_lookup
{
-@@ -1393,6 +1396,7 @@ struct wined3d_context
- DWORD padding : 14;
+@@ -1726,6 +1730,7 @@ struct wined3d_context
+ DWORD last_swizzle_map; /* MAX_ATTRIBS, 16 */
DWORD shader_update_mask;
DWORD constant_update_mask;
+ DWORD blend_mat_update_mask[MAX_VB_UPD_WORDS];
DWORD numbered_array_mask;
GLenum tracking_parm; /* Which source is tracking current colour */
GLenum untracked_materials[2];
-@@ -1990,6 +1994,7 @@ struct wined3d_d3d_limits
- UINT ffp_textures;
- UINT ffp_blend_stages;
- UINT ffp_vertex_blend_matrices;
-+ UINT ffp_max_vertex_blend_matrix_index;
- };
-
- typedef void (WINE_GLAPI *wined3d_ffp_attrib_func)(const void *data);
-@@ -2171,7 +2176,8 @@ struct wined3d_ffp_vs_settings
- DWORD texcoords : 8; /* MAX_TEXTURES */
+@@ -2534,7 +2539,8 @@ struct wined3d_ffp_vs_settings
DWORD ortho_fog : 1;
DWORD flatshading : 1;
-- DWORD padding : 10;
+ DWORD swizzle_map : 16; /* MAX_ATTRIBS, 16 */
+- DWORD padding : 2;
+ DWORD vb_indices : 1;
-+ DWORD padding : 9;
++ DWORD padding : 1;
DWORD texgen[MAX_TEXTURES];
};
--
-2.5.5
+2.9.3