[PATCH 5/6] wined3d: Implement SM4 round_ne instruction.
Józef Kucia
jkucia at codeweavers.com
Fri May 13 06:55:30 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/arb_program_shader.c | 1 +
dlls/wined3d/glsl_shader.c | 2 ++
dlls/wined3d/shader.c | 1 +
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 266f5f5..3c59dd1 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5352,6 +5352,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_REP */ shader_hw_rep,
/* WINED3DSIH_RESINFO */ NULL,
/* WINED3DSIH_RET */ shader_hw_ret,
+ /* WINED3DSIH_ROUND_NE */ NULL,
/* WINED3DSIH_ROUND_NI */ NULL,
/* WINED3DSIH_ROUND_PI */ NULL,
/* WINED3DSIH_ROUND_Z */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index f8c4a99..9236bf6 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3329,6 +3329,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
case WINED3DSIH_IMIN: instruction = "min"; break;
case WINED3DSIH_MAX: instruction = "max"; break;
case WINED3DSIH_MIN: instruction = "min"; break;
+ case WINED3DSIH_ROUND_NE: instruction = "roundEven"; break;
case WINED3DSIH_ROUND_NI: instruction = "floor"; break;
case WINED3DSIH_ROUND_PI: instruction = "ceil"; break;
case WINED3DSIH_ROUND_Z: instruction = "trunc"; break;
@@ -8255,6 +8256,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_REP */ shader_glsl_rep,
/* WINED3DSIH_RESINFO */ shader_glsl_resinfo,
/* WINED3DSIH_RET */ shader_glsl_ret,
+ /* WINED3DSIH_ROUND_NE */ shader_glsl_map2gl,
/* WINED3DSIH_ROUND_NI */ shader_glsl_map2gl,
/* WINED3DSIH_ROUND_PI */ shader_glsl_map2gl,
/* WINED3DSIH_ROUND_Z */ shader_glsl_map2gl,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 8f8b727..f8c335c 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -157,6 +157,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_REP */ "rep",
/* WINED3DSIH_RESINFO */ "resinfo",
/* WINED3DSIH_RET */ "ret",
+ /* WINED3DSIH_ROUND_NE */ "round_ne",
/* WINED3DSIH_ROUND_NI */ "round_ni",
/* WINED3DSIH_ROUND_PI */ "round_pi",
/* WINED3DSIH_ROUND_Z */ "round_z",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 35e6659..b922012 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -157,6 +157,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_OR = 0x3c,
WINED3D_SM4_OP_RESINFO = 0x3d,
WINED3D_SM4_OP_RET = 0x3e,
+ WINED3D_SM4_OP_ROUND_NE = 0x40,
WINED3D_SM4_OP_ROUND_NI = 0x41,
WINED3D_SM4_OP_ROUND_PI = 0x42,
WINED3D_SM4_OP_ROUND_Z = 0x43,
@@ -656,6 +657,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM4_OP_OR, WINED3DSIH_OR, "u", "uu"},
{WINED3D_SM4_OP_RESINFO, WINED3DSIH_RESINFO, "f", "iR"},
{WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""},
+ {WINED3D_SM4_OP_ROUND_NE, WINED3DSIH_ROUND_NE, "f", "f"},
{WINED3D_SM4_OP_ROUND_NI, WINED3DSIH_ROUND_NI, "f", "f"},
{WINED3D_SM4_OP_ROUND_PI, WINED3DSIH_ROUND_PI, "f", "f"},
{WINED3D_SM4_OP_ROUND_Z, WINED3DSIH_ROUND_Z, "f", "f"},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 274f620..59c5800 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -647,6 +647,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_REP,
WINED3DSIH_RESINFO,
WINED3DSIH_RET,
+ WINED3DSIH_ROUND_NE,
WINED3DSIH_ROUND_NI,
WINED3DSIH_ROUND_PI,
WINED3DSIH_ROUND_Z,
--
2.7.3
More information about the wine-patches
mailing list