/* WINED3DSIH_DCL_INPUT_PRIMITIVE */ "dcl_inputPrimitive",
/* WINED3DSIH_DCL_OUTPUT */ "dcl_output",
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */ "dcl_outputTopology",
+ /* WINED3DSIH_DCL_SAMPLER */ "dcl_sampler",
/* WINED3DSIH_DCL_TEMPS */ "dcl_temps",
/* WINED3DSIH_DCL_VERTICES_OUT */ "dcl_maxOutputVertexCount",
/* WINED3DSIH_DEF */ "def",
TRACE("%s ", shader_opcode_names[ins.handler_idx]);
shader_dump_primitive_type(ins.declaration.primitive_type);
}
+ else if (ins.handler_idx == WINED3DSIH_DCL_SAMPLER)
+ {
+ TRACE("%s ", shader_opcode_names[ins.handler_idx]);
+ shader_dump_dst_param(&ins.declaration.dst, &shader_version);
+ if (ins.flags == WINED3DSI_SAMPLER_COMPARISON_MODE)
+ TRACE(", comparisonMode");
+ }
else if (ins.handler_idx == WINED3DSIH_DCL_TEMPS
|| ins.handler_idx == WINED3DSIH_DCL_VERTICES_OUT)
{
#define WINED3D_SM4_INDEX_TYPE_SHIFT 11
#define WINED3D_SM4_INDEX_TYPE_MASK (0x1u << WINED3D_SM4_INDEX_TYPE_SHIFT)
+#define WINED3D_SM4_SAMPLER_MODE_SHIFT 11
+#define WINED3D_SM4_SAMPLER_MODE_MASK (0xfu << WINED3D_SM4_SAMPLER_MODE_SHIFT)
+
#define WINED3D_SM4_SHADER_DATA_TYPE_SHIFT 11
#define WINED3D_SM4_SHADER_DATA_TYPE_MASK (0xfu << WINED3D_SM4_SHADER_DATA_TYPE_SHIFT)
WINED3D_SM4_OP_XOR = 0x57,
WINED3D_SM4_OP_DCL_RESOURCE = 0x58,
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER = 0x59,
+ WINED3D_SM4_OP_DCL_SAMPLER = 0x5a,
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY = 0x5c,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE = 0x5d,
WINED3D_SM4_OP_DCL_VERTICES_OUT = 0x5e,
WINED3D_SM4_DATA_FLOAT = 0x5,
};
+enum wined3d_sm4_sampler_mode
+{
+ WINED3D_SM4_SAMPLER_DEFAULT = 0x0,
+ WINED3D_SM4_SAMPLER_COMPARISON = 0x1,
+};
+
enum wined3d_sm4_shader_data_type
{
WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER = 0x3,
{WINED3D_SM4_OP_XOR, WINED3DSIH_XOR, "U", "UU"},
{WINED3D_SM4_OP_DCL_RESOURCE, WINED3DSIH_DCL, "R", ""},
{WINED3D_SM4_OP_DCL_CONSTANT_BUFFER, WINED3DSIH_DCL_CONSTANT_BUFFER, "", ""},
+ {WINED3D_SM4_OP_DCL_SAMPLER, WINED3DSIH_DCL_SAMPLER, "", ""},
{WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY, WINED3DSIH_DCL_OUTPUT_TOPOLOGY, "", ""},
{WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE, WINED3DSIH_DCL_INPUT_PRIMITIVE, "", ""},
{WINED3D_SM4_OP_DCL_VERTICES_OUT, WINED3DSIH_DCL_VERTICES_OUT, "", ""},
if (opcode_token & WINED3D_SM4_INDEX_TYPE_MASK)
ins->flags |= WINED3DSI_INDEXED_DYNAMIC;
}
+ else if (opcode == WINED3D_SM4_OP_DCL_SAMPLER)
+ {
+ ins->flags = (opcode_token & WINED3D_SM4_SAMPLER_MODE_MASK) >> WINED3D_SM4_SAMPLER_MODE_SHIFT;
+ if (ins->flags & ~WINED3D_SM4_SAMPLER_COMPARISON)
+ FIXME("Unhandled sampler mode %#x.\n", ins->flags);
+ shader_sm4_read_dst_param(priv, &p, WINED3D_DATA_SAMPLER, &ins->declaration.dst);
+ }
else if (opcode == WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY)
{
enum wined3d_sm4_output_primitive_type primitive_type;