mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
wined3d: Add support for immediate constants to the GLSL backend.
This commit is contained in:
parent
96005c0fca
commit
69cbb57bfd
2 changed files with 28 additions and 0 deletions
|
@ -1220,6 +1220,25 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WINED3DSPR_IMMCONST:
|
||||||
|
switch (reg->immconst_type)
|
||||||
|
{
|
||||||
|
case WINED3D_IMMCONST_FLOAT:
|
||||||
|
sprintf(register_name, "%.8e", *(float *)reg->immconst_data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WINED3D_IMMCONST_FLOAT4:
|
||||||
|
sprintf(register_name, "vec4(%.8e, %.8e, %.8e, %.8e)",
|
||||||
|
*(float *)®->immconst_data[0], *(float *)®->immconst_data[1],
|
||||||
|
*(float *)®->immconst_data[2], *(float *)®->immconst_data[3]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
FIXME("Unhandled immconst type %#x\n", reg->immconst_type);
|
||||||
|
sprintf(register_name, "<unhandled_immconst_type %#x>", reg->immconst_type);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled register name Type(%d)\n", reg->type);
|
FIXME("Unhandled register name Type(%d)\n", reg->type);
|
||||||
sprintf(register_name, "unrecognized_register");
|
sprintf(register_name, "unrecognized_register");
|
||||||
|
|
|
@ -2621,6 +2621,15 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WINED3DSPR_IMMCONST:
|
||||||
|
switch(reg->immconst_type)
|
||||||
|
{
|
||||||
|
case WINED3D_IMMCONST_FLOAT:
|
||||||
|
return TRUE;
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue