Commit 98b29119 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Get rid of the conditionals in shader_glsl_compare.

parent ed937c6a
......@@ -1563,17 +1563,17 @@ void shader_glsl_compare(SHADER_OPCODE_ARG* arg) {
shader_addline(arg->buffer, "vec%d(%s(%s, %s)));\n", mask_size, compare,
src0_param.param_str, src1_param.param_str);
} else {
const char *compare;
switch(arg->opcode->opcode) {
case WINED3DSIO_SLT: compare = "<"; break;
case WINED3DSIO_SGE: compare = ">="; break;
default: compare = "";
case WINED3DSIO_SLT:
shader_addline(arg->buffer, "step(%s, %s));\n", src0_param.param_str, src1_param.param_str);
break;
case WINED3DSIO_SGE:
shader_addline(arg->buffer, "step(%s, %s));\n", src1_param.param_str, src0_param.param_str);
break;
default:
FIXME("Can't handle opcode %s\n", arg->opcode->name);
}
shader_addline(arg->buffer, "(%s %s %s) ? 1.0 : 0.0);\n",
src0_param.param_str, compare, src1_param.param_str);
}
}
......
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