[PATCH 1/8] wined3d: Ignore flags for conditional SM 1-3 instructions explicitly.

Józef Kucia jkucia at codeweavers.com
Wed May 25 03:51:18 CDT 2016


This is to make sure that a regression is not introduced
when the SM4+ _nz/_z modifiers are implemented for these instructions.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/wined3d/shader_sm1.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dlls/wined3d/shader_sm1.c b/dlls/wined3d/shader_sm1.c
index 54312d4..2a1f4a4 100644
--- a/dlls/wined3d/shader_sm1.c
+++ b/dlls/wined3d/shader_sm1.c
@@ -708,6 +708,19 @@ static void shader_sm1_read_comment(const DWORD **ptr)
     }
 }
 
+static void shader_sm1_validate_instruction(struct wined3d_shader_instruction *ins)
+{
+    if (ins->handler_idx == WINED3DSIH_BREAKP || ins->handler_idx == WINED3DSIH_IF)
+    {
+        if (ins->flags)
+        {
+            FIXME("Ignoring unexpected instruction flags %#x for %s.\n",
+                    ins->flags, debug_d3dshaderinstructionhandler(ins->handler_idx));
+            ins->flags = 0;
+        }
+    }
+}
+
 static void shader_sm1_read_instruction(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
 {
     const struct wined3d_sm1_opcode_info *opcode_info;
@@ -775,6 +788,8 @@ static void shader_sm1_read_instruction(void *data, const DWORD **ptr, struct wi
             shader_sm1_read_src_param(priv, &p, &priv->src_param[i], &priv->src_rel_addr[i]);
         }
     }
+
+    shader_sm1_validate_instruction(ins);
 }
 
 static BOOL shader_sm1_is_end(void *data, const DWORD **ptr)
-- 
2.7.3




More information about the wine-patches mailing list