gallium: added draw_set_mrd() function to fix polygon offset
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 Dec 2008 01:02:27 +0000 (18:02 -0700)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 11 Dec 2008 01:06:44 +0000 (18:06 -0700)
commitd0bc5293d6e1e9c34fa822b7c2928932ed22462c
tree097faccccfa6a17402b1cbb86c4db719bfea9fdf
parent8137da952b6f30329adf7d49d2d9e58625534dd4
gallium: added draw_set_mrd() function to fix polygon offset

The Minimum Resolvable Depth factor depends on the driver and can't just
be computed from the number of Z buffer bits.
Glean's polygon offset test now passes with softpipe.
Still need to determine the MRD factor for other gallium drivers, if they use
the draw module's polygon offset stage...
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_pipe_offset.c
src/gallium/auxiliary/draw/draw_private.h
src/gallium/drivers/softpipe/sp_state_surface.c