<p dir="ltr">I don't think that's right. Have a look at my st/Mesa patch which fixed the same thing. The issue is that es2 always enables point size from shader, so you need to apply that sort of logic. However on desktop, you still have to respect the GL program point size setting.</p>
<div class="gmail_quote">On Jun 2, 2016 12:26 AM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I believe we were using the state-based point size when either the<br>
tessellation evaluation or geometry shader, but the vertex shader<br>
didn't write it.  If the last enabled stage writes it (corresponding<br>
to brw_vue_map_geom_out), we should use the shader's value, otherwise<br>
state.  This should handle the Attenuated case as well, as the<br>
fixed-function shader will also write it.<br>
<br>
Fixes a number of dEQP tests with EXT_tessellation_shader enabled:<br>
dEQP-GLES31.functional.tessellation_geometry_interaction.point_size.*<br>
<br>
Cc: "12.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/mesa/drivers/dri/i965/gen6_sf_state.c | 5 ++---<br>
 src/mesa/drivers/dri/i965/gen7_sf_state.c | 8 ++++----<br>
 src/mesa/drivers/dri/i965/gen8_sf_state.c | 8 ++++----<br>
 3 files changed, 10 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c<br>
index 0538ab7..f35926e 100644<br>
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c<br>
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c<br>
@@ -373,9 +373,8 @@ upload_sf_state(struct brw_context *brw)<br>
    if (multisampled_fbo && ctx->Multisample.Enabled)<br>
       dw3 |= GEN6_SF_MSRAST_ON_PATTERN;<br>
<br>
-   /* _NEW_PROGRAM | _NEW_POINT */<br>
-   if (!(ctx->VertexProgram.PointSizeEnabled ||<br>
-        ctx->Point._Attenuated))<br>
+   /* BRW_NEW_VUE_MAP_GEOM_OUT */<br>
+   if ((brw->vue_map_geom_out.slots_valid & VARYING_BIT_PSIZ) == 0)<br>
       dw4 |= GEN6_SF_USE_STATE_POINT_WIDTH;<br>
<br>
    /* _NEW_POINT - Clamp to ARB_point_parameters user limits */<br>
diff --git a/src/mesa/drivers/dri/i965/gen7_sf_state.c b/src/mesa/drivers/dri/i965/gen7_sf_state.c<br>
index d3a658c..7957614 100644<br>
--- a/src/mesa/drivers/dri/i965/gen7_sf_state.c<br>
+++ b/src/mesa/drivers/dri/i965/gen7_sf_state.c<br>
@@ -213,8 +213,8 @@ upload_sf_state(struct brw_context *brw)<br>
<br>
    dw3 = GEN6_SF_LINE_AA_MODE_TRUE;<br>
<br>
-   /* _NEW_PROGRAM | _NEW_POINT */<br>
-   if (!(ctx->VertexProgram.PointSizeEnabled || ctx->Point._Attenuated))<br>
+   /* BRW_NEW_VUE_MAP_GEOM_OUT */<br>
+   if ((brw->vue_map_geom_out.slots_valid & VARYING_BIT_PSIZ) == 0)<br>
       dw3 |= GEN6_SF_USE_STATE_POINT_WIDTH;<br>
<br>
    /* _NEW_POINT - Clamp to ARB_point_parameters user limits */<br>
@@ -252,11 +252,11 @@ const struct brw_tracked_state gen7_sf_state = {<br>
                _NEW_MULTISAMPLE |<br>
                _NEW_POINT |<br>
                _NEW_POLYGON |<br>
-               _NEW_PROGRAM |<br>
                _NEW_SCISSOR,<br>
       .brw   = BRW_NEW_BLORP |<br>
                BRW_NEW_CONTEXT |<br>
-               BRW_NEW_PRIMITIVE,<br>
+               BRW_NEW_PRIMITIVE |<br>
+               BRW_NEW_VUE_MAP_GEOM_OUT,<br>
    },<br>
    .emit = upload_sf_state,<br>
 };<br>
diff --git a/src/mesa/drivers/dri/i965/gen8_sf_state.c b/src/mesa/drivers/dri/i965/gen8_sf_state.c<br>
index d854b6d..b22a5f0 100644<br>
--- a/src/mesa/drivers/dri/i965/gen8_sf_state.c<br>
+++ b/src/mesa/drivers/dri/i965/gen8_sf_state.c<br>
@@ -172,8 +172,8 @@ upload_sf(struct brw_context *brw)<br>
    /* Clamp to the hardware limits and convert to fixed point */<br>
    dw3 |= U_FIXED(CLAMP(point_size, 0.125f, 255.875f), 3);<br>
<br>
-   /* _NEW_PROGRAM | _NEW_POINT */<br>
-   if (!(ctx->VertexProgram.PointSizeEnabled || ctx->Point._Attenuated))<br>
+   /* BRW_NEW_VUE_MAP_GEOM_OUT */<br>
+   if ((brw->vue_map_geom_out.slots_valid & VARYING_BIT_PSIZ) == 0)<br>
       dw3 |= GEN6_SF_USE_STATE_POINT_WIDTH;<br>
<br>
    /* _NEW_POINT | _NEW_MULTISAMPLE */<br>
@@ -204,12 +204,12 @@ upload_sf(struct brw_context *brw)<br>
 const struct brw_tracked_state gen8_sf_state = {<br>
    .dirty = {<br>
       .mesa  = _NEW_LIGHT |<br>
-               _NEW_PROGRAM |<br>
                _NEW_LINE |<br>
                _NEW_MULTISAMPLE |<br>
                _NEW_POINT,<br>
       .brw   = BRW_NEW_BLORP |<br>
-               BRW_NEW_CONTEXT,<br>
+               BRW_NEW_CONTEXT |<br>
+               BRW_NEW_VUE_MAP_GEOM_OUT,<br>
    },<br>
    .emit = upload_sf,<br>
 };<br>
--<br>
2.8.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>