Mesa (master): svga: do not emulate wide points in GS when doing transform feedback

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 7 19:51:09 UTC 2017


Module: Mesa
Branch: master
Commit: fed72ff6cb85fa6044335cfc41d8492458f53750
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fed72ff6cb85fa6044335cfc41d8492458f53750

Author: Charmaine Lee <charmainel at vmware.com>
Date:   Wed Mar 15 15:18:14 2017 -0700

svga: do not emulate wide points in GS when doing transform feedback

Emulating wide points in geometry shader when doing transform feedback
is problematic. This patch disables the emulation.

Tested with piglit test ext_transform_feedback-points.
Also tested with MTT glretrace, mesa demos pointblast and spriteblast.

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/drivers/svga/svga_state_tgsi_transform.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_state_tgsi_transform.c b/src/gallium/drivers/svga/svga_state_tgsi_transform.c
index 9e643ff49a..b567aab6bc 100644
--- a/src/gallium/drivers/svga/svga_state_tgsi_transform.c
+++ b/src/gallium/drivers/svga/svga_state_tgsi_transform.c
@@ -249,9 +249,11 @@ update_tgsi_transform(struct svga_context *svga, unsigned dirty)
    if (svga->curr.reduced_prim == PIPE_PRIM_POINTS) {
       /* If the current prim type is POINTS and the current geometry shader
        * emits wide points, transform the shader to emulate wide points using
-       * quads.
+       * quads. NOTE: we don't do emulation of wide points in GS when
+       * transform feedback is enabled.
        */
-      if (gs != NULL && (gs->base.info.writes_psize || gs->wide_point)) {
+      if (gs != NULL && !gs->base.stream_output &&
+          (gs->base.info.writes_psize || gs->wide_point)) {
          orig_gs = gs->base.parent ? gs->base.parent : &gs->base;
          new_gs = emulate_point_sprite(svga, orig_gs, orig_gs->tokens);
       }
@@ -260,7 +262,7 @@ update_tgsi_transform(struct svga_context *svga, unsigned dirty)
        * shader emits wide point then create a new geometry shader to emulate
        * wide point.
        */
-      else if (gs == NULL &&
+      else if (gs == NULL && !vs->base.stream_output &&
                (svga->curr.rast->pointsize > 1.0 ||
                 vs->base.info.writes_psize)) {
          new_gs = add_point_sprite_shader(svga);




More information about the mesa-commit mailing list