r600g: fix polygon offset scale
authorMarek Olšák <marek.olsak@amd.com>
Tue, 11 Aug 2015 20:36:51 +0000 (22:36 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 12 Aug 2015 23:25:26 +0000 (01:25 +0200)
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@amd.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c

index f7a76f6cac73b499e702a390489f5a116b4d98da..95987ee2f703a49b7b882113b2e62a6a4226168d 100644 (file)
@@ -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) {
index 848818842aacfdadd6a566545ffb7824007c7721..5cc2283792d852bb4b2b836199e6740409187a7e 100644 (file)
@@ -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) {