mesa: remove the UsesDFdy flag

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

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Timothy Arceri
2016-10-05 15:28:50 +11:00
parent 556335eb99
commit 201f940d2e
5 changed files with 2 additions and 22 deletions

View File

@@ -26,8 +26,8 @@
* *
* Sets the InputsRead and OutputsWritten of Mesa programs. * Sets the InputsRead and OutputsWritten of Mesa programs.
* *
* Additionally, for fragment shaders, sets the InterpQualifier array, the * Additionally, for fragment shaders, sets the InterpQualifier array, and the
* IsCentroid and IsSample bitfields, and the UsesDFdy flag. * IsCentroid and IsSample bitfields.
* *
* Mesa programs (gl_program, not gl_shader_program) have a set of * Mesa programs (gl_program, not gl_shader_program) have a set of
* flags indicating which varyings are read and written. Computing * 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_dereference_array *);
virtual ir_visitor_status visit_enter(ir_function_signature *); 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_discard *);
virtual ir_visitor_status visit_enter(ir_texture *); virtual ir_visitor_status visit_enter(ir_texture *);
virtual ir_visitor_status visit(ir_dereference_variable *); 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; 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_visitor_status
ir_set_program_inouts_visitor::visit_enter(ir_discard *) 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)); memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier));
fprog->IsCentroid = 0; fprog->IsCentroid = 0;
fprog->IsSample = 0; fprog->IsSample = 0;
fprog->UsesDFdy = false;
fprog->UsesKill = false; fprog->UsesKill = false;
} }
visit_list_elements(&v, instructions); visit_list_elements(&v, instructions);

View File

@@ -2039,7 +2039,6 @@ struct gl_fragment_program
{ {
struct gl_program Base; /**< base class */ struct gl_program Base; /**< base class */
GLboolean UsesKill; /**< shader uses KIL instruction */ GLboolean UsesKill; /**< shader uses KIL instruction */
GLboolean UsesDFdy; /**< shader uses DDY instruction */
GLboolean OriginUpperLeft; GLboolean OriginUpperLeft;
GLboolean PixelCenterInteger; GLboolean PixelCenterInteger;
enum gl_frag_depth_layout FragDepthLayout; enum gl_frag_depth_layout FragDepthLayout;

View File

@@ -120,7 +120,6 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->PixelCenterInteger = state.option.PixelCenterInteger; program->PixelCenterInteger = state.option.PixelCenterInteger;
program->UsesKill = state.fragment.UsesKill; program->UsesKill = state.fragment.UsesKill;
program->UsesDFdy = state.fragment.UsesDFdy;
free(program->Base.Instructions); free(program->Base.Instructions);
program->Base.Instructions = prog.Instructions; program->Base.Instructions = prog.Instructions;

View File

@@ -388,8 +388,6 @@ ARL_instruction: ARL maskedAddrReg ',' scalarSrcReg
VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg
{ {
if ($1.Opcode == OPCODE_DDY)
state->fragment.UsesDFdy = 1;
$$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL); $$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL);
} }
; ;

View File

@@ -213,7 +213,6 @@ struct asm_parser_state {
struct { struct {
unsigned UsesKill:1; unsigned UsesKill:1;
unsigned UsesDFdy:1;
} fragment; } fragment;
}; };