[PATCH 5/7] wined3d: Force stream info update on vertex shader change.

Matteo Bruni mbruni at codeweavers.com
Tue Mar 17 09:52:13 CDT 2015


So I though that maybe I should send the first few patches of the
GLSL-related changes for core contexts for review sooner rather than
later, since they are pretty much guaranteed to require a few
iterations. Here are the first three, which should give a good idea of
the direction I'm taking.

This one is really a NOP at this point since VDECL is always flagged on
vertex shader changes but it allows to separate VDECL from VS state
handlers a bit as a followup.
---
 dlls/wined3d/context.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index af29e69..9cc68ab 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3048,7 +3048,12 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
      * updating a resource location. */
     context_update_tex_unit_map(context, state);
     context_preload_textures(context, state);
-    if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC))
+    /* TODO: Right now the dependency on the vertex shader is necessary
+     * since context_stream_info_from_declaration depends on the reg_maps of
+     * the current VS but maybe it's possible to relax the coupling in some
+     * situations at least. */
+    if (isStateDirty(context, STATE_VDECL) || isStateDirty(context, STATE_STREAMSRC)
+            || isStateDirty(context, STATE_SHADER(WINED3D_SHADER_TYPE_VERTEX)))
     {
         context_update_stream_info(context, state);
     }
-- 
2.0.5




More information about the wine-patches mailing list