r600g: Implement POLYGON_OFFSET_UNITS_UNSCALED
authorAxel Davy <axel.davy@ens.fr>
Tue, 14 Jun 2016 21:13:26 +0000 (23:13 +0200)
committerAxel Davy <axel.davy@ens.fr>
Sat, 25 Jun 2016 08:16:15 +0000 (10:16 +0200)
commitf6704f2a4db7113e597d4bab2cefc02e166c2ad9
tree8a13fe277703cf69b747a0300a2ec4c750b02787
parentbe7957b156e30ffe9fb647b58ba00e236e498c3f
r600g: Implement POLYGON_OFFSET_UNITS_UNSCALED

Empirical tests show that the polygon offset
behaviour is entirely determined by the content of
the PA_SU_POLY_OFFSET states, and not by the depth buffer
format bound.

PA_SU_POLY_OFFSET seems to directly set the parameters of
the polygon offset formula, and setting 0 for
PA_SU_POLY_OFFSET_DB_FMT_CNTL (ie setting the unorm depth
bias behaviour with a scale of 2^0 = 1.0f) gives the unscaled
behaviour.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_state_common.c