i965: Use the translated color logic op from the context

And delete the resulting dead code.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
This commit is contained in:
Ian Romanick 2018-01-03 11:43:10 -08:00
parent 9c1f010f34
commit 0c69db895f
3 changed files with 1 additions and 44 deletions

View File

@ -1499,7 +1499,6 @@ extern void intelInitExtensions(struct gl_context *ctx);
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);

View File

@ -2819,8 +2819,7 @@ set_blend_entry_bits(struct brw_context *brw, BLEND_ENTRY_GENXML *entry, int i,
_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)) {

View File

@ -117,44 +117,3 @@ intel_translate_stencil_op(GLenum op)
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;
}
}