summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-12-05 19:43:13 +1300
committerEmil Velikov <[email protected]>2014-12-11 13:54:53 +0000
commitffaf58e7d0f6bbce60401bc4bb851b9e4fc1a15e (patch)
treed7339bfe254928e164d2b7f169ef99f9eecadcd8 /src
parentbb9dea8a29408efec42cb2ee9cb00c51ff6f5ef5 (diff)
i965/Gen6-7: Fix point sprites with PolygonMode(GL_POINT)
This was an oversight in the original patch. When PolygonMode is used, then front faces, back faces, or both may be rendered as points and are affected by point sprite state. Note that SNB/IVB can't actually be fully conformant here, for a legacy context -- we don't have separate sets of pointsprite enables for front and back faces. Haswell ignores pointsprite state correctly in hardware for non-point rasterization, so can do this correctly, but it doesn't seem worth it. Signed-off-by: Chris Forbes <[email protected]> Cc: "10.4" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86764 Reviewed-by: Matt Turner <[email protected]> (cherry picked from commit ed56c16820aea0e115768d77861fe266380f2595)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index fd7c3958ff5..4d0d96769b3 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -133,6 +133,12 @@ static bool
is_drawing_points(const struct brw_context *brw)
{
/* Determine if the primitives *reaching the SF* are points */
+ /* _NEW_POLYGON */
+ if (brw->ctx.Polygon.FrontMode == GL_POINT ||
+ brw->ctx.Polygon.BackMode == GL_POINT) {
+ return true;
+ }
+
if (brw->geometry_program) {
/* BRW_NEW_GEOMETRY_PROGRAM */
return brw->geometry_program->OutputType == GL_POINTS;