Commit e54d9afb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Recognize the SM4 ABS and NEG source modifiers.

parent 50f6fbad
......@@ -366,7 +366,29 @@ static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wine
if (token & WINED3D_SM4_REGISTER_MODIFIER)
{
DWORD modifier = *(*ptr)++;
FIXME("Skipping modifier 0x%08x.\n", modifier);
/* FIXME: This will probably break down at some point. The SM4
* modifiers look like flags, while wined3d currently has an enum
* with possible combinations, e.g. WINED3DSPSM_ABSNEG. */
switch (modifier)
{
case 0x41:
src_param->modifiers = WINED3DSPSM_NEG;
break;
case 0x81:
src_param->modifiers = WINED3DSPSM_ABS;
break;
default:
FIXME("Skipping modifier 0x%08x.\n", modifier);
src_param->modifiers = WINED3DSPSM_NONE;
break;
}
}
else
{
src_param->modifiers = WINED3DSPSM_NONE;
}
order = (token & WINED3D_SM4_REGISTER_ORDER_MASK) >> WINED3D_SM4_REGISTER_ORDER_SHIFT;
......@@ -409,7 +431,6 @@ static void shader_sm4_read_src_param(void *data, const DWORD **ptr, struct wine
src_param->swizzle = (token & WINED3D_SM4_SWIZZLE_MASK) >> WINED3D_SM4_SWIZZLE_SHIFT;
}
src_param->modifiers = 0;
src_param->reg.rel_addr = NULL;
map_register(priv, &src_param->reg);
......
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