From dd4c1ccd9e7a046fe3e3f385d7d7fb5638190489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 27 Jan 2016 23:43:42 +0100 Subject: [PATCH] wined3d: Recognize SM4 round_z opcode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index c65a088537c..3674cfa4e57 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5301,6 +5301,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_RET */ shader_hw_ret, /* WINED3DSIH_ROUND_NI */ NULL, /* WINED3DSIH_ROUND_PI */ NULL, + /* WINED3DSIH_ROUND_Z */ NULL, /* WINED3DSIH_RSQ */ shader_hw_scalar_op, /* WINED3DSIH_SAMPLE */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index d27f47b3e16..697f5e93388 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8075,6 +8075,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_RET */ shader_glsl_ret, /* WINED3DSIH_ROUND_NI */ shader_glsl_map2gl, /* WINED3DSIH_ROUND_PI */ NULL, + /* WINED3DSIH_ROUND_Z */ NULL, /* WINED3DSIH_RSQ */ shader_glsl_scalar_op, /* WINED3DSIH_SAMPLE */ shader_glsl_sample, /* WINED3DSIH_SAMPLE_GRAD */ NULL, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 065bf4afc0d..53f90af9a8d 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -129,6 +129,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_RET */ "ret", /* WINED3DSIH_ROUND_NI */ "round_ni", /* WINED3DSIH_ROUND_PI */ "round_pi", + /* WINED3DSIH_ROUND_Z */ "round_z", /* WINED3DSIH_RSQ */ "rsq", /* WINED3DSIH_SAMPLE */ "sample", /* WINED3DSIH_SAMPLE_GRAD */ "sample_d", diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 63aca2b53a6..bad656777bb 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -131,6 +131,7 @@ enum wined3d_sm4_opcode WINED3D_SM4_OP_RET = 0x3e, WINED3D_SM4_OP_ROUND_NI = 0x41, WINED3D_SM4_OP_ROUND_PI = 0x42, + WINED3D_SM4_OP_ROUND_Z = 0x43, WINED3D_SM4_OP_RSQ = 0x44, WINED3D_SM4_OP_SAMPLE = 0x45, WINED3D_SM4_OP_SAMPLE_LOD = 0x48, @@ -314,6 +315,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {WINED3D_SM4_OP_RET, WINED3DSIH_RET, "", ""}, {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"}, {WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"}, {WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"}, {WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index bf471b9fce8..78a49dd1311 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -557,6 +557,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_RET, WINED3DSIH_ROUND_NI, WINED3DSIH_ROUND_PI, + WINED3DSIH_ROUND_Z, WINED3DSIH_RSQ, WINED3DSIH_SAMPLE, WINED3DSIH_SAMPLE_GRAD,