st/glsl_to_tgsi: set FS_EARLY_DEPTH_STENCIL when required
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 11 Mar 2016 23:11:35 +0000 (18:11 -0500)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 14 Mar 2016 22:24:37 +0000 (17:24 -0500)
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 18cea60fc748210f135f3c3c5c81204df7e1a3c6..184140555498fb2882799f028792571b71f058f8 100644 (file)
@@ -6121,6 +6121,9 @@ st_translate_program(
    }
 
    if (procType == TGSI_PROCESSOR_FRAGMENT) {
+      if (program->shader->EarlyFragmentTests)
+         ureg_property(ureg, TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL, 1);
+
       if (proginfo->InputsRead & VARYING_BIT_POS) {
           /* Must do this after setting up t->inputs. */
           emit_wpos(st_context(ctx), t, proginfo, ureg,