glsl: Mark program as using dFdy if coarse/fine variant is used
authorChris Forbes <chrisf@ijw.co.nz>
Thu, 14 Aug 2014 09:03:53 +0000 (21:03 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Fri, 15 Aug 2014 06:03:53 +0000 (18:03 +1200)
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/ir_set_program_inouts.cpp

index 5163eb215df6471de79320b07b1d316ec0d7950c..97ead750aee3deed4f536dd57990ee1ba08a3988 100644 (file)
@@ -306,7 +306,9 @@ 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 ||
+        ir->operation == ir_unop_dFdy_coarse ||
+        ir->operation == ir_unop_dFdy_fine)) {
       gl_fragment_program *fprog = (gl_fragment_program *) prog;
       fprog->UsesDFdy = true;
    }