mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96
This commit is contained in:
parent
7ba10a3ef2
commit
f7bee23139
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "cad72d3cd7a40e2c1f70d19b988e19da62710bf8"
|
||||
echo "c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -1710,18 +1710,7 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
|
||||
if test "$enable_wined3d_SWVP_shaders" -gt 1; then
|
||||
abort "Patchset wined3d-SWVP-shaders disabled, but wined3d-Indexed_Vertex_Blending depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -gt 1; then
|
||||
abort "Patchset wined3d-WINED3D_RS_COLORWRITEENABLE disabled, but wined3d-Indexed_Vertex_Blending depends on that."
|
||||
fi
|
||||
enable_wined3d_SWVP_shaders=1
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_SWVP_shaders" -eq 1; then
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -gt 1; then
|
||||
abort "Patchset wined3d-WINED3D_RS_COLORWRITEENABLE disabled, but wined3d-SWVP-shaders depends on that."
|
||||
fi
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
@ -6665,25 +6654,8 @@ if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/device.c, dlls/d3d11/state.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/state.c,
|
||||
# | dlls/wined3d/stateblock.c, dlls/wined3d/surface.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_private.h,
|
||||
# | include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -eq 1; then
|
||||
patch_apply wined3d-WINED3D_RS_COLORWRITEENABLE/0001-wined3d-Implement-all-8-d3d11-color-write-masks.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Implement all 8 d3d11 color write masks.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-SWVP-shaders
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#8051] Sims 2 demo exits prematurely
|
||||
# |
|
||||
@ -6711,7 +6683,7 @@ fi
|
||||
# Patchset wined3d-Indexed_Vertex_Blending
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * wined3d-WINED3D_RS_COLORWRITEENABLE, wined3d-SWVP-shaders
|
||||
# | * wined3d-SWVP-shaders
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#39057] Support for Indexed Vertex Blending
|
||||
@ -6751,6 +6723,20 @@ if test "$enable_wined3d_Restore_DirectX10_Support" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/device.c, dlls/d3d11/state.c, dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/state.c,
|
||||
# | dlls/wined3d/stateblock.c, dlls/wined3d/surface.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_private.h,
|
||||
# | include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -eq 1; then
|
||||
patch_apply wined3d-WINED3D_RS_COLORWRITEENABLE/0001-wined3d-Implement-all-8-d3d11-color-write-masks.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Implement all 8 d3d11 color write masks.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-WINED3D_TEXF_ANISOTROPIC
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 789b15cc3fcc71567cf103c42333af09a099afe8 Mon Sep 17 00:00:00 2001
|
||||
From a218bc49c06c02bfd49eb1383a91be2eea66212e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Thu, 17 Aug 2017 17:46:50 +0300
|
||||
Subject: [PATCH 1/5] d3d9/tests: Add test for indexed vertex blending.
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
1 file changed, 252 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 1cc8642f9b..bd2cd0eee3 100644
|
||||
index ec27adef80..605b2b220b 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21456,6 +21456,257 @@ done:
|
||||
@@ -21522,6 +21522,257 @@ done:
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ index 1cc8642f9b..bd2cd0eee3 100644
|
||||
static void test_updatetexture(void)
|
||||
{
|
||||
BOOL r32f_supported, ati2n_supported, do_visual_test;
|
||||
@@ -25610,6 +25861,7 @@ START_TEST(visual)
|
||||
@@ -25676,6 +25927,7 @@ START_TEST(visual)
|
||||
test_multisample_mismatch();
|
||||
test_texcoordindex();
|
||||
test_vertex_blending();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c088befb046095f20f615a44c5864b4af9da4938 Mon Sep 17 00:00:00 2001
|
||||
From a25c75184c2e38dd25111ad8b0ebb316650b88e6 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 2/5] d3d9/tests: Test normal calculation when indexed vertex
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
1 file changed, 95 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index bd2cd0eee3..54051a2010 100644
|
||||
index 605b2b220b..e665b9dbb3 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21458,47 +21458,68 @@ done:
|
||||
@@ -21524,47 +21524,68 @@ done:
|
||||
|
||||
static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char *test_id_str)
|
||||
{
|
||||
@ -86,7 +86,7 @@ index bd2cd0eee3..54051a2010 100644
|
||||
static const POINT quad_upper_right_points[] =
|
||||
{
|
||||
{576, 48}, {-1, -1},
|
||||
@@ -21539,6 +21560,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21605,6 +21626,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
struct vec3 position;
|
||||
struct vec3 blendweights;
|
||||
DWORD matrixIndices;
|
||||
@ -94,7 +94,7 @@ index bd2cd0eee3..54051a2010 100644
|
||||
}
|
||||
vertex_data[4];
|
||||
const POINT *quad_points;
|
||||
@@ -21548,34 +21570,34 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21614,34 +21636,34 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
{
|
||||
/* upper right */
|
||||
{
|
||||
@ -145,7 +145,7 @@ index bd2cd0eee3..54051a2010 100644
|
||||
quad_fullscreen_points, quad_fullscreen_empty_points
|
||||
}
|
||||
};
|
||||
@@ -21610,21 +21632,32 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21676,21 +21698,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);
|
||||
|
||||
@ -180,7 +180,7 @@ index bd2cd0eee3..54051a2010 100644
|
||||
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_EndScene(device);
|
||||
@@ -21648,7 +21681,47 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21714,7 +21747,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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d2a46ac5531e0820aa60248478cfc0b203ae999b Mon Sep 17 00:00:00 2001
|
||||
From c3af27da9a6025a1d2e25307a97aa23ec89b38ea 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 3/5] d3d9/tests: Check MaxVertexBlendMatrixIndex capability.
|
||||
@ -9,10 +9,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
1 file changed, 28 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 54051a2010..bd9f349746 100644
|
||||
index e665b9dbb3..6d9bdcf3da 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21730,7 +21730,9 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21796,7 +21796,9 @@ static void test_indexed_vertex_blending(void)
|
||||
IDirect3DDevice9 *device;
|
||||
IDirect3D9 *d3d;
|
||||
ULONG refcount;
|
||||
@ -22,7 +22,7 @@ index 54051a2010..bd9f349746 100644
|
||||
|
||||
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
0, 0, 640, 480, NULL, NULL, NULL, NULL);
|
||||
@@ -21759,7 +21761,14 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21825,7 +21827,14 @@ static void test_indexed_vertex_blending(void)
|
||||
if (SUCCEEDED(IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device)))
|
||||
{
|
||||
@ -37,7 +37,7 @@ index 54051a2010..bd9f349746 100644
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
}
|
||||
@@ -21769,7 +21778,26 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21835,7 +21844,26 @@ static void test_indexed_vertex_blending(void)
|
||||
if (SUCCEEDED(IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, window,
|
||||
D3DCREATE_MIXED_VERTEXPROCESSING, &present_parameters, &device)))
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 74e911fda30ef2ab782ef18168b2acd36e23a8a2 Mon Sep 17 00:00:00 2001
|
||||
From 5b78cbd64ca2edfaa6b6535e8c849b77ef5c5152 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:15:07 +0300
|
||||
Subject: [PATCH 4/5] wined3d: Allow higher world matrix states.
|
||||
@ -16,22 +16,22 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
8 files changed, 268 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 47fff09b8a..63c3a37511 100644
|
||||
index d8ad17050c..b4cebc9704 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3754,6 +3754,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -3735,6 +3735,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
d3d_info->ffp_generic_attributes = vertex_caps.ffp_generic_attributes;
|
||||
d3d_info->limits.ffp_vertex_blend_matrices = vertex_caps.max_vertex_blend_matrices;
|
||||
d3d_info->limits.active_light_count = vertex_caps.max_active_lights;
|
||||
+ d3d_info->limits.ffp_max_vertex_blend_matrix_index = vertex_caps.max_vertex_blend_matrix_index;
|
||||
d3d_info->emulated_flatshading = vertex_caps.emulated_flatshading;
|
||||
|
||||
adapter->fragment_pipe->get_caps(gl_info, &fragment_caps);
|
||||
adapter->fragment_pipe->get_caps(adapter, &fragment_caps);
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index 022d790fff..af979a4c1e 100644
|
||||
index 9960d06cea..8ac7da00f2 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
|
||||
@@ -1669,7 +1669,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;
|
||||
@ -42,11 +42,11 @@ index 022d790fff..af979a4c1e 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4b98987f63..7f146787bf 100644
|
||||
index ad249eed84..c83d644746 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3645,6 +3645,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
adapter->vertex_pipe->vp_get_caps(&adapter->gl_info, &vertex_caps);
|
||||
@@ -3621,6 +3621,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps);
|
||||
if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
|
||||
caps->MaxVertexShaderConst = adapter->d3d_info.limits.vs_uniform_count_swvp;
|
||||
+ caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index;
|
||||
@ -58,10 +58,10 @@ index 4b98987f63..7f146787bf 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index debc4e5dc6..84b252582f 100644
|
||||
index 83fa47a779..9fd5f396e0 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -2113,6 +2113,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in
|
||||
@@ -1982,6 +1982,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, unsigned in
|
||||
caps->MaxActiveLights = vertex_caps.max_active_lights;
|
||||
caps->MaxVertexBlendMatrices = vertex_caps.max_vertex_blend_matrices;
|
||||
caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index;
|
||||
@ -71,10 +71,10 @@ index debc4e5dc6..84b252582f 100644
|
||||
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 0df81ed669..df4dfa0659 100644
|
||||
index c07ff2680c..e48560c0b5 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -12240,6 +12240,258 @@ static const struct wined3d_state_entry_template glsl_vertex_pipe_vp_states[] =
|
||||
@@ -12231,6 +12231,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 },
|
||||
@ -334,10 +334,10 @@ index 0df81ed669..df4dfa0659 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 d84b42d2ea..8110d530e7 100644
|
||||
index f68f225cfb..4777cc6742 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -5416,7 +5416,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
@@ -5410,7 +5410,8 @@ static void prune_invalid_states(struct wined3d_state_entry *state_table, const
|
||||
state_table[i].apply = state_undefined;
|
||||
}
|
||||
|
||||
@ -348,10 +348,10 @@ index d84b42d2ea..8110d530e7 100644
|
||||
for (i = start; i <= last; ++i)
|
||||
{
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index 1a07366822..fd8e944e3b 100644
|
||||
index 302b8e7d36..f7ba936588 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4934,11 +4934,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
@@ -4937,11 +4937,9 @@ const char *debug_d3dtstype(enum wined3d_transform_state tstype)
|
||||
TSTYPE_TO_STR(WINED3D_TS_WORLD_MATRIX(3));
|
||||
#undef TSTYPE_TO_STR
|
||||
default:
|
||||
@ -367,7 +367,7 @@ index 1a07366822..fd8e944e3b 100644
|
||||
return "unrecognized";
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 766449d711..5cbadfc2ed 100644
|
||||
index edc96f8af9..6237558678 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -171,6 +171,7 @@ struct wined3d_d3d_limits
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 46332c4aabadfe412ff38a801d3dbf828a555f6e Mon Sep 17 00:00:00 2001
|
||||
From dffaaf874063543271f23679fb04e81246021dde 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.
|
||||
Subject: [PATCH 5/5] wined3d: Support indexed vertex blending.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
5 files changed, 169 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index bd9f349746d..beed647b6c6 100644
|
||||
index 6d9bdcf3da..befb961245 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21607,7 +21607,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@@ -21673,7 +21673,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)
|
||||
{
|
||||
@ -25,7 +25,7 @@ index bd9f349746d..beed647b6c6 100644
|
||||
test_id_str, caps.MaxVertexBlendMatrices, caps.MaxVertexBlendMatrixIndex);
|
||||
return;
|
||||
}
|
||||
@@ -21764,7 +21764,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21830,7 +21830,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);
|
||||
@ -34,7 +34,7 @@ index bd9f349746d..beed647b6c6 100644
|
||||
caps.MaxVertexBlendMatrixIndex);
|
||||
|
||||
do_test_indexed_vertex_blending(device,"IVB software");
|
||||
@@ -21790,7 +21790,7 @@ static void test_indexed_vertex_blending(void)
|
||||
@@ -21856,7 +21856,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);
|
||||
@ -44,7 +44,7 @@ index bd9f349746d..beed647b6c6 100644
|
||||
|
||||
hr = IDirect3DDevice9_SetSoftwareVertexProcessing(device, FALSE);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 389045bdc82..1660e4d50c6 100644
|
||||
index e48560c0b5..2361a81bd7 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -150,6 +150,9 @@ struct shader_glsl_priv
|
||||
@ -156,7 +156,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9266,8 +9298,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9253,8 +9285,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 */
|
||||
@ -166,7 +166,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
{"vec3", "ffp_attrib_normal"}, /* WINED3D_FFP_NORMAL */
|
||||
{"float", "ffp_attrib_psize"}, /* WINED3D_FFP_PSIZE */
|
||||
{"vec4", "ffp_attrib_diffuse"}, /* WINED3D_FFP_DIFFUSE */
|
||||
@@ -9283,6 +9314,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9270,6 +9301,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);
|
||||
@ -176,7 +176,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
|
||||
@@ -9297,7 +9331,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9284,7 +9318,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
}
|
||||
shader_addline(buffer, "\n");
|
||||
|
||||
@ -196,7 +196,7 @@ index 389045bdc82..1660e4d50c6 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);
|
||||
@@ -9359,6 +9404,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9346,6 +9391,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");
|
||||
@ -205,7 +205,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(attrib_info); ++i)
|
||||
{
|
||||
@@ -9388,8 +9435,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9375,8 +9422,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");
|
||||
@ -229,7 +229,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
|
||||
shader_addline(buffer, "gl_Position = ffp_projection_matrix * ec_pos;\n");
|
||||
if (settings->clipping)
|
||||
@@ -9413,7 +9473,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9400,7 +9460,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
else
|
||||
{
|
||||
for (i = 0; i < settings->vertexblends + 1; ++i)
|
||||
@ -250,7 +250,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
}
|
||||
|
||||
if (settings->normalize)
|
||||
@@ -10278,6 +10350,28 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10265,6 +10337,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));
|
||||
}
|
||||
@ -279,7 +279,7 @@ index 389045bdc82..1660e4d50c6 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)
|
||||
@@ -10857,7 +10951,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10844,7 +10938,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;
|
||||
|
||||
@ -288,7 +288,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
{
|
||||
if (entry->vs.modelview_matrix_location[i] != -1)
|
||||
{
|
||||
@@ -10866,6 +10960,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10853,6 +10947,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,8 +298,8 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
for (i = 0; i < WINED3D_MAX_TEXTURES; ++i)
|
||||
{
|
||||
if (entry->vs.texture_matrix_location[i] != -1)
|
||||
@@ -11403,7 +11500,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
fragment_pipe->get_caps(gl_info, &fragment_caps);
|
||||
@@ -11390,7 +11487,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;
|
||||
-
|
||||
@ -317,7 +317,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
device->vertex_priv = vertex_priv;
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
@@ -11436,6 +11543,14 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
@@ -11423,6 +11530,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);
|
||||
@ -332,7 +332,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
|
||||
if (priv->ubo_vs_c != -1)
|
||||
{
|
||||
@@ -11852,7 +11967,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
|
||||
@@ -11842,7 +11957,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;
|
||||
@ -345,7 +345,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
|
||||
| WINED3DVTXPCAPS_MATERIALSOURCE7
|
||||
| WINED3DVTXPCAPS_VERTEXFOG
|
||||
@@ -12052,7 +12171,8 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
|
||||
@@ -12042,7 +12161,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)
|
||||
{
|
||||
@ -356,7 +356,7 @@ index 389045bdc82..1660e4d50c6 100644
|
||||
|
||||
static void glsl_vertex_pipe_vertexblend(struct wined3d_context *context,
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index bf03f470491..2557c79e17b 100644
|
||||
index f7ba936588..7cc0d362b7 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -6334,6 +6334,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
|
||||
@ -368,7 +368,7 @@ index bf03f470491..2557c79e17b 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 cd8bb5e4233..d37f3ce8606 100644
|
||||
index cd8bb5e423..d37f3ce860 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
|
||||
@ -388,18 +388,18 @@ index cd8bb5e4233..d37f3ce8606 100644
|
||||
switch(element->format)
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index d5f89fb6b02..cdf9d157782 100644
|
||||
index 6237558678..57065e95cc 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -279,6 +279,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
#define MAX_UNORDERED_ACCESS_VIEWS 8
|
||||
#define MAX_TGSM_REGISTERS 8192
|
||||
#define MAX_VERTEX_BLENDS 4
|
||||
+#define MAX_VERTEX_BLEND_UBO 256
|
||||
#define MAX_RENDER_TARGETS 8
|
||||
@@ -264,6 +264,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
}
|
||||
|
||||
struct min_lookup
|
||||
@@ -2858,7 +2859,8 @@ struct wined3d_ffp_vs_settings
|
||||
/* Device caps */
|
||||
+#define MAX_VERTEX_BLEND_UBO 256
|
||||
#define WINED3D_MAX_STREAMS 16
|
||||
#define WINED3D_MAX_TEXTURES 8
|
||||
#define WINED3D_MAX_FRAGMENT_SAMPLERS 16
|
||||
@@ -2874,7 +2875,8 @@ struct wined3d_ffp_vs_settings
|
||||
DWORD ortho_fog : 1;
|
||||
DWORD flatshading : 1;
|
||||
DWORD swizzle_map : 16; /* MAX_ATTRIBS, 16 */
|
||||
@ -409,7 +409,7 @@ index d5f89fb6b02..cdf9d157782 100644
|
||||
|
||||
DWORD texgen[WINED3D_MAX_TEXTURES];
|
||||
};
|
||||
@@ -4754,6 +4756,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
@@ -4751,6 +4753,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
Fixes: [39057] Support for Indexed Vertex Blending
|
||||
Depends: wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
Depends: wined3d-SWVP-shaders
|
@ -1,7 +1,7 @@
|
||||
From 0acb83f21a53fe47d9fa9c3ed5d2732ccce18ade Mon Sep 17 00:00:00 2001
|
||||
From 0d2c06af4d5b53beb632ec54c4432341d840d4a5 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 13:17:01 +0300
|
||||
Subject: [PATCH] wined3d: Use UBO for vertex shader float constants if
|
||||
Subject: [PATCH 1/5] wined3d: Use UBO for vertex shader float constants if
|
||||
supported.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
@ -17,7 +17,7 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
8 files changed, 147 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
|
||||
index f78ff3e5af7..847cfd17bf6 100644
|
||||
index f78ff3e5af..847cfd17bf 100644
|
||||
--- a/dlls/d3d8/directx.c
|
||||
+++ b/dlls/d3d8/directx.c
|
||||
@@ -420,7 +420,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
|
||||
@ -30,7 +30,7 @@ index f78ff3e5af7..847cfd17bf6 100644
|
||||
d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
|
||||
d3d8->refcount = 1;
|
||||
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
|
||||
index c507991aaa4..7cdf5ddbb9a 100644
|
||||
index c507991aaa..7cdf5ddbb9 100644
|
||||
--- a/dlls/d3d9/directx.c
|
||||
+++ b/dlls/d3d9/directx.c
|
||||
@@ -585,7 +585,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
|
||||
@ -43,10 +43,10 @@ index c507991aaa4..7cdf5ddbb9a 100644
|
||||
if (!extended)
|
||||
flags |= WINED3D_VIDMEM_ACCOUNTING;
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 1b8282be964..05f03170a7d 100644
|
||||
index 3157c49a59..d94f63b3e4 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3084,6 +3084,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct
|
||||
@@ -3072,6 +3072,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 1b8282be964..05f03170a7d 100644
|
||||
}
|
||||
if (gl_info->supported[ARB_TESSELLATION_SHADER])
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index f88e2e92f09..b9042196493 100644
|
||||
index 7c41158191..e6ac84e3e2 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -138,6 +138,10 @@ struct shader_glsl_priv
|
||||
@ -258,7 +258,7 @@ index f88e2e92f09..b9042196493 100644
|
||||
}
|
||||
|
||||
/* Always declare the full set of constants, the compiler can remove the
|
||||
@@ -10120,17 +10210,36 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
@@ -10107,17 +10197,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,7 @@ index f88e2e92f09..b9042196493 100644
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
{
|
||||
@@ -11210,6 +11319,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11196,6 +11305,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 +309,7 @@ index f88e2e92f09..b9042196493 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11264,6 +11375,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11250,6 +11361,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
|
||||
@ -318,7 +318,7 @@ index f88e2e92f09..b9042196493 100644
|
||||
return WINED3D_OK;
|
||||
|
||||
fail:
|
||||
@@ -11291,6 +11404,13 @@ static void shader_glsl_free(struct wined3d_device *device, struct wined3d_conte
|
||||
@@ -11277,6 +11390,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 +333,7 @@ index f88e2e92f09..b9042196493 100644
|
||||
device->shader_priv = NULL;
|
||||
}
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 72f4f63695c..7eda21191d5 100644
|
||||
index 8fae8e2213..5f8bc1d47d 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 +346,10 @@ index 72f4f63695c..7eda21191d5 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 2e728d78619..94227209035 100644
|
||||
index 87fe69030e..f68f225cfb 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4392,6 +4392,11 @@ static void state_cb(struct wined3d_context *context, const struct wined3d_state
|
||||
@@ -4382,6 +4382,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 +362,10 @@ index 2e728d78619..94227209035 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 bd71bdb7b07..99d6e242aba 100644
|
||||
index e4f3b5b94a..c55022c1d5 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1055,6 +1055,7 @@ struct wined3d_shader_reg_maps
|
||||
@@ -1054,6 +1054,7 @@ struct wined3d_shader_reg_maps
|
||||
struct wined3d_shader_tgsm *tgsm;
|
||||
SIZE_T tgsm_capacity;
|
||||
unsigned int tgsm_count;
|
||||
@ -382,10 +382,10 @@ index bd71bdb7b07..99d6e242aba 100644
|
||||
UINT arb_vs_float_constants;
|
||||
UINT arb_vs_native_constants;
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 765a92dac2e..64c9473e774 100644
|
||||
index ed8bd40fd1..f491eee26c 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1348,6 +1348,7 @@ enum wined3d_shader_type
|
||||
@@ -1346,6 +1346,7 @@ enum wined3d_shader_type
|
||||
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
|
||||
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
|
||||
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 624a1744fb48b75afb79169b7fab8c8a9d3000d6 Mon Sep 17 00:00:00 2001
|
||||
From d5675989004022652718a00047e8608ce87fbc4d Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 14:24:50 +0300
|
||||
Subject: [PATCH 2/5] d3d9: Support SWVP vertex shader float constants limits.
|
||||
@ -32,7 +32,7 @@ index b07d72a066..a9b332ff92 100644
|
||||
struct d3d9
|
||||
{
|
||||
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
|
||||
index 5844d2cdac..00734021b0 100644
|
||||
index 4a41443e84..5e505b4cfa 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
|
||||
@ -81,7 +81,7 @@ index 5844d2cdac..00734021b0 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -3434,14 +3440,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3433,14 +3439,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 5844d2cdac..00734021b0 100644
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -3457,14 +3469,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3456,14 +3468,20 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
UINT reg_idx, float *data, UINT count)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5b53b2c3169dc79450a1df0c564543c9dd56b887 Mon Sep 17 00:00:00 2001
|
||||
From 62db64d73683192e892ea998d4392bb903f030cf Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
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 <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/wined3d/adapter_gl.c | 3 ++-
|
||||
dlls/wined3d/device.c | 13 ++++++++++++-
|
||||
dlls/wined3d/glsl_shader.c | 5 ++++-
|
||||
dlls/wined3d/glsl_shader.c | 6 +++++-
|
||||
dlls/wined3d/wined3d_private.h | 2 ++
|
||||
4 files changed, 20 insertions(+), 3 deletions(-)
|
||||
4 files changed, 21 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 0c96f94e1f..a1a40637c9 100644
|
||||
index d94f63b3e4..d8ad17050c 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3718,7 +3718,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -3722,7 +3722,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 0c96f94e1f..a1a40637c9 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 5039e0a81e..c0d5e48ff2 100644
|
||||
index ddf3302332..23796f712d 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3601,10 +3601,21 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d
|
||||
@@ -3599,10 +3599,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)
|
||||
{
|
||||
@ -46,7 +46,7 @@ index 5039e0a81e..c0d5e48ff2 100644
|
||||
+ if (FAILED(hr))
|
||||
+ return hr;
|
||||
+
|
||||
+ adapter->vertex_pipe->vp_get_caps(&adapter->gl_info, &vertex_caps);
|
||||
+ adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps);
|
||||
+ if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
|
||||
+ caps->MaxVertexShaderConst = adapter->d3d_info.limits.vs_uniform_count_swvp;
|
||||
+ return hr;
|
||||
@ -54,10 +54,18 @@ index 5039e0a81e..c0d5e48ff2 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 b3d1d4ee97..cde3322db7 100644
|
||||
index e6ac84e3e2..2298d75cef 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -11472,7 +11472,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
||||
@@ -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
|
||||
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;
|
||||
|
||||
@ -70,7 +78,7 @@ index b3d1d4ee97..cde3322db7 100644
|
||||
caps->varying_count = gl_info->limits.glsl_varyings;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index c26efb2839..f9cd3d5697 100644
|
||||
index c55022c1d5..49746f3dfd 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -164,6 +164,7 @@ struct wined3d_d3d_limits
|
||||
@ -81,7 +89,7 @@ index c26efb2839..f9cd3d5697 100644
|
||||
DWORD ps_uniform_count;
|
||||
unsigned int varying_count;
|
||||
unsigned int ffp_textures;
|
||||
@@ -683,6 +684,7 @@ enum wined3d_shader_conditional_op
|
||||
@@ -684,6 +685,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
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 83e16d7e0af178dd8e7183446893083c5a69869d Mon Sep 17 00:00:00 2001
|
||||
From db88c8fc7440ddab35c8916c4986d536c338ff2e Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:05:12 +0300
|
||||
Subject: [PATCH 4/5] wined3d: Support SWVP vertex shader constants limit in
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
6 files changed, 20 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 8e996d3fb3..0dddcceeeb 100644
|
||||
index f79f26125c..463ad3b34c 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -6437,13 +6437,10 @@ static void test_vertex_shader_constant(void)
|
||||
@ -49,10 +49,10 @@ index 8e996d3fb3..0dddcceeeb 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 80b9ecd4ab..768ec8f39e 100644
|
||||
index 8be58bfc63..740c4c565f 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -24639,7 +24639,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24705,7 +24705,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 80b9ecd4ab..768ec8f39e 100644
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 4d8396888c..b9cfbf9e68 100644
|
||||
index 23796f712d..393f515796 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -2557,13 +2557,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
|
||||
@@ -2533,13 +2533,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 4d8396888c..b9cfbf9e68 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
memcpy(&device->update_stateblock_state->vs_consts_f[start_idx], constants, count * sizeof(*constants));
|
||||
@@ -2590,12 +2594,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device
|
||||
@@ -2566,12 +2570,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,7 +104,7 @@ index 4d8396888c..b9cfbf9e68 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 d9d807abdb..ddd2cfa633 100644
|
||||
index 2298d75cef..d0da94b553 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
|
||||
@ -117,7 +117,7 @@ index d9d807abdb..ddd2cfa633 100644
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
}
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index 820089d0b8..cd5c8bd5dc 100644
|
||||
index ec79e68eeb..5f87d864d7 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -316,7 +316,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
|
||||
@ -129,7 +129,7 @@ index 820089d0b8..cd5c8bd5dc 100644
|
||||
{
|
||||
if (stateblock->changed.vs_consts_f[i])
|
||||
{
|
||||
@@ -1572,7 +1572,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
|
||||
@@ -1579,7 +1579,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 820089d0b8..cd5c8bd5dc 100644
|
||||
break;
|
||||
|
||||
case WINED3D_SBT_PIXEL_STATE:
|
||||
@@ -1584,7 +1584,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
|
||||
@@ -1591,7 +1591,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 820089d0b8..cd5c8bd5dc 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index fa195c3b15..42396a1b6e 100644
|
||||
index 49746f3dfd..8170869bc9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2953,7 +2953,7 @@ struct wined3d_state
|
||||
@@ -2975,7 +2975,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 fa195c3b15..42396a1b6e 100644
|
||||
|
||||
BOOL ps_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
@@ -3025,7 +3025,7 @@ struct wined3d_stateblock_state
|
||||
@@ -3031,7 +3031,7 @@ struct wined3d_stateblock_state
|
||||
int base_vertex_index;
|
||||
|
||||
struct wined3d_shader *vs;
|
||||
@ -169,7 +169,7 @@ index fa195c3b15..42396a1b6e 100644
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
@@ -3621,7 +3621,7 @@ struct wined3d_saved_states
|
||||
@@ -3625,7 +3625,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 fa195c3b15..42396a1b6e 100644
|
||||
DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
|
||||
DWORD indices : 1;
|
||||
DWORD material : 1;
|
||||
@@ -3657,7 +3657,7 @@ struct wined3d_stateblock
|
||||
@@ -3661,7 +3661,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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8a25d864ab5a2b9bb157a9fe9ddd46620a188d40 Mon Sep 17 00:00:00 2001
|
||||
From 5600740193109af864560cdc1d962de4eeb2e8a2 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:23:33 +0300
|
||||
Subject: [PATCH 5/5] wined3d: Support SWVP mode vertex shaders.
|
||||
@ -15,7 +15,7 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
7 files changed, 104 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 0dddcceeeb..e1d968e19e 100644
|
||||
index 463ad3b34c..57521a5648 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
|
||||
@ -60,10 +60,10 @@ index 0dddcceeeb..e1d968e19e 100644
|
||||
cleanup:
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 768ec8f39e..1cc8642f9b 100644
|
||||
index 740c4c565f..ec27adef80 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -24565,7 +24565,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24631,7 +24631,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 768ec8f39e..1cc8642f9b 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);
|
||||
@@ -24603,7 +24602,7 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24669,7 +24668,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 768ec8f39e..1cc8642f9b 100644
|
||||
expected_color, color);
|
||||
|
||||
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
|
||||
@@ -24622,7 +24621,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24688,7 +24687,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
|
||||
expected_color = 0x00ffffff;
|
||||
color = getPixelColor(device, 5, 5);
|
||||
@ -88,7 +88,7 @@ index 768ec8f39e..1cc8642f9b 100644
|
||||
ok(color == expected_color, "Expected color 0x%08x, got 0x%08x (sw shader in sw mode).\n",
|
||||
expected_color, color);
|
||||
|
||||
@@ -24672,7 +24670,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24738,7 +24736,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 768ec8f39e..1cc8642f9b 100644
|
||||
expected_color, color);
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index b9cfbf9e68..4b98987f63 100644
|
||||
index 393f515796..ad249eed84 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4080,6 +4080,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *
|
||||
@@ -4056,6 +4056,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *
|
||||
warned = TRUE;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ index b9cfbf9e68..4b98987f63 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index ddd2cfa633..0df81ed669 100644
|
||||
index d0da94b553..c07ff2680c 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -140,7 +140,9 @@ struct shader_glsl_priv
|
||||
@ -252,7 +252,7 @@ index ddd2cfa633..0df81ed669 100644
|
||||
}
|
||||
else if (shader->limits->constant_float > 0)
|
||||
{
|
||||
@@ -10233,12 +10249,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10220,12 +10236,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
}
|
||||
else if (!priv->consts_ubo)
|
||||
{
|
||||
@ -268,7 +268,7 @@ index ddd2cfa633..0df81ed669 100644
|
||||
}
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
@@ -10557,6 +10574,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10544,6 +10561,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
vs_list = &ffp_shader->linked_programs;
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ index ddd2cfa633..0df81ed669 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;
|
||||
@@ -11310,7 +11331,7 @@ static void constant_heap_free(struct constant_heap *heap)
|
||||
@@ -11297,7 +11318,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,13 +288,13 @@ index ddd2cfa633..0df81ed669 100644
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct fragment_caps fragment_caps;
|
||||
void *vertex_priv, *fragment_priv;
|
||||
@@ -11321,6 +11342,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11308,6 +11329,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];
|
||||
+ priv->max_vs_consts_f = priv->consts_ubo
|
||||
+ priv->max_vs_consts_f = min(WINED3D_MAX_VS_CONSTS_F_SWVP, priv->consts_ubo
|
||||
+ ? gl_info->limits.glsl_max_uniform_block_size / sizeof(struct wined3d_vec4)
|
||||
+ : gl_info->limits.glsl_vs_float_constants;
|
||||
+ : gl_info->limits.glsl_vs_float_constants);
|
||||
+
|
||||
+ if (!(device->create_parms.flags & (WINED3DCREATE_SOFTWARE_VERTEXPROCESSING | WINED3DCREATE_MIXED_VERTEXPROCESSING)))
|
||||
+ priv->max_vs_consts_f = min(priv->max_vs_consts_f, WINED3D_MAX_VS_CONSTS_F);
|
||||
@ -307,7 +307,7 @@ index ddd2cfa633..0df81ed669 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11350,7 +11383,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11337,7 +11370,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ index ddd2cfa633..0df81ed669 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 e34b6548cd..965471e0e5 100644
|
||||
index 5f8bc1d47d..87b02fc24c 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -589,7 +589,7 @@ static void shader_delete_constant_list(struct list *clist)
|
||||
@ -376,7 +376,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
|
||||
if (!(reg_maps->constf = heap_calloc(((min(shader->limits->constant_float, constf_size) + 31) / 32),
|
||||
sizeof(*reg_maps->constf))))
|
||||
@@ -3334,7 +3347,7 @@ static unsigned int shader_max_version_from_feature_level(enum wined3d_feature_l
|
||||
@@ -3324,7 +3337,7 @@ static unsigned int shader_max_version_from_feature_level(enum wined3d_feature_l
|
||||
}
|
||||
|
||||
static HRESULT shader_set_function(struct wined3d_shader *shader, struct wined3d_device *device,
|
||||
@ -385,7 +385,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
{
|
||||
const struct wined3d_d3d_info *d3d_info = &shader->device->adapter->d3d_info;
|
||||
struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps;
|
||||
@@ -3359,7 +3372,7 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, struct wined3d
|
||||
@@ -3349,7 +3362,7 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, struct wined3d
|
||||
shader_trace_init(fe, shader->frontend_data);
|
||||
|
||||
/* Second pass: figure out which registers are used, what the semantics are, etc. */
|
||||
@ -394,7 +394,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
return hr;
|
||||
|
||||
if (version->type != type)
|
||||
@@ -3699,14 +3712,19 @@ static HRESULT vertex_shader_init(struct wined3d_shader *shader, struct wined3d_
|
||||
@@ -3689,14 +3702,19 @@ static HRESULT vertex_shader_init(struct wined3d_shader *shader, struct wined3d_
|
||||
const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
|
||||
{
|
||||
struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps;
|
||||
@ -415,7 +415,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
{
|
||||
shader_cleanup(shader);
|
||||
return hr;
|
||||
@@ -3810,7 +3828,7 @@ static HRESULT geometry_shader_init_stream_output(struct wined3d_shader *shader,
|
||||
@@ -3800,7 +3818,7 @@ static HRESULT geometry_shader_init_stream_output(struct wined3d_shader *shader,
|
||||
{
|
||||
shader->reg_maps.shader_version = shader_version;
|
||||
shader->reg_maps.shader_version.type = WINED3D_SHADER_TYPE_GEOMETRY;
|
||||
@ -424,7 +424,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
if (FAILED(hr = shader_scan_output_signature(shader)))
|
||||
return hr;
|
||||
}
|
||||
@@ -3863,7 +3881,7 @@ static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3
|
||||
@@ -3853,7 +3871,7 @@ static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3
|
||||
goto fail;
|
||||
|
||||
if (shader->function
|
||||
@ -433,7 +433,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
goto fail;
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -4164,7 +4182,7 @@ static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_d
|
||||
@@ -4152,7 +4170,7 @@ static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_d
|
||||
return hr;
|
||||
|
||||
if (FAILED(hr = shader_set_function(shader, device,
|
||||
@ -442,7 +442,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
{
|
||||
shader_cleanup(shader);
|
||||
return hr;
|
||||
@@ -4264,7 +4282,7 @@ HRESULT CDECL wined3d_shader_create_cs(struct wined3d_device *device, const stru
|
||||
@@ -4252,7 +4270,7 @@ HRESULT CDECL wined3d_shader_create_cs(struct wined3d_device *device, const stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -451,7 +451,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
{
|
||||
shader_cleanup(object);
|
||||
heap_free(object);
|
||||
@@ -4298,7 +4316,7 @@ HRESULT CDECL wined3d_shader_create_ds(struct wined3d_device *device, const stru
|
||||
@@ -4286,7 +4304,7 @@ HRESULT CDECL wined3d_shader_create_ds(struct wined3d_device *device, const stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ index e34b6548cd..965471e0e5 100644
|
||||
{
|
||||
shader_cleanup(object);
|
||||
heap_free(object);
|
||||
@@ -4360,7 +4378,7 @@ HRESULT CDECL wined3d_shader_create_hs(struct wined3d_device *device, const stru
|
||||
@@ -4348,7 +4366,7 @@ HRESULT CDECL wined3d_shader_create_hs(struct wined3d_device *device, const stru
|
||||
return hr;
|
||||
}
|
||||
|
||||
@ -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 42396a1b6e..766449d711 100644
|
||||
index 8170869bc9..edc96f8af9 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -4430,6 +4430,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
@@ -4433,6 +4433,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
Fixes: [8051] Sims 2 demo exits prematurely
|
||||
Depends: wined3d-WINED3D_RS_COLORWRITEENABLE
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3e1de8370f31d9d472a6ff61996479aabff16ab1 Mon Sep 17 00:00:00 2001
|
||||
From 57e066e3be063d122243daa149ef327c2594901a Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy White <jwhite@codeweavers.com>
|
||||
Date: Thu, 29 Mar 2018 11:58:25 +1100
|
||||
Subject: [PATCH] winemapi: Directly use xdg-email if available, enabling file
|
||||
@ -12,15 +12,15 @@ Use new heap_* function.
|
||||
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
|
||||
---
|
||||
dlls/winemapi/Makefile.in | 3 +-
|
||||
dlls/winemapi/sendmail.c | 48 +++++---
|
||||
dlls/winemapi/winemapi_private.h | 27 +++++
|
||||
dlls/winemapi/xdg-email.c | 246 +++++++++++++++++++++++++++++++++++++++
|
||||
dlls/winemapi/sendmail.c | 48 ++++--
|
||||
dlls/winemapi/winemapi_private.h | 27 ++++
|
||||
dlls/winemapi/xdg-email.c | 246 +++++++++++++++++++++++++++++++
|
||||
4 files changed, 309 insertions(+), 15 deletions(-)
|
||||
create mode 100644 dlls/winemapi/winemapi_private.h
|
||||
create mode 100644 dlls/winemapi/xdg-email.c
|
||||
|
||||
diff --git a/dlls/winemapi/Makefile.in b/dlls/winemapi/Makefile.in
|
||||
index 813ee42..d6f79b4 100644
|
||||
index 813ee42b349..d6f79b403da 100644
|
||||
--- a/dlls/winemapi/Makefile.in
|
||||
+++ b/dlls/winemapi/Makefile.in
|
||||
@@ -3,4 +3,5 @@ IMPORTS = shlwapi shell32 mapi32
|
||||
@ -31,11 +31,11 @@ index 813ee42..d6f79b4 100644
|
||||
+ sendmail.c \
|
||||
+ xdg-email.c
|
||||
diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c
|
||||
index 03a29ba..686e061 100644
|
||||
index cfb27e55c95..d5625686e9e 100644
|
||||
--- a/dlls/winemapi/sendmail.c
|
||||
+++ b/dlls/winemapi/sendmail.c
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "shlwapi.h"
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "winternl.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
+#include "winemapi_private.h"
|
||||
@ -43,7 +43,7 @@ index 03a29ba..686e061 100644
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(winemapi);
|
||||
|
||||
/* Escapes a string for use in mailto: URL */
|
||||
@@ -70,23 +72,12 @@ static char *escape_string(char *in, char *empty_string)
|
||||
@@ -71,23 +73,12 @@ static char *escape_string(char *in, char *empty_string)
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -70,7 +70,7 @@ index 03a29ba..686e061 100644
|
||||
lpMapiMessage message, FLAGS flags, ULONG reserved)
|
||||
{
|
||||
ULONG ret = MAPI_E_FAILURE;
|
||||
@@ -291,6 +282,35 @@ exit:
|
||||
@@ -292,6 +283,35 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ index 03a29ba..686e061 100644
|
||||
{
|
||||
diff --git a/dlls/winemapi/winemapi_private.h b/dlls/winemapi/winemapi_private.h
|
||||
new file mode 100644
|
||||
index 0000000..a8bb8c5
|
||||
index 00000000000..a8bb8c5e075
|
||||
--- /dev/null
|
||||
+++ b/dlls/winemapi/winemapi_private.h
|
||||
@@ -0,0 +1,27 @@
|
||||
@ -141,7 +141,7 @@ index 0000000..a8bb8c5
|
||||
+#endif /* __WINEMAPI_PRIVATE_INCLUDED__ */
|
||||
diff --git a/dlls/winemapi/xdg-email.c b/dlls/winemapi/xdg-email.c
|
||||
new file mode 100644
|
||||
index 0000000..6b42066
|
||||
index 00000000000..6b420663a26
|
||||
--- /dev/null
|
||||
+++ b/dlls/winemapi/xdg-email.c
|
||||
@@ -0,0 +1,246 @@
|
||||
@ -392,5 +392,5 @@ index 0000000..6b42066
|
||||
+ return ret;
|
||||
+}
|
||||
--
|
||||
1.9.1
|
||||
2.20.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user