[Mesa-dev] [PATCH] i965/gen[45]: Do point coord logic whenever gl_PointCoord is asked for.

Eric Anholt eric at anholt.net
Fri Feb 15 22:46:24 PST 2013


The desktop spec asks for gl_PointCoord to be defined only when
GL_POINT_SPRITE is enabled, and it's undefined otherwise (why?!).  The
ES spec doesn't have GL_POINT_SPRITE and gl_PointCoord is always
defined.  So just make our implementation always give you gl_PointCoord
regardless of the enable.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32429
---
 src/mesa/drivers/dri/i965/brw_sf.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index eb361a9..6e5bfe5 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -181,8 +181,11 @@ brw_upload_sf_prog(struct brw_context *brw)
 	    key.point_sprite_coord_replace |= (1 << i);
       }
    }
-   if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(FRAG_ATTRIB_PNTC))
+   if (brw->fragment_program->Base.InputsRead & FRAG_BIT_PNTC) {
       key.do_point_coord = 1;
+      key.do_point_sprite = 1;
+   }
+
    /*
     * Window coordinates in a FBO are inverted, which means point
     * sprite origin must be inverted, too.
-- 
1.7.10.4



More information about the mesa-dev mailing list