Commit 03e17a35 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Add support for 'rsq' instruction.

parent f72bb1f6
......@@ -243,6 +243,15 @@ static void pres_frc(float **args, unsigned int n, const struct preshader_instr
retval[i] = args[0][i] - floor(args[0][i]);
}
static void pres_rsq(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] = 1.0f / sqrtf(args[0][i]);
}
static void pres_sin(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *retval = args[1];
......@@ -684,6 +693,7 @@ static const struct preshader_op_info preshader_ops[] =
{ 0x101, "neg", pres_neg },
{ 0x103, "rcp", pres_rcp },
{ 0x104, "frc", pres_frc },
{ 0x107, "rsq", pres_rsq },
{ 0x108, "sin", pres_sin },
{ 0x109, "cos", pres_cos },
{ 0x10a, "asin", pres_asin },
......
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