[PATCH 4/7] wined3d: Recognize SM5 eval_sample_index instruction.
Józef Kucia
jkucia at codeweavers.com
Mon Dec 11 03:25:27 CST 2017
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
Fixes a crash in Fallout 4.
---
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 6941a2bb3c89..11141b6f6403 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5089,6 +5089,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DSY */ shader_hw_dsy,
/* WINED3DSIH_DSY_COARSE */ NULL,
/* WINED3DSIH_DSY_FINE */ NULL,
+ /* WINED3DSIH_EVAL_SAMPLE_INDEX */ NULL,
/* WINED3DSIH_ELSE */ shader_hw_else,
/* WINED3DSIH_EMIT */ NULL,
/* WINED3DSIH_EMIT_STREAM */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 32a75bf56288..e18a99f066a0 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -11080,6 +11080,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DSY */ shader_glsl_map2gl,
/* WINED3DSIH_DSY_COARSE */ shader_glsl_map2gl,
/* WINED3DSIH_DSY_FINE */ shader_glsl_map2gl,
+ /* WINED3DSIH_EVAL_SAMPLE_INDEX */ NULL,
/* WINED3DSIH_ELSE */ shader_glsl_else,
/* WINED3DSIH_EMIT */ shader_glsl_emit,
/* WINED3DSIH_EMIT_STREAM */ shader_glsl_emit,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 04ced904481c..e59b9e5bfbe1 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -125,6 +125,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DSY */ "dsy",
/* WINED3DSIH_DSY_COARSE */ "deriv_rty_coarse",
/* WINED3DSIH_DSY_FINE */ "deriv_rty_fine",
+ /* WINED3DSIH_EVAL_SAMPLE_INDEX */ "eval_sample_index",
/* WINED3DSIH_ELSE */ "else",
/* WINED3DSIH_EMIT */ "emit",
/* WINED3DSIH_EMIT_STREAM */ "emit_stream",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 2665a67b80a6..7c3e8b8aa53c 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -297,6 +297,7 @@ enum wined3d_sm4_opcode
WINED3D_SM5_OP_IMM_ATOMIC_UMAX = 0xbc,
WINED3D_SM5_OP_IMM_ATOMIC_UMIN = 0xbd,
WINED3D_SM5_OP_SYNC = 0xbe,
+ WINED3D_SM5_OP_EVAL_SAMPLE_INDEX = 0xcc,
WINED3D_SM5_OP_DCL_GS_INSTANCES = 0xce,
};
@@ -1107,6 +1108,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM5_OP_IMM_ATOMIC_UMIN, WINED3DSIH_IMM_ATOMIC_UMIN, "uU", "iu"},
{WINED3D_SM5_OP_SYNC, WINED3DSIH_SYNC, "", "",
shader_sm5_read_sync},
+ {WINED3D_SM5_OP_EVAL_SAMPLE_INDEX, WINED3DSIH_EVAL_SAMPLE_INDEX, "f", "fi"},
{WINED3D_SM5_OP_DCL_GS_INSTANCES, WINED3DSIH_DCL_GS_INSTANCES, "", "",
shader_sm4_read_declaration_count},
};
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index ab24f12a8a40..20f53aa9e961 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -761,6 +761,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DSY,
WINED3DSIH_DSY_COARSE,
WINED3DSIH_DSY_FINE,
+ WINED3DSIH_EVAL_SAMPLE_INDEX,
WINED3DSIH_ELSE,
WINED3DSIH_EMIT,
WINED3DSIH_EMIT_STREAM,
--
2.13.6
More information about the wine-devel
mailing list