*
* 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
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 *);
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 *)
{
memset(fprog->InterpQualifier, 0, sizeof(fprog->InterpQualifier));
fprog->IsCentroid = 0;
fprog->IsSample = 0;
- fprog->UsesDFdy = false;
fprog->UsesKill = false;
}
visit_list_elements(&v, instructions);
{
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;
VECTORop_instruction: VECTOR_OP maskedDstReg ',' swizzleSrcReg
{
- if ($1.Opcode == OPCODE_DDY)
- state->fragment.UsesDFdy = 1;
$$ = asm_instruction_copy_ctor(& $1, & $2, & $4, NULL, NULL);
}
;