=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Implement SM4 continue instruction.

Alexandre Julliard julliard at winehq.org
Tue Jul 5 11:07:51 CDT 2016


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Jul  5 11:46:53 2016 +0200

wined3d: Implement SM4 continue instruction.

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/arb_program_shader.c | 1 +
 dlls/wined3d/glsl_shader.c        | 6 ++++++
 dlls/wined3d/shader.c             | 1 +
 dlls/wined3d/shader_sm4.c         | 2 ++
 dlls/wined3d/wined3d_private.h    | 1 +
 5 files changed, 11 insertions(+)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 6b53eba..deae1cc 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5224,6 +5224,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_CASE                             */ NULL,
     /* WINED3DSIH_CMP                              */ pshader_hw_cmp,
     /* WINED3DSIH_CND                              */ pshader_hw_cnd,
+    /* WINED3DSIH_CONTINUE                         */ NULL,
     /* WINED3DSIH_CRS                              */ shader_hw_map2gl,
     /* WINED3DSIH_CUT                              */ NULL,
     /* WINED3DSIH_CUT_STREAM                       */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index ced7561..e06f47b 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4330,6 +4330,11 @@ static void shader_glsl_breakp(const struct wined3d_shader_instruction *ins)
     shader_addline(ins->ctx->buffer, "if (%s(%s)) break;\n", condition, src_param.param_str);
 }
 
+static void shader_glsl_continue(const struct wined3d_shader_instruction *ins)
+{
+    shader_addline(ins->ctx->buffer, "continue;\n");
+}
+
 static void shader_glsl_label(const struct wined3d_shader_instruction *ins)
 {
     shader_addline(ins->ctx->buffer, "}\n");
@@ -8576,6 +8581,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_CASE                             */ shader_glsl_case,
     /* WINED3DSIH_CMP                              */ shader_glsl_conditional_move,
     /* WINED3DSIH_CND                              */ shader_glsl_cnd,
+    /* WINED3DSIH_CONTINUE                         */ shader_glsl_continue,
     /* WINED3DSIH_CRS                              */ shader_glsl_cross,
     /* WINED3DSIH_CUT                              */ shader_glsl_cut,
     /* WINED3DSIH_CUT_STREAM                       */ NULL,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index cd52ad6..ce301cc 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -54,6 +54,7 @@ static const char * const shader_opcode_names[] =
     /* WINED3DSIH_CASE                             */ "case",
     /* WINED3DSIH_CMP                              */ "cmp",
     /* WINED3DSIH_CND                              */ "cnd",
+    /* WINED3DSIH_CONTINUE                         */ "continue",
     /* WINED3DSIH_CRS                              */ "crs",
     /* WINED3DSIH_CUT                              */ "cut",
     /* WINED3DSIH_CUT_STREAM                       */ "cut_stream",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 7f15a82..abfcf4f 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -112,6 +112,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM4_OP_BREAK                            = 0x02,
     WINED3D_SM4_OP_BREAKC                           = 0x03,
     WINED3D_SM4_OP_CASE                             = 0x06,
+    WINED3D_SM4_OP_CONTINUE                         = 0x07,
     WINED3D_SM4_OP_CUT                              = 0x09,
     WINED3D_SM4_OP_DEFAULT                          = 0x0a,
     WINED3D_SM4_OP_DERIV_RTX                        = 0x0b,
@@ -687,6 +688,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
     {WINED3D_SM4_OP_BREAKC,                           WINED3DSIH_BREAKP,                           "",     "u",
             shader_sm4_read_conditional_op},
     {WINED3D_SM4_OP_CASE,                             WINED3DSIH_CASE,                             "",     "u"},
+    {WINED3D_SM4_OP_CONTINUE,                         WINED3DSIH_CONTINUE,                         "",     ""},
     {WINED3D_SM4_OP_CUT,                              WINED3DSIH_CUT,                              "",     ""},
     {WINED3D_SM4_OP_DEFAULT,                          WINED3DSIH_DEFAULT,                          "",     ""},
     {WINED3D_SM4_OP_DERIV_RTX,                        WINED3DSIH_DSX,                              "f",    "f"},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 1e0bb2f..e8dc3fd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -570,6 +570,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_CASE,
     WINED3DSIH_CMP,
     WINED3DSIH_CND,
+    WINED3DSIH_CONTINUE,
     WINED3DSIH_CRS,
     WINED3DSIH_CUT,
     WINED3DSIH_CUT_STREAM,




More information about the wine-cvs mailing list