wined3d: Recognize SM4 _sat instruction modifier.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c6223c2960
commit
ee85c03265
|
@ -30,7 +30,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
|
|||
#define WINED3D_SM4_INSTRUCTION_LENGTH_MASK (0x1fu << WINED3D_SM4_INSTRUCTION_LENGTH_SHIFT)
|
||||
|
||||
#define WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT 11
|
||||
#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK (0x3u << WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT)
|
||||
#define WINED3D_SM4_INSTRUCTION_FLAGS_MASK (0x7u << WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT)
|
||||
|
||||
#define WINED3D_SM4_RESOURCE_TYPE_SHIFT 11
|
||||
#define WINED3D_SM4_RESOURCE_TYPE_MASK (0xfu << WINED3D_SM4_RESOURCE_TYPE_SHIFT)
|
||||
|
@ -75,6 +75,8 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
|
|||
#define WINED3D_SM4_ADDRESSING_RELATIVE 0x2
|
||||
#define WINED3D_SM4_ADDRESSING_OFFSET 0x1
|
||||
|
||||
#define WINED3D_SM4_INSTRUCTION_FLAG_SATURATE 0x4
|
||||
|
||||
enum wined3d_sm4_opcode
|
||||
{
|
||||
WINED3D_SM4_OP_ADD = 0x00,
|
||||
|
@ -900,8 +902,16 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
}
|
||||
else
|
||||
{
|
||||
enum wined3d_shader_dst_modifier instruction_dst_modifier = WINED3DSPDM_NONE;
|
||||
|
||||
ins->flags = (opcode_token & WINED3D_SM4_INSTRUCTION_FLAGS_MASK) >> WINED3D_SM4_INSTRUCTION_FLAGS_SHIFT;
|
||||
|
||||
if (ins->flags & WINED3D_SM4_INSTRUCTION_FLAG_SATURATE)
|
||||
{
|
||||
ins->flags &= ~WINED3D_SM4_INSTRUCTION_FLAG_SATURATE;
|
||||
instruction_dst_modifier = WINED3DSPDM_SATURATE;
|
||||
}
|
||||
|
||||
for (i = 0; i < ins->dst_count; ++i)
|
||||
{
|
||||
if (!(shader_sm4_read_dst_param(priv, &p, map_data_type(opcode_info->dst_info[i]), &priv->dst_param[i])))
|
||||
|
@ -909,6 +919,7 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
|
|||
ins->handler_idx = WINED3DSIH_TABLE_SIZE;
|
||||
return;
|
||||
}
|
||||
priv->dst_param[i].modifiers |= instruction_dst_modifier;
|
||||
}
|
||||
|
||||
for (i = 0; i < ins->src_count; ++i)
|
||||
|
|
Loading…
Reference in New Issue