Commit fdc0f377 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Add support for 'buge'/'bult' instructions.

parent 35a6c314
......@@ -467,6 +467,34 @@ static void pres_bine(float **args, unsigned int n, const struct preshader_instr
}
}
static void pres_buge(float **args, unsigned int n, const struct preshader_instr *instr)
{
unsigned int *arg1 = (unsigned int *)args[0];
unsigned int *arg2 = (unsigned int *)args[1];
float *retval = args[2];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
{
unsigned int v = arg1[instr->scalar ? 0 : i] >= arg2[i] ? ~0u : 0;
retval[i] = *(float *)&v;
}
}
static void pres_bult(float **args, unsigned int n, const struct preshader_instr *instr)
{
unsigned int *arg1 = (unsigned int *)args[0];
unsigned int *arg2 = (unsigned int *)args[1];
float *retval = args[2];
unsigned int i;
for (i = 0; i < instr->comp_count; ++i)
{
unsigned int v = arg1[instr->scalar ? 0 : i] < arg2[i] ? ~0u : 0;
retval[i] = *(float *)&v;
}
}
static void pres_udiv(float **args, unsigned int n, const struct preshader_instr *instr)
{
unsigned int *arg1 = (unsigned int *)args[0];
......@@ -604,6 +632,8 @@ static const struct preshader_op_info preshader_ops[] =
{ 0x211, "bige", pres_bige },
{ 0x212, "bieq", pres_bieq },
{ 0x213, "bine", pres_bine },
{ 0x214, "buge", pres_buge },
{ 0x215, "bult", pres_bult },
{ 0x216, "iadd", pres_iadd },
{ 0x21a, "udiv", pres_udiv },
{ 0x21d, "imin", pres_imin },
......
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