<div class="gmail_quote">On Thu, Jul 22, 2010 at 12:17 AM, Roland Scheidegger <span dir="ltr">&lt;<a href="mailto:sroland@vmware.com">sroland@vmware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div class="h5">Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
there is a new branch gallium-depth-clamp in the main repository which implements ARB_depth_clamp in Gallium. Wine uses this extension to disable clipping when it&#39;s requested from a D3D9 app, so it&#39;s an important one.<br>


<br>
There is a new state &quot;depth_clamp&quot; in pipe_clip_state, and a new cap PIPE_CAP_DEPTH_CLAMP. If you think this feature should be mandatory in Gallium instead, it&#39;s ok with me. There are several reasons I put the enable bit in pipe_clip_state, but the most important one is that Z clipping must be disabled in hardware first for it to work. It also implements depth_clamp handling in cso_cache and wires up ARB_depth_clamp in st/mesa.<br>


<br>
The support in Draw has also been implemented, and both softpipe and llvmpipe pass piglit/depth_clamp and piglit/depth-clamp-range.<br>
<br>
<a href="http://cgit.freedesktop.org/mesa/mesa/log/?h=gallium-depth-clamp" target="_blank">http://cgit.freedesktop.org/mesa/mesa/log/?h=gallium-depth-clamp</a><br>
</blockquote>
<br></div></div>
One thing I was wondering does it actually make sense to call it depth clamp? I think d3d10 name for once (which calls this functionality depth clip though of course this means enable/disable is reversed) makes more sense - this disables near/far plane clipping, hence the necessity to clamp to 0/1.<br>


I guess having this in clip state is ok - d3d10 puts depth clip into rasterizer state, but then again d3d10 doesn&#39;t have any clip state...<br></blockquote></div><br>Depth clip does sound better to me, but honestly I don&#39;t care how we call it. If you like the D3D naming, so be it.<br>

<br>-Marek<br>