wined3d: Recognize SM4 sample_c_lz opcode.
authorJózef Kucia <jkucia@codeweavers.com>
Wed, 27 Jan 2016 22:43:45 +0000 (23:43 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 28 Jan 2016 15:42:25 +0000 (00:42 +0900)
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/wined3d/arb_program_shader.c
dlls/wined3d/glsl_shader.c
dlls/wined3d/shader.c
dlls/wined3d/shader_sm4.c
dlls/wined3d/wined3d_private.h

index 3674cfa4e572ae57fe14d75afa37f7bf1642b7cf..6c1e048f2505bf637c230c4e4ea03ad60d955d16 100644 (file)
@@ -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,
index 3bcd6aa0beb465e6f40e2540332dd2c2611fe954..23680eabfac80a53b4dfeaab3acd41cd04096c80 100644 (file)
@@ -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,
index 53f90af9a8d2665abc1d60faa782243c3b2e2660..7df4d1deaec41a985e2b30e85190654055be3122 100644 (file)
@@ -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)
             {
index bad656777bb061d8ccd5799715337caecbb4fd14..dde341b6ca1318c02e8c43b18a4f209213ec7b80 100644 (file)
@@ -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"},
index 78a49dd1311e167031abc754a116d82e05a6f370..461a1fec1a57bc2f2452607bc5b193abcbd0750e 100644 (file)
@@ -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,