=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Implement SM4 default instruction.
Alexandre Julliard
julliard at winehq.org
Fri Jun 3 10:03:45 CDT 2016
Module: wine
Branch: master
Commit: 9aa587af9e2a3d64a1a37f97ace20ca4f878f2a8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9aa587af9e2a3d64a1a37f97ace20ca4f878f2a8
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Jun 3 11:33:05 2016 +0200
wined3d: Implement SM4 default instruction.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/arb_program_shader.c | 1 +
dlls/wined3d/glsl_shader.c | 6 ++++++
dlls/wined3d/shader.c | 1 +
dlls/wined3d/shader_sm4.c | 2 ++
dlls/wined3d/wined3d_private.h | 1 +
5 files changed, 11 insertions(+)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 7ecf193..c85c917 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -5249,6 +5249,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_hw_nop,
/* WINED3DSIH_DEF */ shader_hw_nop,
+ /* WINED3DSIH_DEFAULT */ NULL,
/* WINED3DSIH_DEFB */ shader_hw_nop,
/* WINED3DSIH_DEFI */ shader_hw_nop,
/* WINED3DSIH_DIV */ NULL,
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index cfd0cfd..97f7fa8 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -4244,6 +4244,11 @@ static void shader_glsl_case(const struct wined3d_shader_instruction *ins)
shader_addline(ins->ctx->buffer, "case %s:\n", src0_param.param_str);
}
+static void shader_glsl_default(const struct wined3d_shader_instruction *ins)
+{
+ shader_addline(ins->ctx->buffer, "default:\n");
+}
+
static void shader_glsl_if(const struct wined3d_shader_instruction *ins)
{
const char *condition = (ins->flags == WINED3D_SHADER_CONDITIONAL_OP_NZ) ? "bool" : "!bool";
@@ -8578,6 +8583,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_DCL_UAV_TYPED */ NULL,
/* WINED3DSIH_DCL_VERTICES_OUT */ shader_glsl_nop,
/* WINED3DSIH_DEF */ shader_glsl_nop,
+ /* WINED3DSIH_DEFAULT */ shader_glsl_default,
/* WINED3DSIH_DEFB */ shader_glsl_nop,
/* WINED3DSIH_DEFI */ shader_glsl_nop,
/* WINED3DSIH_DIV */ shader_glsl_binop,
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index bf67dbe..27242ae 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -81,6 +81,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_DCL_UAV_TYPED */ "dcl_uav_typed",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
/* WINED3DSIH_DEF */ "def",
+ /* WINED3DSIH_DEFAULT */ "default",
/* WINED3DSIH_DEFB */ "defb",
/* WINED3DSIH_DEFI */ "defi",
/* WINED3DSIH_DIV */ "div",
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 247f9b0..809f39c 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -113,6 +113,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_BREAKC = 0x03,
WINED3D_SM4_OP_CASE = 0x06,
WINED3D_SM4_OP_CUT = 0x09,
+ WINED3D_SM4_OP_DEFAULT = 0x0a,
WINED3D_SM4_OP_DERIV_RTX = 0x0b,
WINED3D_SM4_OP_DERIV_RTY = 0x0c,
WINED3D_SM4_OP_DISCARD = 0x0d,
@@ -626,6 +627,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
shader_sm4_read_conditional_op},
{WINED3D_SM4_OP_CASE, WINED3DSIH_CASE, "", "u"},
{WINED3D_SM4_OP_CUT, WINED3DSIH_CUT, "", ""},
+ {WINED3D_SM4_OP_DEFAULT, WINED3DSIH_DEFAULT, "", ""},
{WINED3D_SM4_OP_DERIV_RTX, WINED3DSIH_DSX, "f", "f"},
{WINED3D_SM4_OP_DERIV_RTY, WINED3DSIH_DSY, "f", "f"},
{WINED3D_SM4_OP_DISCARD, WINED3DSIH_TEXKILL, "", "u"},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e9d5a58..50548a1 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -588,6 +588,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_DCL_UAV_TYPED,
WINED3DSIH_DCL_VERTICES_OUT,
WINED3DSIH_DEF,
+ WINED3DSIH_DEFAULT,
WINED3DSIH_DEFB,
WINED3DSIH_DEFI,
WINED3DSIH_DIV,
More information about the wine-cvs
mailing list