You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 749f8c25e262cb049289e7c96bb390edcafa1021.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From e9fe2d9a9c65ad4b0f86f80bbabce4fb90085e60 Mon Sep 17 00:00:00 2001
|
||||
From 9379d1dcd14d684a07763f28b20384c8a65bd146 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 15:05:12 +0300
|
||||
Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] wined3d: Support SWVP vertex shader constants limit in state
|
||||
7 files changed, 31 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 53a83ad887b..ed4ce18bb61 100644
|
||||
index 3ef9361886d..86dd47383df 100644
|
||||
--- a/dlls/d3d9/tests/device.c
|
||||
+++ b/dlls/d3d9/tests/device.c
|
||||
@@ -6545,13 +6545,10 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6936,13 +6936,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 53a83ad887b..ed4ce18bb61 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);
|
||||
@@ -6576,7 +6573,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6967,7 +6964,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 53a83ad887b..ed4ce18bb61 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);
|
||||
@@ -6584,7 +6580,6 @@ static void test_vertex_shader_constant(void)
|
||||
@@ -6975,7 +6971,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 53a83ad887b..ed4ce18bb61 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 5218d8a2029..7c5951165ad 100644
|
||||
index 40585d5257d..6377addec24 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -24880,7 +24880,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@@ -24895,7 +24895,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,19 +61,19 @@ index 5218d8a2029..7c5951165ad 100644
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index a65411982a7..be548c5cc6c 100644
|
||||
index bb1b949c3e1..e2618f20d16 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3580,7 +3580,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
|
||||
@@ -3924,7 +3924,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
const struct wined3d_saved_states *changed = &stateblock->changed;
|
||||
const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT;
|
||||
struct wined3d_device_context *context = &device->cs->c;
|
||||
- unsigned int i, j, start, idx;
|
||||
+ unsigned int i, j, start, idx, vs_uniform_count;
|
||||
struct wined3d_range range;
|
||||
uint32_t map;
|
||||
|
||||
@@ -3591,9 +3591,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
@@ -3935,9 +3935,11 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device,
|
||||
if (changed->pixelShader)
|
||||
wined3d_device_set_pixel_shader(device, state->ps);
|
||||
|
||||
@@ -87,7 +87,7 @@ index a65411982a7..be548c5cc6c 100644
|
||||
|
||||
wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 5252baac34b..01a4eb9fa49 100644
|
||||
index db9efa70186..50551f0a663 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -1910,7 +1910,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@@ -100,10 +100,10 @@ index 5252baac34b..01a4eb9fa49 100644
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
}
|
||||
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
|
||||
index 46588fa4246..5ff9f3cc3f8 100644
|
||||
index 1f1ba262336..b939da02e61 100644
|
||||
--- a/dlls/wined3d/stateblock.c
|
||||
+++ b/dlls/wined3d/stateblock.c
|
||||
@@ -714,8 +714,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
|
||||
@@ -731,8 +731,8 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
|
||||
const struct wined3d_stateblock *device_state)
|
||||
{
|
||||
const struct wined3d_stateblock_state *state = &device_state->stateblock_state;
|
||||
@@ -113,7 +113,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
DWORD map;
|
||||
|
||||
TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
|
||||
@@ -731,9 +731,11 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
|
||||
@@ -748,9 +748,11 @@ void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock,
|
||||
stateblock->stateblock_state.vs = state->vs;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
break;
|
||||
|
||||
memcpy(&stateblock->stateblock_state.vs_consts_f[range.offset], &state->vs_consts_f[range.offset],
|
||||
@@ -977,8 +979,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
@@ -994,8 +996,8 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
struct wined3d_stateblock *device_state)
|
||||
{
|
||||
const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
|
||||
@@ -136,7 +136,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
DWORD map;
|
||||
|
||||
TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
|
||||
@@ -988,9 +990,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
@@ -1005,9 +1007,11 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock,
|
||||
if (stateblock->changed.pixelShader)
|
||||
wined3d_stateblock_set_pixel_shader(device_state, state->ps);
|
||||
|
||||
@@ -149,7 +149,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
break;
|
||||
wined3d_stateblock_set_vs_consts_f(device_state, range.offset, range.size, &state->vs_consts_f[range.offset]);
|
||||
}
|
||||
@@ -1182,13 +1186,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
|
||||
@@ -1199,13 +1203,14 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign
|
||||
HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock,
|
||||
unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
|
||||
{
|
||||
@@ -167,7 +167,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
|
||||
@@ -1937,7 +1942,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
@@ -2013,7 +2018,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
|
||||
device_state->stateblock_state.light_state->light_map);
|
||||
stateblock_savedstates_set_all(&stateblock->changed,
|
||||
@@ -176,7 +176,7 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
break;
|
||||
|
||||
case WINED3D_SBT_PIXEL_STATE:
|
||||
@@ -1949,7 +1954,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
@@ -2025,7 +2030,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const stru
|
||||
stateblock_init_lights(stateblock->stateblock_state.light_state->light_map,
|
||||
device_state->stateblock_state.light_state->light_map);
|
||||
stateblock_savedstates_set_vertex(&stateblock->changed,
|
||||
@@ -186,10 +186,10 @@ index 46588fa4246..5ff9f3cc3f8 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 47dac151e55..bdabd24d651 100644
|
||||
index b37cc260c92..c2d66362966 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3614,7 +3614,7 @@ struct wined3d_state
|
||||
@@ -3694,7 +3694,7 @@ struct wined3d_state
|
||||
struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS];
|
||||
struct wined3d_unordered_access_view *unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS];
|
||||
|
||||
@@ -198,7 +198,7 @@ index 47dac151e55..bdabd24d651 100644
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
@@ -3766,6 +3766,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
|
||||
@@ -3867,6 +3867,15 @@ HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device,
|
||||
struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
|
||||
void wined3d_device_uninit_3d(struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -214,7 +214,7 @@ index 47dac151e55..bdabd24d651 100644
|
||||
struct wined3d_device_no3d
|
||||
{
|
||||
struct wined3d_device d;
|
||||
@@ -4492,7 +4501,7 @@ struct wined3d_vertex_declaration
|
||||
@@ -4590,7 +4599,7 @@ struct wined3d_vertex_declaration
|
||||
|
||||
struct wined3d_saved_states
|
||||
{
|
||||
@@ -224,10 +224,10 @@ index 47dac151e55..bdabd24d651 100644
|
||||
WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */
|
||||
uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)];
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 86008c5ce24..90f6070aa1a 100644
|
||||
index b3f803b2614..841fb9f9aee 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2166,7 +2166,7 @@ struct wined3d_stateblock_state
|
||||
@@ -2189,7 +2189,7 @@ struct wined3d_stateblock_state
|
||||
int base_vertex_index;
|
||||
|
||||
struct wined3d_shader *vs;
|
||||
@@ -237,5 +237,5 @@ index 86008c5ce24..90f6070aa1a 100644
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user