mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Updated wined3d-Indexed_Vertex_Blending patchset.
Fix crash in 'Raiden 3 Digital Edition'.
This commit is contained in:
parent
8a46f19ece
commit
f2d1cc1a8c
@ -1,4 +1,4 @@
|
||||
From 98ee9a7e02e2922b401203adcb00e5ae1f2e92e6 Mon Sep 17 00:00:00 2001
|
||||
From 6d93a74154911450111046049c74b6c70caa6df1 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 17 Aug 2017 17:46:50 +0300
|
||||
Subject: [PATCH] d3d9/tests: Add test for indexed vertex blending.
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] d3d9/tests: Add test for indexed vertex blending.
|
||||
1 file changed, 252 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 0463df7a56..9a2cc6b6b7 100644
|
||||
index 4acea119202..3a3739223ff 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21694,6 +21694,257 @@ done:
|
||||
@@ -21697,6 +21697,257 @@ done:
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ index 0463df7a56..9a2cc6b6b7 100644
|
||||
static void test_updatetexture(void)
|
||||
{
|
||||
BOOL r32f_supported, ati2n_supported, do_visual_test;
|
||||
@@ -26853,6 +27104,7 @@ START_TEST(visual)
|
||||
@@ -26856,6 +27107,7 @@ START_TEST(visual)
|
||||
test_multisample_mismatch();
|
||||
test_texcoordindex();
|
||||
test_vertex_blending();
|
||||
@ -278,5 +278,5 @@ index 0463df7a56..9a2cc6b6b7 100644
|
||||
test_depthbias();
|
||||
test_flip();
|
||||
--
|
||||
2.25.1
|
||||
2.26.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 43fd47030361e72bea4ae671ffc92bd68335773f Mon Sep 17 00:00:00 2001
|
||||
From 1a7caf65bc53b8980dcb463d1fe530b8771c8d90 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 31 Aug 2017 00:23:43 +0200
|
||||
Subject: [PATCH] d3d9/tests: Test normal calculation when indexed vertex
|
||||
@ -9,10 +9,10 @@ Subject: [PATCH] d3d9/tests: Test normal calculation when indexed vertex
|
||||
1 file changed, 95 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 9a2cc6b6b7..483ffb328d 100644
|
||||
index 3a3739223ff..8e01445970f 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21696,47 +21696,68 @@ done:
|
||||
@@ -21699,47 +21699,68 @@ done:
|
||||
|
||||
static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char *test_id_str)
|
||||
{
|
||||
@ -85,7 +85,7 @@ index 9a2cc6b6b7..483ffb328d 100644
|
||||
static const POINT quad_upper_right_points[] =
|
||||
{
|
||||
{576, 48}, {-1, -1},
|
||||
@@ -21777,6 +21798,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21780,6 +21801,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
struct vec3 position;
|
||||
struct vec3 blendweights;
|
||||
DWORD matrixIndices;
|
||||
@ -93,7 +93,7 @@ index 9a2cc6b6b7..483ffb328d 100644
|
||||
}
|
||||
vertex_data[4];
|
||||
const POINT *quad_points;
|
||||
@@ -21786,34 +21808,34 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21789,34 +21811,34 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
{
|
||||
/* upper right */
|
||||
{
|
||||
@ -144,7 +144,7 @@ index 9a2cc6b6b7..483ffb328d 100644
|
||||
quad_fullscreen_points, quad_fullscreen_empty_points
|
||||
}
|
||||
};
|
||||
@@ -21848,21 +21870,32 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21851,21 +21873,32 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
ok(hr == D3D_OK, "(%s) IDirect3DDevice9_SetRenderState D3DRS_INDEXEDVERTEXBLENDENABLE failed %08x.\n",
|
||||
test_id_str, hr);
|
||||
|
||||
@ -179,7 +179,7 @@ index 9a2cc6b6b7..483ffb328d 100644
|
||||
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_EndScene(device);
|
||||
@@ -21886,7 +21919,47 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21889,7 +21922,47 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
|
||||
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
|
||||
ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr);
|
||||
@ -228,5 +228,5 @@ index 9a2cc6b6b7..483ffb328d 100644
|
||||
|
||||
static void test_indexed_vertex_blending(void)
|
||||
--
|
||||
2.25.1
|
||||
2.26.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a13c7f2c2bc70d0690bec708e581c3e809fb39a4 Mon Sep 17 00:00:00 2001
|
||||
From fd6c5551002854ec585eca40e6889d3461c96b24 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 31 Aug 2017 01:47:49 +0200
|
||||
Subject: [PATCH] d3d9/tests: Check MaxVertexBlendMatrixIndex capability.
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] d3d9/tests: Check MaxVertexBlendMatrixIndex capability.
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 483ffb328d..4a9bc1943e 100644
|
||||
index 8e01445970f..1f0d4a85d1d 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21968,7 +21968,9 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21971,7 +21971,9 @@ static void test_indexed_vertex_blending(void)
|
||||
IDirect3DDevice9 *device;
|
||||
IDirect3D9 *d3d;
|
||||
ULONG refcount;
|
||||
@ -21,7 +21,7 @@ index 483ffb328d..4a9bc1943e 100644
|
||||
|
||||
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
0, 0, 640, 480, NULL, NULL, NULL, NULL);
|
||||
@@ -21997,7 +21999,14 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -22000,7 +22002,14 @@ static void test_indexed_vertex_blending(void)
|
||||
if (SUCCEEDED(IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device)))
|
||||
{
|
||||
@ -36,7 +36,7 @@ index 483ffb328d..4a9bc1943e 100644
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
}
|
||||
@@ -22007,7 +22016,26 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -22010,7 +22019,26 @@ static void test_indexed_vertex_blending(void)
|
||||
if (SUCCEEDED(IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
|
||||
D3DCREATE_MIXED_VERTEXPROCESSING, &present_parameters, &device)))
|
||||
{
|
||||
@ -64,5 +64,5 @@ index 483ffb328d..4a9bc1943e 100644
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
}
|
||||
--
|
||||
2.25.1
|
||||
2.26.2
|
||||
|
||||
|
@ -1,24 +1,48 @@
|
||||
From ffe075bc43500cb8a06ccb391cb3f1e884bcbace Mon Sep 17 00:00:00 2001
|
||||
From ac972e6697b1c428e2aa54ca3329e42c5d485ce2 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:15:07 +0300
|
||||
Subject: [PATCH] wined3d: Allow higher world matrix states.
|
||||
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 12 ++
|
||||
dlls/wined3d/adapter_gl.c | 1 +
|
||||
dlls/wined3d/cs.c | 3 +-
|
||||
dlls/wined3d/device.c | 6 +
|
||||
dlls/wined3d/directx.c | 2 +
|
||||
dlls/wined3d/directx.c | 4 +-
|
||||
dlls/wined3d/glsl_shader.c | 252 +++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/state.c | 3 +-
|
||||
dlls/wined3d/utils.c | 8 +-
|
||||
dlls/wined3d/wined3d_private.h | 1 +
|
||||
8 files changed, 269 insertions(+), 7 deletions(-)
|
||||
9 files changed, 282 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 1f0d4a85d1d..ba649101914 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21980,6 +21980,18 @@ static void test_indexed_vertex_blending(void)
|
||||
d3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||
ok(!!d3d, "Failed to create a D3D object.\n");
|
||||
|
||||
+ memset(&caps, 0, sizeof(caps));
|
||||
+ hr = IDirect3D9_GetDeviceCaps(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &caps);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(caps.MaxVertexBlendMatrices == 4 && !caps.MaxVertexBlendMatrixIndex,
|
||||
+ "Got unexpected MaxVertexBlendMatrices %u, MaxVertexBlendMatrixIndex %u.\n",
|
||||
+ caps.MaxVertexBlendMatrices, caps.MaxVertexBlendMatrixIndex);
|
||||
+ hr = IDirect3D9_GetDeviceCaps(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, &caps);
|
||||
+ ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ ok(caps.MaxVertexBlendMatrices == 4 && caps.MaxVertexBlendMatrixIndex == 255,
|
||||
+ "Got unexpected MaxVertexBlendMatrices %u, MaxVertexBlendMatrixIndex %u.\n",
|
||||
+ caps.MaxVertexBlendMatrices, caps.MaxVertexBlendMatrixIndex);
|
||||
+
|
||||
present_parameters.Windowed = TRUE;
|
||||
present_parameters.hDeviceWindow = window;
|
||||
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index f1cb7d9659..dfad4e4842 100644
|
||||
index b98d288d3c1..1f8268237e7 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -5147,6 +5147,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
@@ -5148,6 +5148,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
|
||||
d3d_info->limits.ffp_textures = fragment_caps.MaxSimultaneousTextures;
|
||||
d3d_info->limits.ffp_blend_stages = fragment_caps.MaxTextureBlendStages;
|
||||
TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
|
||||
@ -27,10 +51,10 @@ index f1cb7d9659..dfad4e4842 100644
|
||||
d3d_info->limits.active_light_count = vertex_caps.max_active_lights;
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index dbdf5f2ec2..a80a353398 100644
|
||||
index 005f592f8ab..556a615c86d 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -1670,7 +1670,8 @@ static void wined3d_cs_exec_set_transform(struct wined3d_cs *cs, const void *dat
|
||||
@@ -1671,7 +1671,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;
|
||||
@ -41,10 +65,10 @@ index dbdf5f2ec2..a80a353398 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 844d2f60ec..b8c88e2ffe 100644
|
||||
index 000173701db..aa97cada0e7 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3798,6 +3798,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
@@ -3592,6 +3592,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
|
||||
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
|
||||
{
|
||||
@ -52,7 +76,7 @@ index 844d2f60ec..b8c88e2ffe 100644
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("device %p, caps %p.\n", device, caps);
|
||||
@@ -3807,6 +3808,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
@@ -3601,6 +3602,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
|
||||
if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
|
||||
caps->MaxVertexShaderConst = device->adapter->d3d_info.limits.vs_uniform_count_swvp;
|
||||
@ -65,23 +89,25 @@ index 844d2f60ec..b8c88e2ffe 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 8cf0d77e82..0d244d1383 100644
|
||||
index b6a9b502d82..f0ff3b8c000 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -2112,6 +2112,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter,
|
||||
@@ -2088,7 +2088,9 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter,
|
||||
caps->MaxUserClipPlanes = vertex_caps.max_user_clip_planes;
|
||||
caps->MaxActiveLights = vertex_caps.max_active_lights;
|
||||
caps->MaxVertexBlendMatrices = vertex_caps.max_vertex_blend_matrices;
|
||||
caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index;
|
||||
+ if (caps->DeviceType == WINED3D_DEVICE_TYPE_HAL)
|
||||
+ caps->MaxVertexBlendMatrixIndex = min(caps->MaxVertexBlendMatrixIndex, 8);
|
||||
- caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index;
|
||||
+ caps->MaxVertexBlendMatrixIndex = caps->DeviceType == WINED3D_DEVICE_TYPE_HAL ? 0
|
||||
+ : vertex_caps.max_vertex_blend_matrix_index;
|
||||
+
|
||||
caps->VertexProcessingCaps = vertex_caps.vertex_processing_caps;
|
||||
caps->FVFCaps = vertex_caps.fvf_caps;
|
||||
caps->RasterCaps |= vertex_caps.raster_caps;
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index a17d35e577..4aa205b327 100644
|
||||
index f869c5fe841..ccb6ccb6baa 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -12026,6 +12026,258 @@ static const struct wined3d_state_entry_template glsl_vertex_pipe_vp_states[] =
|
||||
@@ -12042,6 +12042,258 @@ static const struct wined3d_state_entry_template 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 },
|
||||
@ -341,10 +367,10 @@ index a17d35e577..4aa205b327 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 099a612d05..26cf35fe65 100644
|
||||
index b24fbf7ac2d..d1e13736388 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -5459,7 +5459,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
@@ -5482,7 +5482,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
state_table[i].apply = state_undefined;
|
||||
}
|
||||
|
||||
@ -355,10 +381,10 @@ index 099a612d05..26cf35fe65 100644
|
||||
for (i = start; i <= last; ++i)
|
||||
{
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 54866da533..3b805a2a6b 100644
|
||||
index 0397056441f..b2180782af8 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -5150,11 +5150,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
@@ -5171,11 +5171,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
TSTYPE_TO_STR(WINED3D_TS_WORLD_MATRIX(3));
|
||||
#undef TSTYPE_TO_STR
|
||||
default:
|
||||
@ -374,10 +400,10 @@ index 54866da533..3b805a2a6b 100644
|
||||
return "unrecognized";
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9762acd354..8c6513ebed 100644
|
||||
index 54313054701..7d7e931d624 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -180,6 +180,7 @@ struct wined3d_d3d_limits
|
||||
@@ -182,6 +182,7 @@ struct wined3d_d3d_limits
|
||||
unsigned int ffp_blend_stages;
|
||||
unsigned int ffp_vertex_blend_matrices;
|
||||
unsigned int active_light_count;
|
||||
@ -386,5 +412,5 @@ index 9762acd354..8c6513ebed 100644
|
||||
unsigned int max_rt_count;
|
||||
unsigned int max_clip_distances;
|
||||
--
|
||||
2.25.1
|
||||
2.26.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2b43fd4a10dc1fb6e897b8e78f7cb682b5742b90 Mon Sep 17 00:00:00 2001
|
||||
From 3239cb2bda6b37a58acb281d8cd66095fb160661 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:28:35 +0300
|
||||
Subject: [PATCH] wined3d: Support indexed vertex blending.
|
||||
@ -12,10 +12,10 @@ Subject: [PATCH] wined3d: Support indexed vertex blending.
|
||||
5 files changed, 169 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 4a9bc1943e..c0fbc930b4 100644
|
||||
index ba649101914..d3e7c62aba8 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21845,7 +21845,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21848,7 +21848,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
if (caps.MaxVertexBlendMatrixIndex < 7 || caps.MaxVertexBlendMatrices < 4)
|
||||
{
|
||||
@ -24,7 +24,7 @@ index 4a9bc1943e..c0fbc930b4 100644
|
||||
test_id_str, caps.MaxVertexBlendMatrices, caps.MaxVertexBlendMatrixIndex);
|
||||
return;
|
||||
}
|
||||
@@ -22002,7 +22002,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -22017,7 +22017,7 @@ static void test_indexed_vertex_blending(void)
|
||||
memset(&caps, 0, sizeof(caps));
|
||||
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
@ -33,7 +33,7 @@ index 4a9bc1943e..c0fbc930b4 100644
|
||||
caps.MaxVertexBlendMatrixIndex);
|
||||
|
||||
do_test_indexed_vertex_blending(device,"IVB software");
|
||||
@@ -22028,7 +22028,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -22043,7 +22043,7 @@ static void test_indexed_vertex_blending(void)
|
||||
memset(&caps, 0, sizeof(caps));
|
||||
hr = IDirect3DDevice9_GetDeviceCaps(device, &caps);
|
||||
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
|
||||
@ -43,7 +43,7 @@ index 4a9bc1943e..c0fbc930b4 100644
|
||||
|
||||
hr = IDirect3DDevice9_SetSoftwareVertexProcessing(device, FALSE);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 4aa205b327..75f652d11c 100644
|
||||
index ccb6ccb6baa..b46df1a1c40 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -150,6 +150,9 @@ struct shader_glsl_priv
|
||||
@ -155,7 +155,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9036,8 +9068,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9049,8 +9081,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 */
|
||||
@ -165,7 +165,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
{"vec3", "ffp_attrib_normal"}, /* WINED3D_FFP_NORMAL */
|
||||
{"float", "ffp_attrib_psize"}, /* WINED3D_FFP_PSIZE */
|
||||
{"vec4", "ffp_attrib_diffuse"}, /* WINED3D_FFP_DIFFUSE */
|
||||
@@ -9053,6 +9084,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9066,6 +9097,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
string_buffer_clear(buffer);
|
||||
|
||||
shader_glsl_add_version_declaration(buffer, gl_info);
|
||||
@ -175,7 +175,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
|
||||
@@ -9067,7 +9101,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9080,7 +9114,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
}
|
||||
shader_addline(buffer, "\n");
|
||||
|
||||
@ -195,7 +195,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
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", WINED3D_MAX_TEXTURES);
|
||||
@@ -9129,6 +9174,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9142,6 +9187,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");
|
||||
@ -204,7 +204,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(attrib_info); ++i)
|
||||
{
|
||||
@@ -9158,8 +9205,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9171,8 +9218,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
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");
|
||||
@ -228,7 +228,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
|
||||
shader_addline(buffer, "gl_Position = ffp_projection_matrix * ec_pos;\n");
|
||||
if (settings->clipping)
|
||||
@@ -9183,7 +9243,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9196,7 +9256,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
else
|
||||
{
|
||||
for (i = 0; i < settings->vertexblends + 1; ++i)
|
||||
@ -249,7 +249,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
}
|
||||
|
||||
if (settings->normalize)
|
||||
@@ -10048,6 +10120,28 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10061,6 +10133,28 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
string_buffer_sprintf(name, "ffp_modelview_matrix[%u]", i);
|
||||
vs->modelview_matrix_location[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
|
||||
}
|
||||
@ -278,7 +278,7 @@ index 4aa205b327..75f652d11c 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 < WINED3D_MAX_TEXTURES; ++i)
|
||||
@@ -10627,7 +10721,7 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
|
||||
@@ -10643,7 +10737,7 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
|
||||
entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_MODELVIEW
|
||||
| WINED3D_SHADER_CONST_FFP_PROJ;
|
||||
|
||||
@ -287,7 +287,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
{
|
||||
if (entry->vs.modelview_matrix_location[i] != -1)
|
||||
{
|
||||
@@ -10636,6 +10730,9 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
|
||||
@@ -10652,6 +10746,9 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
for (i = 0; i < WINED3D_MAX_TEXTURES; ++i)
|
||||
{
|
||||
if (entry->vs.texture_matrix_location[i] != -1)
|
||||
@@ -11176,7 +11273,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11192,7 +11289,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
fragment_pipe->get_caps(device->adapter, &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;
|
||||
@ -316,7 +316,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
device->vertex_priv = vertex_priv;
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
@@ -11209,6 +11316,14 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
@@ -11225,6 +11332,14 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
string_buffer_free(&priv->shader_buffer);
|
||||
priv->fragment_pipe->free_private(device, context);
|
||||
priv->vertex_pipe->vp_free(device, context);
|
||||
@ -331,7 +331,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
|
||||
if (priv->ubo_vs_c != -1)
|
||||
{
|
||||
@@ -11633,7 +11748,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter,
|
||||
@@ -11649,7 +11764,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_adapter *adapter,
|
||||
caps->ffp_generic_attributes = TRUE;
|
||||
caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS;
|
||||
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;
|
||||
@ -344,7 +344,7 @@ index 4aa205b327..75f652d11c 100644
|
||||
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
|
||||
| WINED3DVTXPCAPS_MATERIALSOURCE7
|
||||
| WINED3DVTXPCAPS_VERTEXFOG
|
||||
@@ -11835,7 +11954,8 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
|
||||
@@ -11851,7 +11970,8 @@ 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)
|
||||
{
|
||||
@ -355,10 +355,10 @@ index 4aa205b327..75f652d11c 100644
|
||||
|
||||
static void glsl_vertex_pipe_vertexblend(struct wined3d_context *context,
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 3b805a2a6b..b78f7a334d 100644
|
||||
index b2180782af8..37cede476fc 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -6570,6 +6570,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
|
||||
@@ -6622,6 +6622,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
|
||||
settings->flatshading = FALSE;
|
||||
|
||||
settings->swizzle_map = si->swizzle_map;
|
||||
@ -367,7 +367,7 @@ index 3b805a2a6b..b78f7a334d 100644
|
||||
|
||||
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 c5df45541e..f8ee97a03d 100644
|
||||
index c5df45541e4..f8ee97a03db 100644
|
||||
--- a/dlls/wined3d/vertexdeclaration.c
|
||||
+++ b/dlls/wined3d/vertexdeclaration.c
|
||||
@@ -119,6 +119,15 @@ static BOOL declaration_element_valid_ffp(const struct wined3d_vertex_element *e
|
||||
@ -387,10 +387,10 @@ index c5df45541e..f8ee97a03d 100644
|
||||
switch(element->format)
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 8c6513ebed..da9778308d 100644
|
||||
index 7d7e931d624..600c04900dd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -281,6 +281,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
@@ -283,6 +283,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
}
|
||||
|
||||
/* Device caps */
|
||||
@ -398,7 +398,7 @@ index 8c6513ebed..da9778308d 100644
|
||||
#define WINED3D_MAX_ACTIVE_LIGHTS 8
|
||||
#define WINED3D_MAX_SOFTWARE_ACTIVE_LIGHTS 32
|
||||
#define MAX_CONSTANT_BUFFERS 15
|
||||
@@ -3111,7 +3112,8 @@ struct wined3d_ffp_vs_settings
|
||||
@@ -3253,7 +3254,8 @@ struct wined3d_ffp_vs_settings
|
||||
DWORD ortho_fog : 1;
|
||||
DWORD flatshading : 1;
|
||||
DWORD swizzle_map : 16; /* MAX_ATTRIBS, 16 */
|
||||
@ -408,7 +408,7 @@ index 8c6513ebed..da9778308d 100644
|
||||
|
||||
DWORD texgen[WINED3D_MAX_TEXTURES];
|
||||
};
|
||||
@@ -5211,6 +5213,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
@@ -5453,6 +5455,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
}
|
||||
|
||||
@ -423,5 +423,5 @@ index 8c6513ebed..da9778308d 100644
|
||||
enum wined3d_material_color_source source)
|
||||
{
|
||||
--
|
||||
2.25.1
|
||||
2.26.2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user