- if (svga->curr.clip.nr) {
- SVGA_DBG(DEBUG_SWTNL, "%s: userclip\n", __FUNCTION__);
- need_pipeline = TRUE;
+ if (svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
+ unsigned sprite_coord_gen = svga->curr.rast->templ.sprite_coord_enable;
+ unsigned generic_inputs =
+ svga->curr.fs ? svga->curr.fs->generic_inputs : 0;
+
+ if (sprite_coord_gen &&
+ (generic_inputs & ~sprite_coord_gen)) {
+ /* The fragment shader is using some generic inputs that are
+ * not being replaced by auto-generated point/sprite coords (and
+ * auto sprite coord generation is turned on).
+ * The SVGA3D interface does not support that: if we enable
+ * SVGA3D_RS_POINTSPRITEENABLE it gets enabled for _all_
+ * texture coordinate sets.
+ * To solve this, we have to use the draw-module's wide/sprite
+ * point stage.
+ */
+ need_pipeline = TRUE;
+ }