From df557182be860eb3b323ff4b0233784a2300dfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 7 Jul 2016 12:22:34 +0200 Subject: [PATCH] wined3d: Implement SM5 emit_stream instruction for stream 0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/glsl_shader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c9c0773e563..9a2025ffd83 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4307,9 +4307,15 @@ static void shader_glsl_else(const struct wined3d_shader_instruction *ins) static void shader_glsl_emit(const struct wined3d_shader_instruction *ins) { + unsigned int stream = ins->handler_idx == WINED3DSIH_EMIT ? 0 : ins->src[0].reg.idx[0].offset; + shader_addline(ins->ctx->buffer, "setup_gs_output(gs_out);\n"); shader_glsl_fixup_position(ins->ctx->buffer); - shader_addline(ins->ctx->buffer, "EmitVertex();\n"); + + if (!stream) + shader_addline(ins->ctx->buffer, "EmitVertex();\n"); + else + FIXME("Unhandled primitive stream %u.\n", stream); } static void shader_glsl_break(const struct wined3d_shader_instruction *ins) @@ -8644,7 +8650,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DSY_FINE */ NULL, /* WINED3DSIH_ELSE */ shader_glsl_else, /* WINED3DSIH_EMIT */ shader_glsl_emit, - /* WINED3DSIH_EMIT_STREAM */ NULL, + /* WINED3DSIH_EMIT_STREAM */ shader_glsl_emit, /* WINED3DSIH_ENDIF */ shader_glsl_end, /* WINED3DSIH_ENDLOOP */ shader_glsl_end, /* WINED3DSIH_ENDREP */ shader_glsl_end,