Commit 30c33c2f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Add sin/cos instruction support for expressions.

parent 8dcadad5
......@@ -216,6 +216,24 @@ static void pres_neg(float **args, unsigned int n, const struct preshader_instr
retval[i] = -args[0][i];
}
static void pres_sin(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *retval = args[1];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
retval[i] = sin(args[0][i]);
}
static void pres_cos(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *retval = args[1];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
retval[i] = cos(args[0][i]);
}
static void pres_ftou(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *retval = args[1];
......@@ -274,6 +292,8 @@ struct preshader_op_info
static const struct preshader_op_info preshader_ops[] =
{
{ 0x101, "neg", pres_neg },
{ 0x108, "sin", pres_sin },
{ 0x109, "cos", pres_cos },
{ 0x133, "ftou", pres_ftou },
{ 0x200, "min", pres_min },
{ 0x201, "max", pres_max },
......
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