mesa: remove the UsesDFdy flag
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 5 Oct 2016 04:28:50 +0000 (15:28 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 6 Oct 2016 05:03:46 +0000 (16:03 +1100)
Seems the last user of this was removed in 08bc74e69.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/ir_set_program_inouts.cpp
src/mesa/main/mtypes.h
src/mesa/program/arbprogparse.c
src/mesa/program/program_parse.y
src/mesa/program/program_parser.h

index 48ed3c5c9e28e44fca24b127aab1ea4e8d48e636..f5b36df680dbe75a17799dfdd19dbd886ed86289 100644 (file)
@@ -26,8 +26,8 @@
  *
  * Sets the InputsRead and OutputsWritten of Mesa programs.
  *
- * Additionally, for fragment shaders, sets the InterpQualifier array, the
- * IsCentroid and IsSample bitfields, and the UsesDFdy flag.
+ * Additionally, for fragment shaders, sets the InterpQualifier array, and the
+ * IsCentroid and IsSample bitfields.
  *
  * Mesa programs (gl_program, not gl_shader_program) have a set of
  * flags indicating which varyings are read and written.  Computing
@@ -58,7 +58,6 @@ public:
 
    virtual ir_visitor_status visit_enter(ir_dereference_array *);
    virtual ir_visitor_status visit_enter(ir_function_signature *);
-   virtual ir_visitor_status visit_enter(ir_expression *);
    virtual ir_visitor_status visit_enter(ir_discard *);
    virtual ir_visitor_status visit_enter(ir_texture *);
    virtual ir_visitor_status visit(ir_dereference_variable *);
@@ -411,19 +410,6 @@ ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir)
    return visit_continue_with_parent;
 }
 
-ir_visitor_status
-ir_set_program_inouts_visitor::visit_enter(ir_expression *ir)
-{
-   if (this->shader_stage == MESA_SHADER_FRAGMENT &&
-       (ir->operation == ir_unop_dFdy ||
-        ir->operation == ir_unop_dFdy_coarse ||
-        ir->operation == ir_unop_dFdy_fine)) {
-      gl_fragment_program *fprog = (gl_fragment_program *) prog;
-      fprog->UsesDFdy = true;
-   }
-   return visit_continue;
-}
-
 ir_visitor_status
 ir_set_program_inouts_visitor::visit_enter(ir_discard *)
 {
@@ -462,7 +448,6 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
       memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier));
       fprog->IsCentroid = 0;
       fprog->IsSample = 0;
-      fprog->UsesDFdy = false;
       fprog->UsesKill = false;
    }
    visit_list_elements(&v, instructions);
index b279fc4c6df165368a8d97cf17fd623f90affdc6..d494872eef9646d0a0c9bb05948f0908878ccdef 100644 (file)
@@ -2039,7 +2039,6 @@ struct gl_fragment_program
 {
    struct gl_program Base;   /**< base class */
    GLboolean UsesKill;          /**< shader uses KIL instruction */
-   GLboolean UsesDFdy;          /**< shader uses DDY instruction */
    GLboolean OriginUpperLeft;
    GLboolean PixelCenterInteger;
    enum gl_frag_depth_layout FragDepthLayout;
index 3ddaeca8a71f44711e85c9c5c6b3212b452dd216..b7bddfe270f58d1d399f139967d5c6815b3146f2 100644 (file)
@@ -120,7 +120,6 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
    program->PixelCenterInteger = state.option.PixelCenterInteger;
 
    program->UsesKill            = state.fragment.UsesKill;
-   program->UsesDFdy            = state.fragment.UsesDFdy;
 
    free(program->Base.Instructions);
    program->Base.Instructions = prog.Instructions;
index ad94fe032bc7208dbad0bbfcec8faf70c7331d99..fc8eed75593b15600d26c2d3a2a78ff371687592 100644 (file)
@@ -388,8 +388,6 @@ ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg
 
 VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg
        {
-          if ($1.Opcode == OPCODE_DDY)
-             state->fragment.UsesDFdy = 1;
           $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL);
        }
        ;
index af7b2a0be3e39114d69600986e24f4d121db2af2..05ceb92dfab8af56eb700e151b45ef1fb6cf5c22 100644 (file)
@@ -213,7 +213,6 @@ struct asm_parser_state {
 
    struct {
       unsigned UsesKill:1;
-      unsigned UsesDFdy:1;
    } fragment;
 };