Commit 956541c9 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Add support for umin/umax instructions.

parent 4700c17c
......@@ -415,6 +415,32 @@ static void pres_imax(float **args, unsigned int n, const struct preshader_instr
}
}
static void pres_umin(float **args, unsigned int n, const struct preshader_instr *instr)
{
unsigned int *arg1 = (unsigned int *)args[0], *arg2 = (unsigned int *)args[1];
float *retval = args[2];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
{
unsigned int v = min(arg1[instr->scalar ? 0 : i], arg2[i]);
retval[i] = *(float *)&v;
}
}
static void pres_umax(float **args, unsigned int n, const struct preshader_instr *instr)
{
unsigned int *arg1 = (unsigned int *)args[0], *arg2 = (unsigned int *)args[1];
float *retval = args[2];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
{
unsigned int v = max(arg1[instr->scalar ? 0 : i], arg2[i]);
retval[i] = *(float *)&v;
}
}
static void pres_movc(float **args, unsigned int n, const struct preshader_instr *instr)
{
float *arg1 = args[0], *arg2 = args[1], *arg3 = args[2];
......@@ -455,6 +481,8 @@ static const struct preshader_op_info preshader_ops[] =
{ 0x208, "div", pres_div },
{ 0x21a, "udiv", pres_udiv },
{ 0x21e, "imax", pres_imax },
{ 0x21f, "umin", pres_umin },
{ 0x220, "umax", pres_umax },
{ 0x301, "movc", pres_movc },
};
......
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