nvc0/ir: clarify recursion fix to finding first tex uses
[mesa.git] / src / mesa / state_tracker / st_atom_shader.c
index ba04c1fb73ecbe8d82a59bc37a8676a9fb849bda..6515a98a3fbca10b6bc95855d7bf6581c36de630 100644 (file)
@@ -89,6 +89,10 @@ update_fp( struct st_context *st )
    key.clamp_color = st->clamp_frag_color_in_shader &&
                      st->ctx->Color._ClampFragmentColor;
 
+   /* Ignore sample qualifier while computing this flag. */
+   key.persample_shading =
+      _mesa_get_min_invocations_per_fragment(st->ctx, &stfp->Base, true) > 1;
+
    st->fp_variant = st_get_fp_variant(st, stfp, &key);
 
    st_reference_fragprog(st, &st->fp, stfp);
@@ -108,7 +112,7 @@ update_fp( struct st_context *st )
 const struct st_tracked_state st_update_fp = {
    "st_update_fp",                                     /* name */
    {                                                   /* dirty */
-      _NEW_BUFFERS,                                    /* mesa */
+      _NEW_BUFFERS | _NEW_MULTISAMPLE,                 /* mesa */
       ST_NEW_FRAGMENT_PROGRAM                           /* st */
    },
    update_fp                                   /* update */
@@ -141,11 +145,8 @@ update_vp( struct st_context *st )
     * edgeflag semantics, and extend the vertex shader to pass through
     * the input to the output.  We'll need to use similar logic to set
     * up the extra vertex_element input for edgeflags.
-    * _NEW_POLYGON, ST_NEW_EDGEFLAGS_DATA
     */
-   key.passthrough_edgeflags = (st->vertdata_edgeflags && (
-                                st->ctx->Polygon.FrontMode != GL_FILL ||
-                                st->ctx->Polygon.BackMode != GL_FILL));
+   key.passthrough_edgeflags = st->vertdata_edgeflags;
 
    key.clamp_color = st->clamp_vert_color_in_shader &&
                      st->ctx->Light._ClampVertexColor;
@@ -164,8 +165,8 @@ update_vp( struct st_context *st )
 const struct st_tracked_state st_update_vp = {
    "st_update_vp",                                     /* name */
    {                                                   /* dirty */
-      _NEW_POLYGON,                                    /* mesa */
-      ST_NEW_VERTEX_PROGRAM | ST_NEW_EDGEFLAGS_DATA    /* st */
+      0,                                                /* mesa */
+      ST_NEW_VERTEX_PROGRAM                             /* st */
    },
    update_vp                                           /* update */
 };