Commit 9aa587af authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Implement SM4 default instruction.

parent 79298950
......@@ -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,
......
......@@ -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,
......
......@@ -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",
......
......@@ -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"},
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment