wined3d: Implement SM4 continuec opcode.

Sven Hesse drmccoy at drmccoy.de
Sun May 14 11:54:34 CDT 2017


Works just like breakc and retc.

Signed-off-by: Sven Hesse <drmccoy at drmccoy.de>
---
 dlls/wined3d/arb_program_shader.c | 1 +
 dlls/wined3d/glsl_shader.c        | 2 ++
 dlls/wined3d/shader.c             | 1 +
 dlls/wined3d/shader_sm4.c         | 3 +++
 dlls/wined3d/wined3d_private.h    | 1 +
 5 files changed, 8 insertions(+)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index b1cf6395be..aa17fb1126 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5045,6 +5045,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_CMP                              */ pshader_hw_cmp,
     /* WINED3DSIH_CND                              */ pshader_hw_cnd,
     /* WINED3DSIH_CONTINUE                         */ NULL,
+    /* WINED3DSIH_CONTINUEP                        */ NULL,
     /* WINED3DSIH_COUNTBITS                        */ NULL,
     /* WINED3DSIH_CRS                              */ shader_hw_map2gl,
     /* WINED3DSIH_CUT                              */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index e482926567..ee27d1026d 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4886,6 +4886,7 @@ static void shader_glsl_conditional_op(const struct wined3d_shader_instruction *
     switch (ins->handler_idx)
     {
         case WINED3DSIH_BREAKP: op = "break"; break;
+        case WINED3DSIH_CONTINUEP: op = "continue"; break;
         case WINED3DSIH_RETP: op = "return"; break;
         default:
             ERR("Unhandled opcode %#x.\n", ins->handler_idx);
@@ -10003,6 +10004,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_CMP                              */ shader_glsl_conditional_move,
     /* WINED3DSIH_CND                              */ shader_glsl_cnd,
     /* WINED3DSIH_CONTINUE                         */ shader_glsl_continue,
+    /* WINED3DSIH_CONTINUEP                        */ shader_glsl_conditional_op,
     /* WINED3DSIH_COUNTBITS                        */ shader_glsl_map2gl,
     /* WINED3DSIH_CRS                              */ shader_glsl_cross,
     /* WINED3DSIH_CUT                              */ shader_glsl_cut,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 5717767419..4b9aeccbe6 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -65,6 +65,7 @@ static const char * const shader_opcode_names[] =
     /* WINED3DSIH_CMP                              */ "cmp",
     /* WINED3DSIH_CND                              */ "cnd",
     /* WINED3DSIH_CONTINUE                         */ "continue",
+    /* WINED3DSIH_CONTINUEP                        */ "continuec",
     /* WINED3DSIH_COUNTBITS                        */ "countbits",
     /* WINED3DSIH_CRS                              */ "crs",
     /* WINED3DSIH_CUT                              */ "cut",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 601a639cbd..37624f7c59 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -122,6 +122,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM4_OP_BREAKC                           = 0x03,
     WINED3D_SM4_OP_CASE                             = 0x06,
     WINED3D_SM4_OP_CONTINUE                         = 0x07,
+    WINED3D_SM4_OP_CONTINUEC                        = 0x08,
     WINED3D_SM4_OP_CUT                              = 0x09,
     WINED3D_SM4_OP_DEFAULT                          = 0x0a,
     WINED3D_SM4_OP_DERIV_RTX                        = 0x0b,
@@ -840,6 +841,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
             shader_sm4_read_conditional_op},
     {WINED3D_SM4_OP_CASE,                             WINED3DSIH_CASE,                             "",     "u"},
     {WINED3D_SM4_OP_CONTINUE,                         WINED3DSIH_CONTINUE,                         "",     ""},
+    {WINED3D_SM4_OP_CONTINUEC,                        WINED3DSIH_CONTINUEP,                        "",     "u",
+            shader_sm4_read_conditional_op},
     {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 38e5a4597a..3766648752 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -690,6 +690,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_CMP,
     WINED3DSIH_CND,
     WINED3DSIH_CONTINUE,
+    WINED3DSIH_CONTINUEP,
     WINED3DSIH_COUNTBITS,
     WINED3DSIH_CRS,
     WINED3DSIH_CUT,
-- 
2.11.0




More information about the wine-patches mailing list