Mesa (master): mesa: remove the UsesDFdy flag

Timothy Arceri tarceri at kemper.freedesktop.org
Thu Oct 6 05:04:31 UTC 2016


Module: Mesa
Branch: master
Commit: 201f940d2e49d6ead5dfd6921b33bf6afefa4c68
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=201f940d2e49d6ead5dfd6921b33bf6afefa4c68

Author: Timothy Arceri <timothy.arceri at collabora.com>
Date:   Wed Oct  5 15:28:50 2016 +1100

mesa: remove the UsesDFdy flag

Seems the last user of this was removed in 08bc74e69.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/compiler/glsl/ir_set_program_inouts.cpp | 19 ++-----------------
 src/mesa/main/mtypes.h                      |  1 -
 src/mesa/program/arbprogparse.c             |  1 -
 src/mesa/program/program_parse.y            |  2 --
 src/mesa/program/program_parser.h           |  1 -
 5 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index 48ed3c5..f5b36df 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -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 *);
@@ -412,19 +411,6 @@ ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir)
 }
 
 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 *)
 {
    /* discards are only allowed in fragment shaders. */
@@ -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);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index b279fc4..d494872 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 3ddaeca..b7bddfe 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -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;
diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
index ad94fe0..fc8eed7 100644
--- a/src/mesa/program/program_parse.y
+++ b/src/mesa/program/program_parse.y
@@ -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);
 	}
 	;
diff --git a/src/mesa/program/program_parser.h b/src/mesa/program/program_parser.h
index af7b2a0..05ceb92 100644
--- a/src/mesa/program/program_parser.h
+++ b/src/mesa/program/program_parser.h
@@ -213,7 +213,6 @@ struct asm_parser_state {
 
    struct {
       unsigned UsesKill:1;
-      unsigned UsesDFdy:1;
    } fragment;
 };
 




More information about the mesa-commit mailing list