Mesa (10.5): freedreno/a3xx: point size should not be divided by 2

Emil Velikov evelikov at kemper.freedesktop.org
Thu Apr 9 11:27:23 UTC 2015


Module: Mesa
Branch: 10.5
Commit: 9a3a2479d49ac2e22e4c4b253a20e75aca38a77a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a3a2479d49ac2e22e4c4b253a20e75aca38a77a

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Mar 17 01:00:38 2015 -0400

freedreno/a3xx: point size should not be divided by 2

The division is probably a holdover from the days when the fixed point
inline functions generated by headergen were broken.

Also reduce the maximum point size to 4092 (vs 4096), which is what the
blob does.

Cc: "10.4 10.5" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
(cherry picked from commit 7fc5da8b9392042b5f8a989d2afa49ea1944f9a9)

---

 src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c |    8 ++++----
 src/gallium/drivers/freedreno/freedreno_screen.c    |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c
index 4b926b5..345f688 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c
@@ -50,7 +50,7 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
 
 	if (cso->point_size_per_vertex) {
 		psize_min = util_get_min_point_size(cso);
-		psize_max = 8192;
+		psize_max = 4092;
 	} else {
 		/* Force the point size to be as if the vertex output was disabled. */
 		psize_min = cso->point_size;
@@ -67,9 +67,9 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
 */
 	so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER; /* ??? */
 	so->gras_su_point_minmax =
-			A3XX_GRAS_SU_POINT_MINMAX_MIN(psize_min/2) |
-			A3XX_GRAS_SU_POINT_MINMAX_MAX(psize_max/2);
-	so->gras_su_point_size   = A3XX_GRAS_SU_POINT_SIZE(cso->point_size/2);
+			A3XX_GRAS_SU_POINT_MINMAX_MIN(psize_min) |
+			A3XX_GRAS_SU_POINT_MINMAX_MAX(psize_max);
+	so->gras_su_point_size   = A3XX_GRAS_SU_POINT_SIZE(cso->point_size);
 	so->gras_su_poly_offset_scale =
 			A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(cso->offset_scale);
 	so->gras_su_poly_offset_offset =
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 1ce96d3..f4ae624 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -314,7 +314,7 @@ fd_screen_get_paramf(struct pipe_screen *pscreen, enum pipe_capf param)
 	case PIPE_CAPF_MAX_LINE_WIDTH_AA:
 	case PIPE_CAPF_MAX_POINT_WIDTH:
 	case PIPE_CAPF_MAX_POINT_WIDTH_AA:
-		return 8192.0f;
+		return 4092.0f;
 	case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
 		return 16.0f;
 	case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS:




More information about the mesa-commit mailing list