i965: Use the translated color logic op from the context
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 3 Jan 2018 19:43:10 +0000 (11:43 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 26 Jan 2018 03:21:46 +0000 (11:21 +0800)
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>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/genX_state_upload.c
src/mesa/drivers/dri/i965/intel_state.c

index 9046acd175cb16ec0318172d9207dd8d888fdf0d..c30207e313a419bd70d58a5eb43c0049daaaf423 100644 (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);
index 50ac5bc59fff4f9558feba69abafde5dcfa29c9a..aa4d64d08e21eca51908b51c28c202f5dcb76591 100644 (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)) {
index 5001a49faffb9aa4a3a701ad31ffc4cbfc56a9e0..3d477dfcf0fa102a1a811fe5d15c331fa8fcff7a 100644 (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;
-   }
-}