Mesa (10.6): r600g: fix polygon offset scale

Emil Velikov evelikov at kemper.freedesktop.org
Thu Aug 20 12:52:56 UTC 2015


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Aug 11 22:36:51 2015 +0200

r600g: fix polygon offset scale

The value was copied from r300g, which uses 1/12 subpixels, but this hw
uses 1/16 subpixels.

Should fix piglit: gl-1.4-polygon-offset (formerly a glean test)
(untested, ported from radeonsi)

Reviewed-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit d335aad11b208bcdcc75a99d4b6c5fc8b69ce368)

---

 src/gallium/drivers/r600/evergreen_state.c |    2 +-
 src/gallium/drivers/r600/r600_state.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 3256332..a7c705d 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -485,7 +485,7 @@ static void *evergreen_create_rs_state(struct pipe_context *ctx,
 
 	/* offset */
 	rs->offset_units = state->offset_units;
-	rs->offset_scale = state->offset_scale * 12.0f;
+	rs->offset_scale = state->offset_scale * 16.0f;
 	rs->offset_enable = state->offset_point || state->offset_line || state->offset_tri;
 
 	if (state->point_size_per_vertex) {
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 960dfce..254201e 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -473,7 +473,7 @@ static void *r600_create_rs_state(struct pipe_context *ctx,
 
 	/* offset */
 	rs->offset_units = state->offset_units;
-	rs->offset_scale = state->offset_scale * 12.0f;
+	rs->offset_scale = state->offset_scale * 16.0f;
 	rs->offset_enable = state->offset_point || state->offset_line || state->offset_tri;
 
 	if (state->point_size_per_vertex) {




More information about the mesa-commit mailing list