From 21b5fba696e75430dc35c10c72cb25929e4ffb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 27 Jan 2016 23:43:46 +0100 Subject: [PATCH] wined3d: Recognize SM4 sample_b 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 | 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 6c1e048f250..ea542b9cc73 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_B */ NULL, /* WINED3DSIH_SAMPLE_C_LZ */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL, /* WINED3DSIH_SAMPLE_LOD */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 23680eabfac..5e983f94423 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_B */ NULL, /* WINED3DSIH_SAMPLE_C_LZ */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL, /* WINED3DSIH_SAMPLE_LOD */ shader_glsl_sample_lod, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 7df4d1deaec..4c42d2fee44 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_B */ "sample_b", /* WINED3DSIH_SAMPLE_C_LZ */ "sample_c_lz", /* WINED3DSIH_SAMPLE_GRAD */ "sample_d", /* WINED3DSIH_SAMPLE_LOD */ "sample_l", @@ -1073,6 +1074,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_B || 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 dde341b6ca1..11de59cc2f9 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -137,6 +137,7 @@ enum wined3d_sm4_opcode WINED3D_SM4_OP_SAMPLE_C_LZ = 0x47, WINED3D_SM4_OP_SAMPLE_LOD = 0x48, WINED3D_SM4_OP_SAMPLE_GRAD = 0x49, + WINED3D_SM4_OP_SAMPLE_B = 0x4a, WINED3D_SM4_OP_SQRT = 0x4b, WINED3D_SM4_OP_SINCOS = 0x4d, WINED3D_SM4_OP_UDIV = 0x4e, @@ -322,6 +323,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {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_SAMPLE_B, WINED3DSIH_SAMPLE_B, "U", "FRSF"}, {WINED3D_SM4_OP_SQRT, WINED3DSIH_SQRT, "F", "F"}, {WINED3D_SM4_OP_SINCOS, WINED3DSIH_SINCOS, "FF", "F"}, {WINED3D_SM4_OP_UDIV, WINED3DSIH_UDIV, "UU", "UU"}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 461a1fec1a5..5f91dc41a7c 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_B, WINED3DSIH_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_GRAD, WINED3DSIH_SAMPLE_LOD,