Rebase against 4ccdf3e58a816ebf9c58000e985fd21737ffd485

This commit is contained in:
Alistair Leslie-Hughes 2019-11-28 18:31:59 +11:00
parent 3ba119e67c
commit 14a1f8bd0c
2 changed files with 28 additions and 28 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "ce275f38a02dd5f809eea45ff3fa02f645b56a7c"
echo "4ccdf3e58a816ebf9c58000e985fd21737ffd485"
}
# Show version information

View File

@ -1,8 +1,8 @@
From 04043842592ec64faf47bbd4f49f8e6ffcfebbc6 Mon Sep 17 00:00:00 2001
From 2b388131f69ba58661d226e9ea1316c3c554ad75 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
state tracking.
Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
tracking.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
---
@ -15,10 +15,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
6 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 1e8133b0c8..70b6ce01c0 100644
index 3ec5128667f..c1fa73bd7a9 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -6455,13 +6455,10 @@ static void test_vertex_shader_constant(void)
@@ -6411,13 +6411,10 @@ static void test_vertex_shader_constant(void)
ok(consts_swvp == 8192, "Unexpected consts_swvp %u.\n", consts_swvp);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -32,7 +32,7 @@ index 1e8133b0c8..70b6ce01c0 100644
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -6486,7 +6483,6 @@ static void test_vertex_shader_constant(void)
@@ -6442,7 +6439,6 @@ static void test_vertex_shader_constant(void)
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 0);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -40,7 +40,7 @@ index 1e8133b0c8..70b6ce01c0 100644
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts_swvp - 1, c, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -6494,7 +6490,6 @@ static void test_vertex_shader_constant(void)
@@ -6450,7 +6446,6 @@ static void test_vertex_shader_constant(void)
IDirect3DDevice9_SetSoftwareVertexProcessing(device, 1);
hr = IDirect3DDevice9_SetVertexShaderConstantF(device, consts + 0, c, 1);
@ -49,10 +49,10 @@ index 1e8133b0c8..70b6ce01c0 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 e7076aeed6..2128331ca6 100644
index 1c93b6c4426..8d0f37ff97d 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -24767,7 +24767,6 @@ static void test_mvp_software_vertex_shaders(void)
@@ -24797,7 +24797,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 e7076aeed6..2128331ca6 100644
hr = IDirect3DDevice9_BeginScene(device);
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index cd078435c8..ed95996ef3 100644
index 9d3f3dc00fc..d61dee3a918 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2427,13 +2427,17 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device,
@@ -2290,13 +2290,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;
@ -83,8 +83,8 @@ index cd078435c8..ed95996ef3 100644
+ || count > constants_count - start_idx)
return WINED3DERR_INVALIDCALL;
memcpy(&device->update_stateblock_state->vs_consts_f[start_idx], constants, count * sizeof(*constants));
@@ -2460,12 +2464,16 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device
memcpy(&device->state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
@@ -2315,12 +2319,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 cd078435c8..ed95996ef3 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 021b275fbc..cee3621e0d 100644
index bcb1fd98fa5..879edacff7f 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -1911,7 +1911,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
@ -117,10 +117,10 @@ index 021b275fbc..cee3621e0d 100644
update_heap_entry(heap, i, priv->next_constant_version);
}
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 97ef422f5a..986832bb34 100644
index 1c3704c10a5..153dc25182a 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -312,7 +312,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
@@ -312,7 +312,7 @@ void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *s
}
}
@ -129,7 +129,7 @@ index 97ef422f5a..986832bb34 100644
{
if (stateblock->changed.vs_consts_f[i])
{
@@ -1277,10 +1277,17 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
@@ -1292,10 +1292,17 @@ void CDECL wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *state
HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock,
unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
{
@ -148,18 +148,18 @@ index 97ef422f5a..986832bb34 100644
return WINED3DERR_INVALIDCALL;
memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
@@ -1603,7 +1610,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
@@ -2014,7 +2021,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
stateblock_init_lights(stateblock->stateblock_state.light_state.light_map,
device->stateblock_state.light_state.light_map);
device_state->stateblock_state.light_state.light_map);
stateblock_savedstates_set_all(&stateblock->changed,
- d3d_info->limits.vs_uniform_count, d3d_info->limits.ps_uniform_count);
+ d3d_info->limits.vs_uniform_count_swvp, d3d_info->limits.ps_uniform_count);
break;
case WINED3D_SBT_PIXEL_STATE:
@@ -1615,7 +1622,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
@@ -2026,7 +2033,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
stateblock_init_lights(stateblock->stateblock_state.light_state.light_map,
device->stateblock_state.light_state.light_map);
device_state->stateblock_state.light_state.light_map);
stateblock_savedstates_set_vertex(&stateblock->changed,
- d3d_info->limits.vs_uniform_count);
+ d3d_info->limits.vs_uniform_count_swvp);
@ -167,10 +167,10 @@ index 97ef422f5a..986832bb34 100644
default:
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 769040ea20..cfda378cc0 100644
index d0dd718060b..cbbbce65cb4 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3162,7 +3162,7 @@ struct wined3d_state
@@ -3177,7 +3177,7 @@ struct wined3d_state
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
@ -179,7 +179,7 @@ index 769040ea20..cfda378cc0 100644
BOOL ps_consts_b[WINED3D_MAX_CONSTS_B];
struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I];
@@ -3218,7 +3218,7 @@ struct wined3d_stateblock_state
@@ -3249,7 +3249,7 @@ struct wined3d_stateblock_state
int base_vertex_index;
struct wined3d_shader *vs;
@ -188,7 +188,7 @@ index 769040ea20..cfda378cc0 100644
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
@@ -3915,7 +3915,7 @@ struct wined3d_saved_states
@@ -3946,7 +3946,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 */
@ -197,7 +197,7 @@ index 769040ea20..cfda378cc0 100644
DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
DWORD indices : 1;
DWORD material : 1;
@@ -3952,7 +3952,7 @@ struct wined3d_stateblock
@@ -3983,7 +3983,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;
@ -207,5 +207,5 @@ index 769040ea20..cfda378cc0 100644
DWORD contained_ps_consts_i[WINED3D_MAX_CONSTS_I];
unsigned int num_contained_ps_consts_i;
--
2.21.0
2.24.0