[PATCH 1/5] wined3d: Recognize the SM4 sample_d opcode.

Henri Verbeet hverbeet at codeweavers.com
Thu Oct 14 06:03:58 CDT 2010


---
 dlls/wined3d/arb_program_shader.c |    1 +
 dlls/wined3d/glsl_shader.c        |    1 +
 dlls/wined3d/shader.c             |    1 +
 dlls/wined3d/shader_sm4.c         |    2 ++
 dlls/wined3d/wined3d_private.h    |    1 +
 5 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index a34b506..2f70a57 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5000,6 +5000,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
     /* WINED3DSIH_RET           */ shader_hw_ret,
     /* WINED3DSIH_RSQ           */ shader_hw_scalar_op,
     /* WINED3DSIH_SAMPLE        */ NULL,
+    /* WINED3DSIH_SAMPLE_GRAD   */ NULL,
     /* WINED3DSIH_SAMPLE_LOD    */ NULL,
     /* WINED3DSIH_SETP          */ NULL,
     /* WINED3DSIH_SGE           */ shader_hw_map2gl,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index facb686..fb7d02e 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -5058,6 +5058,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
     /* WINED3DSIH_RET           */ shader_glsl_ret,
     /* WINED3DSIH_RSQ           */ shader_glsl_rsq,
     /* WINED3DSIH_SAMPLE        */ NULL,
+    /* WINED3DSIH_SAMPLE_GRAD   */ NULL,
     /* WINED3DSIH_SAMPLE_LOD    */ NULL,
     /* WINED3DSIH_SETP          */ NULL,
     /* WINED3DSIH_SGE           */ shader_glsl_compare,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 2e57e9f..e3451a5 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -104,6 +104,7 @@ static const char * const shader_opcode_names[] =
     /* WINED3DSIH_RET           */ "ret",
     /* WINED3DSIH_RSQ           */ "rsq",
     /* WINED3DSIH_SAMPLE        */ "sample",
+    /* WINED3DSIH_SAMPLE_GRAD   */ "sample_d",
     /* WINED3DSIH_SAMPLE_LOD    */ "sample_l",
     /* WINED3DSIH_SETP          */ "setp",
     /* WINED3DSIH_SGE           */ "sge",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 47cece3..ef7af43 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -86,6 +86,7 @@ enum wined3d_sm4_opcode
     WINED3D_SM4_OP_RSQ          = 0x44,
     WINED3D_SM4_OP_SAMPLE       = 0x45,
     WINED3D_SM4_OP_SAMPLE_LOD   = 0x48,
+    WINED3D_SM4_OP_SAMPLE_GRAD  = 0x49,
     WINED3D_SM4_OP_SINCOS       = 0x4d,
     WINED3D_SM4_OP_UTOF         = 0x56,
 };
@@ -165,6 +166,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
     {WINED3D_SM4_OP_RSQ,        WINED3DSIH_RSQ,         1,  1},
     {WINED3D_SM4_OP_SAMPLE,     WINED3DSIH_SAMPLE,      1,  3},
     {WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD,  1,  4},
+    {WINED3D_SM4_OP_SAMPLE_GRAD,WINED3DSIH_SAMPLE_GRAD, 1,  5},
     {WINED3D_SM4_OP_SINCOS,     WINED3DSIH_SINCOS,      2,  1},
     {WINED3D_SM4_OP_UTOF,       WINED3DSIH_UTOF,        1,  1},
 };
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c648bd9..fc1fd08 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -473,6 +473,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
     WINED3DSIH_RET,
     WINED3DSIH_RSQ,
     WINED3DSIH_SAMPLE,
+    WINED3DSIH_SAMPLE_GRAD,
     WINED3DSIH_SAMPLE_LOD,
     WINED3DSIH_SETP,
     WINED3DSIH_SGE,
-- 
1.7.2.2




More information about the wine-patches mailing list