mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Updated wined3d-SWVP-shaders, wined3d-Indexed_Vertex_Blending patchsets
This commit is contained in:
parent
c043d43772
commit
06fbe73760
@ -1,4 +1,4 @@
|
||||
From 22479b6d05acd8bdd81f6e8ea84425ad55b9b48b Mon Sep 17 00:00:00 2001
|
||||
From 38fb8092fba8c27ab0d89c6253b1b3d00c6e3544 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,7 +9,7 @@ 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 67e1133c51..3d7a64b91f 100644
|
||||
index 09cd09db94..8653462cea 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -20765,6 +20765,257 @@ done:
|
||||
@ -270,7 +270,7 @@ index 67e1133c51..3d7a64b91f 100644
|
||||
static void test_updatetexture(void)
|
||||
{
|
||||
BOOL r32f_supported, ati2n_supported, do_visual_test;
|
||||
@@ -24872,6 +25123,7 @@ START_TEST(visual)
|
||||
@@ -24918,6 +25169,7 @@ START_TEST(visual)
|
||||
test_multisample_mismatch();
|
||||
test_texcoordindex();
|
||||
test_vertex_blending();
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f3c0bad722ce7f98931cd1ee14ecfae6f3540c0a Mon Sep 17 00:00:00 2001
|
||||
From 4627f3540a189d8a109b71f8a91e25153bfd2b48 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,7 +10,7 @@ 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 3d7a64b91f..0768a35752 100644
|
||||
index 8653462cea..8e7d17d5b4 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -20767,47 +20767,68 @@ done:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8bb56418a2b9ffffe8bd8592a43306a6bad6d740 Mon Sep 17 00:00:00 2001
|
||||
From 019c92ba7506c7e6464a9c9dc7a15185c2553d61 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,7 +9,7 @@ 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 0768a35752..c2737c3605 100644
|
||||
index 8e7d17d5b4..a1d663f43a 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -21039,7 +21039,9 @@ static void test_indexed_vertex_blending(void)
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 38a3612bf075bcb4989a10ab75d6bfc7c31f6d94 Mon Sep 17 00:00:00 2001
|
||||
From 7b61c945927e3744132a25831d707be324c0e77f 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,10 +16,10 @@ 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 1b386a7b8e..b50b50b74c 100644
|
||||
index 89d887e0fc..71ebf0a2d6 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3744,6 +3744,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -3750,6 +3750,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;
|
||||
@ -42,10 +42,10 @@ index b5ad1f8875..2dc509749a 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 307993286c..b1df64bed7 100644
|
||||
index 8d7f03ecc3..7f4fe4ba96 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -3644,6 +3644,11 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
|
||||
@@ -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);
|
||||
if (device->create_parms.flags & WINED3DCREATE_SOFTWARE_VERTEXPROCESSING)
|
||||
caps->MaxVertexShaderConst = adapter->d3d_info.limits.vs_uniform_count_swvp;
|
||||
@ -58,10 +58,10 @@ index 307993286c..b1df64bed7 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 0c70f046eb..511c2da808 100644
|
||||
index a05f6cccdc..ae061bb82a 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -2250,6 +2250,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
|
||||
@@ -2251,6 +2251,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
|
||||
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 0c70f046eb..511c2da808 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 b7ccfc633e..1dcb0ef7c2 100644
|
||||
index 8bdb952f38..e2d04702ad 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -12192,6 +12192,258 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
|
||||
@@ -12195,6 +12195,258 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(1)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(2)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(3)), glsl_vertex_pipe_vertexblend }, WINED3D_GL_EXT_NONE },
|
||||
@ -367,7 +367,7 @@ index 104e276585..3785ae104b 100644
|
||||
return "unrecognized";
|
||||
}
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7014e6760d..134a376707 100644
|
||||
index e48c2a730d..cfad5aba07 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -170,6 +170,7 @@ struct wined3d_d3d_limits
|
||||
|
@ -1,4 +1,4 @@
|
||||
From eaf6f839138991a05e565c5dc94954e9a2eb3dfa Mon Sep 17 00:00:00 2001
|
||||
From 57a3158c7da70934f8d2412efd9568cc973c1d31 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 20:28:35 +0300
|
||||
Subject: [PATCH 5/5] wined3d: Support indexed vertex blending.
|
||||
@ -6,14 +6,14 @@ Subject: [PATCH 5/5] wined3d: Support indexed vertex blending.
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/d3d9/tests/visual.c | 6 +-
|
||||
dlls/wined3d/glsl_shader.c | 162 ++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/glsl_shader.c | 164 ++++++++++++++++++++++++++-----
|
||||
dlls/wined3d/utils.c | 6 +-
|
||||
dlls/wined3d/vertexdeclaration.c | 9 ++
|
||||
dlls/wined3d/wined3d_private.h | 11 ++-
|
||||
5 files changed, 165 insertions(+), 29 deletions(-)
|
||||
5 files changed, 166 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index c2737c3605..ddc6a0699b 100644
|
||||
index a1d663f43a..a452f37944 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -20916,7 +20916,7 @@ static void do_test_indexed_vertex_blending(IDirect3DDevice9 *device, const char
|
||||
@ -44,7 +44,7 @@ index c2737c3605..ddc6a0699b 100644
|
||||
|
||||
hr = IDirect3DDevice9_SetSoftwareVertexProcessing(device, FALSE);
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 1dcb0ef7c2..1607fa6405 100644
|
||||
index e2d04702ad..dc5c24e035 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -150,6 +150,9 @@ struct shader_glsl_priv
|
||||
@ -90,10 +90,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
- break;
|
||||
+ if (priv->ubo_modelview == -1)
|
||||
+ FIXME("UBO buffer with vertex blend matrices is not initialized.\n");
|
||||
|
||||
- get_modelview_matrix(context, state, i, &mat);
|
||||
- GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[i], 1, FALSE, &mat._11));
|
||||
- checkGLcall("glUniformMatrix4fv");
|
||||
+
|
||||
+ GL_EXTCALL(glBindBuffer(GL_UNIFORM_BUFFER, priv->ubo_modelview));
|
||||
+ checkGLcall("glBindBuffer (UBO)");
|
||||
+ GL_EXTCALL(glBufferData(GL_UNIFORM_BUFFER, sizeof(*priv->modelview_buffer) * MAX_VERTEX_BLEND_UBO,
|
||||
@ -102,7 +99,10 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
+
|
||||
+ for (i = 0; i < MAX_VERTEX_BLEND_UBO; ++i)
|
||||
+ get_modelview_matrix(context, state, i, &priv->modelview_buffer[i]);
|
||||
+
|
||||
|
||||
- get_modelview_matrix(context, state, i, &mat);
|
||||
- GL_EXTCALL(glUniformMatrix4fv(prog->vs.modelview_matrix_location[i], 1, FALSE, &mat._11));
|
||||
- checkGLcall("glUniformMatrix4fv");
|
||||
+ GL_EXTCALL(glBufferSubData(GL_UNIFORM_BUFFER, 0,
|
||||
+ sizeof(*priv->modelview_buffer) * MAX_VERTEX_BLEND_UBO, priv->modelview_buffer));
|
||||
+ checkGLcall("glBufferSubData");
|
||||
@ -121,7 +121,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9211,8 +9228,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9214,8 +9231,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 */
|
||||
@ -131,7 +131,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
{"vec3", "ffp_attrib_normal"}, /* WINED3D_FFP_NORMAL */
|
||||
{"float", "ffp_attrib_psize"}, /* WINED3D_FFP_PSIZE */
|
||||
{"vec4", "ffp_attrib_diffuse"}, /* WINED3D_FFP_DIFFUSE */
|
||||
@@ -9228,6 +9244,9 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9231,6 +9247,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);
|
||||
@ -141,7 +141,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
|
||||
if (shader_glsl_use_explicit_attrib_location(gl_info))
|
||||
shader_addline(buffer, "#extension GL_ARB_explicit_attrib_location : enable\n");
|
||||
@@ -9242,7 +9261,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9245,7 +9264,18 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
}
|
||||
shader_addline(buffer, "\n");
|
||||
|
||||
@ -155,13 +155,13 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ shader_addline(buffer, "uniform mat4 ffp_modelview_matrix[%u];\n", MAX_VERTEX_BLENDS);
|
||||
+ shader_addline(buffer, "uniform mat4 ffp_modelview_matrix[%u];\n", settings->vertexblends + 1);
|
||||
+ }
|
||||
+
|
||||
shader_addline(buffer, "uniform mat4 ffp_projection_matrix;\n");
|
||||
shader_addline(buffer, "uniform mat3 ffp_normal_matrix;\n");
|
||||
shader_addline(buffer, "uniform mat4 ffp_texture_matrix[%u];\n", WINED3D_MAX_TEXTURES);
|
||||
@@ -9304,6 +9334,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9307,6 +9337,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");
|
||||
@ -170,7 +170,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(attrib_info); ++i)
|
||||
{
|
||||
@@ -9333,8 +9365,21 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9336,8 +9368,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");
|
||||
@ -194,7 +194,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
|
||||
shader_addline(buffer, "gl_Position = ffp_projection_matrix * ec_pos;\n");
|
||||
if (settings->clipping)
|
||||
@@ -9358,7 +9403,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
@@ -9361,7 +9406,19 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
|
||||
else
|
||||
{
|
||||
for (i = 0; i < settings->vertexblends + 1; ++i)
|
||||
@ -215,7 +215,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
}
|
||||
|
||||
if (settings->normalize)
|
||||
@@ -10231,6 +10288,39 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10234,6 +10291,39 @@ 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));
|
||||
}
|
||||
@ -255,7 +255,16 @@ index 1dcb0ef7c2..1607fa6405 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)
|
||||
@@ -10819,6 +10909,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10813,7 +10903,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;
|
||||
|
||||
- for (i = 1; i < MAX_VERTEX_BLENDS; ++i)
|
||||
+ for (i = 0; i < MAX_VERTEX_BLENDS; ++i)
|
||||
{
|
||||
if (entry->vs.modelview_matrix_location[i] != -1)
|
||||
{
|
||||
@@ -10822,6 +10912,9 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,7 +274,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
for (i = 0; i < WINED3D_MAX_TEXTURES; ++i)
|
||||
{
|
||||
if (entry->vs.texture_matrix_location[i] != -1)
|
||||
@@ -11355,7 +11448,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11358,7 +11451,17 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
fragment_pipe->get_caps(gl_info, &fragment_caps);
|
||||
priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL;
|
||||
priv->legacy_lighting = device->wined3d->flags & WINED3D_LEGACY_FFP_LIGHTING;
|
||||
@ -284,7 +293,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
device->vertex_priv = vertex_priv;
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
@@ -11388,6 +11491,14 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
@@ -11391,6 +11494,14 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
string_buffer_free(&priv->shader_buffer);
|
||||
priv->fragment_pipe->free_private(device);
|
||||
priv->vertex_pipe->vp_free(device);
|
||||
@ -299,7 +308,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
|
||||
if (priv->ubo_vs_c != -1)
|
||||
{
|
||||
@@ -11804,7 +11915,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
|
||||
@@ -11807,7 +11918,11 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
|
||||
caps->ffp_generic_attributes = TRUE;
|
||||
caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS;
|
||||
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;
|
||||
@ -312,7 +321,7 @@ index 1dcb0ef7c2..1607fa6405 100644
|
||||
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
|
||||
| WINED3DVTXPCAPS_MATERIALSOURCE7
|
||||
| WINED3DVTXPCAPS_VERTEXFOG
|
||||
@@ -12003,7 +12118,8 @@ static void glsl_vertex_pipe_pixel_shader(struct wined3d_context *context,
|
||||
@@ -12006,7 +12121,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)
|
||||
{
|
||||
@ -367,7 +376,7 @@ index cd8bb5e423..d37f3ce860 100644
|
||||
switch(element->format)
|
||||
{
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 134a376707..1da3236add 100644
|
||||
index cfad5aba07..ce4f553f6a 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -275,6 +275,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
|
||||
@ -378,7 +387,7 @@ index 134a376707..1da3236add 100644
|
||||
#define MAX_RENDER_TARGETS 8
|
||||
|
||||
struct min_lookup
|
||||
@@ -2836,7 +2837,8 @@ struct wined3d_ffp_vs_settings
|
||||
@@ -2846,7 +2847,8 @@ struct wined3d_ffp_vs_settings
|
||||
DWORD ortho_fog : 1;
|
||||
DWORD flatshading : 1;
|
||||
DWORD swizzle_map : 16; /* MAX_ATTRIBS, 16 */
|
||||
@ -388,7 +397,7 @@ index 134a376707..1da3236add 100644
|
||||
|
||||
DWORD texgen[WINED3D_MAX_TEXTURES];
|
||||
};
|
||||
@@ -4733,6 +4735,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
@@ -4743,6 +4745,13 @@ static inline void wined3d_not_from_cs(struct wined3d_cs *cs)
|
||||
assert(cs->thread_id != GetCurrentThreadId());
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6b44ab2e3f778bf8b7837ea02dca26abdc1547a2 Mon Sep 17 00:00:00 2001
|
||||
From 168e4d29d3880dcb9db75c0a90a459037ee707d5 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 13:17:01 +0300
|
||||
Subject: [PATCH 1/5] wined3d: Use UBO for vertex shader float constants if
|
||||
@ -14,10 +14,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
5 files changed, 114 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 48eca14fe2..493bca5d90 100644
|
||||
index 964e51944f..86df4003db 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3081,6 +3081,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct
|
||||
@@ -3087,6 +3087,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);
|
||||
@ -28,7 +28,7 @@ index 48eca14fe2..493bca5d90 100644
|
||||
}
|
||||
if (gl_info->supported[ARB_TESSELLATION_SHADER])
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 470cb0c3ba..625997470f 100644
|
||||
index 476ae2fae0..ecc1d7fbf8 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -138,6 +138,10 @@ struct shader_glsl_priv
|
||||
@ -136,7 +136,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_shader_indexable_temp *idx_temp_reg;
|
||||
unsigned int uniform_block_base, uniform_block_count;
|
||||
@@ -2425,7 +2470,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2428,7 +2473,15 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
|
||||
/* Declare the constants (aka uniforms) */
|
||||
@ -153,7 +153,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
{
|
||||
unsigned max_constantsF;
|
||||
|
||||
@@ -2490,11 +2543,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2493,11 +2546,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -168,7 +168,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
}
|
||||
|
||||
/* Always declare the full set of constants, the compiler can remove the
|
||||
@@ -10101,17 +10155,44 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
|
||||
@@ -10104,17 +10158,44 @@ 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,
|
||||
@ -218,7 +218,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
{
|
||||
@@ -11191,6 +11272,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11194,6 +11275,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
if (!(priv = heap_alloc_zero(sizeof(*priv))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@ -226,7 +226,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11245,6 +11327,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11248,6 +11330,8 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
device->fragment_priv = fragment_priv;
|
||||
device->shader_priv = priv;
|
||||
|
||||
@ -235,7 +235,7 @@ index 470cb0c3ba..625997470f 100644
|
||||
return WINED3D_OK;
|
||||
|
||||
fail:
|
||||
@@ -11272,6 +11356,13 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
@@ -11275,6 +11359,13 @@ static void shader_glsl_free(struct wined3d_device *device)
|
||||
priv->fragment_pipe->free_private(device);
|
||||
priv->vertex_pipe->vp_free(device);
|
||||
|
||||
@ -279,10 +279,10 @@ index d77cb1ce11..104e276585 100644
|
||||
|
||||
ERR("Unrecognized shader type %#x.\n", shader_type);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f23b84a6f4..b9ec04080d 100644
|
||||
index ea41abdaf8..5edff2ecee 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -1042,6 +1042,7 @@ struct wined3d_shader_reg_maps
|
||||
@@ -1051,6 +1051,7 @@ struct wined3d_shader_reg_maps
|
||||
struct wined3d_shader_tgsm *tgsm;
|
||||
SIZE_T tgsm_capacity;
|
||||
unsigned int tgsm_count;
|
||||
@ -290,7 +290,7 @@ index f23b84a6f4..b9ec04080d 100644
|
||||
};
|
||||
|
||||
/* Keeps track of details for TEX_M#x# instructions which need to maintain
|
||||
@@ -2580,6 +2581,7 @@ struct wined3d_gl_limits
|
||||
@@ -2590,6 +2591,7 @@ struct wined3d_gl_limits
|
||||
UINT glsl_varyings;
|
||||
UINT glsl_vs_float_constants;
|
||||
UINT glsl_ps_float_constants;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b6f4150aa69d697f08abcf82ee59ffadb2fa6ad2 Mon Sep 17 00:00:00 2001
|
||||
From 93e394cd34fa63e16adeee0bf87537256c071fe7 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.
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c028015c9ec3bcbeac6a57315f81e61f5b56a196 Mon Sep 17 00:00:00 2001
|
||||
From 37d7d2673047b10e356541e113c8d35d893a0ebb 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
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
4 files changed, 20 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 493bca5d90..1b386a7b8e 100644
|
||||
index 86df4003db..89d887e0fc 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -3731,7 +3731,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
|
||||
@@ -3737,7 +3737,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;
|
||||
@ -54,10 +54,10 @@ index af73751dbf..0be43d4551 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 625997470f..a1e75bf4d4 100644
|
||||
index ecc1d7fbf8..ac77a6a178 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -11438,7 +11438,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
|
||||
@@ -11441,7 +11441,10 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, 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 +70,7 @@ index 625997470f..a1e75bf4d4 100644
|
||||
caps->varying_count = gl_info->limits.glsl_varyings;
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index b9ec04080d..7100816279 100644
|
||||
index 5edff2ecee..9e5665165f 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -163,6 +163,7 @@ struct wined3d_d3d_limits
|
||||
@ -81,7 +81,7 @@ index b9ec04080d..7100816279 100644
|
||||
DWORD ps_uniform_count;
|
||||
unsigned int varying_count;
|
||||
unsigned int ffp_textures;
|
||||
@@ -672,6 +673,7 @@ enum wined3d_shader_conditional_op
|
||||
@@ -681,6 +682,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 991225512f6251e7567d510028c69344811e7544 Mon Sep 17 00:00:00 2001
|
||||
From 220fe2d54e6a022f263ccfc014e31ef239f9c6a6 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
|
||||
@ -8,11 +8,11 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/d3d9/tests/device.c | 5 -----
|
||||
dlls/d3d9/tests/visual.c | 1 -
|
||||
dlls/wined3d/device.c | 15 +++++++++++----
|
||||
dlls/wined3d/device.c | 16 ++++++++++++----
|
||||
dlls/wined3d/glsl_shader.c | 2 +-
|
||||
dlls/wined3d/stateblock.c | 6 +++---
|
||||
dlls/wined3d/wined3d_private.h | 8 ++++----
|
||||
6 files changed, 19 insertions(+), 18 deletions(-)
|
||||
6 files changed, 20 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
|
||||
index 030b34c4e4..5f7944b93a 100644
|
||||
@ -49,7 +49,7 @@ index 030b34c4e4..5f7944b93a 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 e8279213d0..26085440fd 100644
|
||||
index 659d074149..a0d7b9caaf 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -23948,7 +23948,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@ -61,7 +61,7 @@ index e8279213d0..26085440fd 100644
|
||||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 0be43d4551..ff0cb61f08 100644
|
||||
index 0be43d4551..6649e5078d 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,
|
||||
@ -84,7 +84,7 @@ index 0be43d4551..ff0cb61f08 100644
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
memcpy(&device->update_stateblock_state->vs_consts_f[start_idx], constants, count * sizeof(*constants));
|
||||
@@ -2590,12 +2594,15 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device
|
||||
@@ -2590,12 +2594,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;
|
||||
@ -95,15 +95,16 @@ index 0be43d4551..ff0cb61f08 100644
|
||||
|
||||
- if (!constants || start_idx >= d3d_info->limits.vs_uniform_count
|
||||
- || count > d3d_info->limits.vs_uniform_count - start_idx)
|
||||
+ constants_count = device->create_parms.flags & WINED3DCREATE_HARDWARE_VERTEXPROCESSING
|
||||
+ ? d3d_info->limits.vs_uniform_count : d3d_info->limits.vs_uniform_count_swvp;
|
||||
+ constants_count = device->create_parms.flags
|
||||
+ & (WINED3DCREATE_SOFTWARE_VERTEXPROCESSING | WINED3DCREATE_MIXED_VERTEXPROCESSING)
|
||||
+ ? d3d_info->limits.vs_uniform_count_swvp : d3d_info->limits.vs_uniform_count;
|
||||
+ if (!constants || start_idx >= constants_count
|
||||
+ || count > constants_count - start_idx)
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
|
||||
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 a1e75bf4d4..8fdab07ab0 100644
|
||||
index ac77a6a178..6acb730fe4 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -2137,7 +2137,7 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev
|
||||
@ -147,10 +148,10 @@ index 820089d0b8..cd5c8bd5dc 100644
|
||||
|
||||
default:
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 7100816279..51214d89dc 100644
|
||||
index 9e5665165f..9655660a5b 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2937,7 +2937,7 @@ struct wined3d_state
|
||||
@@ -2947,7 +2947,7 @@ struct wined3d_state
|
||||
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
@ -159,7 +160,7 @@ index 7100816279..51214d89dc 100644
|
||||
|
||||
BOOL ps_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
struct wined3d_ivec4 ps_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
@@ -3009,7 +3009,7 @@ struct wined3d_stateblock_state
|
||||
@@ -3019,7 +3019,7 @@ struct wined3d_stateblock_state
|
||||
int base_vertex_index;
|
||||
|
||||
struct wined3d_shader *vs;
|
||||
@ -168,7 +169,7 @@ index 7100816279..51214d89dc 100644
|
||||
struct wined3d_ivec4 vs_consts_i[WINED3D_MAX_CONSTS_I];
|
||||
BOOL vs_consts_b[WINED3D_MAX_CONSTS_B];
|
||||
|
||||
@@ -3604,7 +3604,7 @@ struct wined3d_saved_states
|
||||
@@ -3614,7 +3614,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 */
|
||||
@ -177,7 +178,7 @@ index 7100816279..51214d89dc 100644
|
||||
DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */
|
||||
DWORD indices : 1;
|
||||
DWORD material : 1;
|
||||
@@ -3640,7 +3640,7 @@ struct wined3d_stateblock
|
||||
@@ -3650,7 +3650,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 dd16fac7bbbc3a9197d1866e59d945a1552cc654 Mon Sep 17 00:00:00 2001
|
||||
From 9507b08a2a3e640879f69bbfac0dd600eb127580 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.
|
||||
@ -60,7 +60,7 @@ index 5f7944b93a..cef0759610 100644
|
||||
cleanup:
|
||||
refcount = IDirect3DDevice9_Release(device);
|
||||
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
|
||||
index 26085440fd..67e1133c51 100644
|
||||
index a0d7b9caaf..09cd09db94 100644
|
||||
--- a/dlls/d3d9/tests/visual.c
|
||||
+++ b/dlls/d3d9/tests/visual.c
|
||||
@@ -23874,7 +23874,6 @@ static void test_mvp_software_vertex_shaders(void)
|
||||
@ -97,10 +97,10 @@ index 26085440fd..67e1133c51 100644
|
||||
expected_color, color);
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index ff0cb61f08..307993286c 100644
|
||||
index 6649e5078d..8d7f03ecc3 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4079,6 +4079,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *
|
||||
@@ -4080,6 +4080,14 @@ void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *
|
||||
warned = TRUE;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ index ff0cb61f08..307993286c 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 8fdab07ab0..b7ccfc633e 100644
|
||||
index 6acb730fe4..8bdb952f38 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -140,7 +140,9 @@ struct shader_glsl_priv
|
||||
@ -230,7 +230,7 @@ index 8fdab07ab0..b7ccfc633e 100644
|
||||
{
|
||||
update_heap_entry(heap, i, priv->next_constant_version);
|
||||
}
|
||||
@@ -2476,7 +2492,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
@@ -2479,7 +2495,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
||||
shader_addline(buffer,"layout(std140) uniform vs_c_ubo\n"
|
||||
"{ \n"
|
||||
" vec4 %s_c[%u];\n"
|
||||
@ -239,7 +239,7 @@ index 8fdab07ab0..b7ccfc633e 100644
|
||||
}
|
||||
else if (shader->limits->constant_float > 0)
|
||||
{
|
||||
@@ -10186,12 +10202,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
@@ -10189,12 +10205,13 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
|
||||
}
|
||||
else if (!priv->consts_ubo)
|
||||
{
|
||||
@ -255,7 +255,7 @@ index 8fdab07ab0..b7ccfc633e 100644
|
||||
}
|
||||
|
||||
for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
|
||||
@@ -10510,6 +10527,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
@@ -10513,6 +10530,10 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
|
||||
vs_list = &ffp_shader->linked_programs;
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ index 8fdab07ab0..b7ccfc633e 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;
|
||||
@@ -11263,7 +11284,7 @@ static void constant_heap_free(struct constant_heap *heap)
|
||||
@@ -11266,7 +11287,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)
|
||||
{
|
||||
@ -275,7 +275,7 @@ index 8fdab07ab0..b7ccfc633e 100644
|
||||
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
|
||||
struct fragment_caps fragment_caps;
|
||||
void *vertex_priv, *fragment_priv;
|
||||
@@ -11273,6 +11294,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11276,6 +11297,18 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
priv->consts_ubo = gl_info->supported[ARB_UNIFORM_BUFFER_OBJECT];
|
||||
@ -294,7 +294,7 @@ index 8fdab07ab0..b7ccfc633e 100644
|
||||
string_buffer_list_init(&priv->string_buffers);
|
||||
|
||||
if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv)))
|
||||
@@ -11302,7 +11335,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
@@ -11305,7 +11338,7 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct win
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -470,10 +470,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 51214d89dc..7014e6760d 100644
|
||||
index 9655660a5b..e48c2a730d 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -4415,6 +4415,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
@@ -4425,6 +4425,13 @@ static inline BOOL shader_constant_is_local(const struct wined3d_shader *shader,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user