=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Implement SM5 cut_stream instruction for stream 0.

Alexandre Julliard julliard at winehq.org
Thu Jul 7 09:48:23 CDT 2016


Module: wine
Branch: master
Commit: 422f0a87c48f595ca512d5278c4f3631e0aa599c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=422f0a87c48f595ca512d5278c4f3631e0aa599c

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jul  7 12:22:35 2016 +0200

wined3d: Implement SM5 cut_stream instruction for stream 0.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/glsl_shader.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 9a2025f..7ad5acd 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3437,7 +3437,12 @@ static void shader_glsl_cross(const struct wined3d_shader_instruction *ins)
 
 static void shader_glsl_cut(const struct wined3d_shader_instruction *ins)
 {
-    shader_addline(ins->ctx->buffer, "EndPrimitive();\n");
+    unsigned int stream = ins->handler_idx == WINED3DSIH_CUT ? 0 : ins->src[0].reg.idx[0].offset;
+
+    if (!stream)
+        shader_addline(ins->ctx->buffer, "EndPrimitive();\n");
+    else
+        FIXME("Unhandled primitive stream %u.\n", stream);
 }
 
 /* Process the WINED3DSIO_POW instruction in GLSL (dst = |src0|^src1)
@@ -8600,7 +8605,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_CONTINUE                         */ shader_glsl_continue,
     /* WINED3DSIH_CRS                              */ shader_glsl_cross,
     /* WINED3DSIH_CUT                              */ shader_glsl_cut,
-    /* WINED3DSIH_CUT_STREAM                       */ NULL,
+    /* WINED3DSIH_CUT_STREAM                       */ shader_glsl_cut,
     /* WINED3DSIH_DCL                              */ shader_glsl_nop,
     /* WINED3DSIH_DCL_CONSTANT_BUFFER              */ shader_glsl_nop,
     /* WINED3DSIH_DCL_GLOBAL_FLAGS                 */ shader_glsl_nop,




More information about the wine-cvs mailing list