llvmpipe: add plumbing for ARB_depth_clamp
authorMatthew McClure <mcclurem@vmware.com>
Tue, 10 Dec 2013 21:10:03 +0000 (13:10 -0800)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 11 Dec 2013 18:24:21 +0000 (18:24 +0000)
commite84a1ab3c400f819408a7ebe01c2325cd59d94d3
treec99b65fb562865046269d8d48433b30c25fa69dd
parent00faf82832f3e6ef886abad246b50cc47b901c1f
llvmpipe: add plumbing for ARB_depth_clamp

With this patch llvmpipe will adhere to the ARB_depth_clamp enabled state when
clamping the fragment's zw value. To support this, the variant key now includes
the depth_clamp state. key->depth_clamp is derived from pipe_rasterizer_state's
(depth_clip == 0), thus depth clamp is only enabled when depth clip is disabled.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_fs.h
src/gallium/include/pipe/p_state.h