Commit 347ed9a8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

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

parent 03e17a35
......@@ -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_log(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] = (args[0][i] == 0.0f ? 0.0f : log2f(fabsf(args[0][i])));
}
static void pres_rsq(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *retval = args[1];
......@@ -693,6 +702,7 @@ static const struct preshader_op_info preshader_ops[] =
{ 0x101, "neg", pres_neg },
{ 0x103, "rcp", pres_rcp },
{ 0x104, "frc", pres_frc },
{ 0x106, "log", pres_log },
{ 0x107, "rsq", pres_rsq },
{ 0x108, "sin", pres_sin },
{ 0x109, "cos", pres_cos },
......
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