extern int intel_translate_shadow_compare_func(GLenum func);
extern int intel_translate_compare_func(GLenum func);
extern int intel_translate_stencil_op(GLenum op);
-extern int intel_translate_logic_op(GLenum opcode);
/* brw_sync.c */
void brw_init_syncobj_functions(struct dd_function_table *functions);
_mesa_enum_to_string(rb_type));
if (GEN_GEN >= 8 || rb_type == GL_UNSIGNED_NORMALIZED) {
entry->LogicOpEnable = true;
- entry->LogicOpFunction =
- intel_translate_logic_op(ctx->Color.LogicOp);
+ entry->LogicOpFunction = ctx->Color._LogicOp;
}
} else if (blend_enabled && !ctx->Color._AdvancedBlendMode
&& (GEN_GEN <= 5 || !integer)) {
return BRW_STENCILOP_ZERO;
}
}
-
-int
-intel_translate_logic_op(GLenum opcode)
-{
- switch (opcode) {
- case GL_CLEAR:
- return BRW_LOGICOPFUNCTION_CLEAR;
- case GL_AND:
- return BRW_LOGICOPFUNCTION_AND;
- case GL_AND_REVERSE:
- return BRW_LOGICOPFUNCTION_AND_REVERSE;
- case GL_COPY:
- return BRW_LOGICOPFUNCTION_COPY;
- case GL_COPY_INVERTED:
- return BRW_LOGICOPFUNCTION_COPY_INVERTED;
- case GL_AND_INVERTED:
- return BRW_LOGICOPFUNCTION_AND_INVERTED;
- case GL_NOOP:
- return BRW_LOGICOPFUNCTION_NOOP;
- case GL_XOR:
- return BRW_LOGICOPFUNCTION_XOR;
- case GL_OR:
- return BRW_LOGICOPFUNCTION_OR;
- case GL_OR_INVERTED:
- return BRW_LOGICOPFUNCTION_OR_INVERTED;
- case GL_NOR:
- return BRW_LOGICOPFUNCTION_NOR;
- case GL_EQUIV:
- return BRW_LOGICOPFUNCTION_EQUIV;
- case GL_INVERT:
- return BRW_LOGICOPFUNCTION_INVERT;
- case GL_OR_REVERSE:
- return BRW_LOGICOPFUNCTION_OR_REVERSE;
- case GL_NAND:
- return BRW_LOGICOPFUNCTION_NAND;
- case GL_SET:
- return BRW_LOGICOPFUNCTION_SET;
- default:
- return BRW_LOGICOPFUNCTION_SET;
- }
-}