=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Recognize SM4 sample_c_lz opcode.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 28 10:06:46 CST 2016


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Jan 27 23:43:45 2016 +0100

wined3d: Recognize SM4 sample_c_lz opcode.

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

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 3674cfa..6c1e048 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5304,6 +5304,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_ROUND_Z               */ NULL,
     /* WINED3DSIH_RSQ                   */ shader_hw_scalar_op,
     /* WINED3DSIH_SAMPLE                */ NULL,
+    /* WINED3DSIH_SAMPLE_C_LZ           */ NULL,
     /* WINED3DSIH_SAMPLE_GRAD           */ NULL,
     /* WINED3DSIH_SAMPLE_LOD            */ NULL,
     /* WINED3DSIH_SETP                  */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 3bcd6aa..23680ea 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8080,6 +8080,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_ROUND_Z               */ shader_glsl_map2gl,
     /* WINED3DSIH_RSQ                   */ shader_glsl_scalar_op,
     /* WINED3DSIH_SAMPLE                */ shader_glsl_sample,
+    /* WINED3DSIH_SAMPLE_C_LZ           */ NULL,
     /* WINED3DSIH_SAMPLE_GRAD           */ NULL,
     /* WINED3DSIH_SAMPLE_LOD            */ shader_glsl_sample_lod,
     /* WINED3DSIH_SETP                  */ NULL,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 53f90af..7df4d1d 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -132,6 +132,7 @@ static const char * const shader_opcode_names[] =
     /* WINED3DSIH_ROUND_Z               */ "round_z",
     /* WINED3DSIH_RSQ                   */ "rsq",
     /* WINED3DSIH_SAMPLE                */ "sample",
+    /* WINED3DSIH_SAMPLE_C_LZ           */ "sample_c_lz",
     /* WINED3DSIH_SAMPLE_GRAD           */ "sample_d",
     /* WINED3DSIH_SAMPLE_LOD            */ "sample_l",
     /* WINED3DSIH_SETP                  */ "setp",
@@ -1072,6 +1073,7 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
                 --cur_loop_depth;
             }
             else if (ins.handler_idx == WINED3DSIH_SAMPLE
+                    || ins.handler_idx == WINED3DSIH_SAMPLE_C_LZ
                     || ins.handler_idx == WINED3DSIH_SAMPLE_GRAD
                     || ins.handler_idx == WINED3DSIH_SAMPLE_LOD)
             {
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index bad6567..dde341b 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -134,6 +134,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM4_OP_ROUND_Z              = 0x43,
     WINED3D_SM4_OP_RSQ                  = 0x44,
     WINED3D_SM4_OP_SAMPLE               = 0x45,
+    WINED3D_SM4_OP_SAMPLE_C_LZ          = 0x47,
     WINED3D_SM4_OP_SAMPLE_LOD           = 0x48,
     WINED3D_SM4_OP_SAMPLE_GRAD          = 0x49,
     WINED3D_SM4_OP_SQRT                 = 0x4b,
@@ -318,6 +319,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
     {WINED3D_SM4_OP_ROUND_Z,                WINED3DSIH_ROUND_Z,             "F",    "F"},
     {WINED3D_SM4_OP_RSQ,                    WINED3DSIH_RSQ,                 "F",    "F"},
     {WINED3D_SM4_OP_SAMPLE,                 WINED3DSIH_SAMPLE,              "U",    "FRS"},
+    {WINED3D_SM4_OP_SAMPLE_C_LZ,            WINED3DSIH_SAMPLE_C_LZ,         "F",    "FRSF"},
     {WINED3D_SM4_OP_SAMPLE_LOD,             WINED3DSIH_SAMPLE_LOD,          "U",    "FRSF"},
     {WINED3D_SM4_OP_SAMPLE_GRAD,            WINED3DSIH_SAMPLE_GRAD,         "U",    "FRSFF"},
     {WINED3D_SM4_OP_SQRT,                   WINED3DSIH_SQRT,                "F",    "F"},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 78a49dd..461a1fe 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -560,6 +560,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_ROUND_Z,
     WINED3DSIH_RSQ,
     WINED3DSIH_SAMPLE,
+    WINED3DSIH_SAMPLE_C_LZ,
     WINED3DSIH_SAMPLE_GRAD,
     WINED3DSIH_SAMPLE_LOD,
     WINED3DSIH_SETP,




More information about the wine-cvs mailing list