diff options
author | Roland Scheidegger <[email protected]> | 2013-06-27 19:01:11 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-06-27 19:06:40 +0200 |
commit | 670f829102f45263f32826ec2dbbbf5c367b5f54 (patch) | |
tree | e0114f9ba19bdc94f3faf99c7117dd125519d5dc /src/gallium/drivers/llvmpipe/lp_state_surface.c | |
parent | b04a295a4a0cd2defe352b3193b5fa79ca8fc9fc (diff) |
llvmpipe: handle offset_clamp
This was just ignored (unless for some reason like unfilled polys draw was
handling this).
I'm not convinced of that code, putting the float for the clamp in the key
isn't really a good idea. Then again the other floats for depth bias are
already in there too anyway (should probably have a jit_context for the
setup function), so this is just a quick fix.
Also, the "minimum resolvable depth difference" used isn't really right as it
should be calculated according to the z values of the current primitive
and not be a constant (of course, this only makes a difference for float
depth buffers), at least for d3d10, so depth biasing is still not quite right.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_surface.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_surface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c index 375ceb2b942..e6aac319447 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -65,6 +65,8 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, } /* Tell draw module how deep the Z/depth buffer is */ + /* FIXME: mrd constant isn't right should use a value derived from + * current primitive not a constant (for float depth buffers) */ if (lp->framebuffer.zsbuf) { int depth_bits; double mrd; |