On Wed, 7 Jan 2015, Ilia Mirkin wrote:

On Wed, Jan 7, 2015 at 11:36 AM, Axel Davy <axel.d...@ens.fr> wrote:
The cap means D3DFVF_XYZRHW vertices will see clipping.
This is not the case when
PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION is supported, since
it'll disable clipping.

Signed-off-by: Axel Davy <axel.d...@ens.fr>

Cc: "10.4" <mesa-sta...@lists.freedesktop.org>
---
 src/gallium/state_trackers/nine/adapter9.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/nine/adapter9.c 
b/src/gallium/state_trackers/nine/adapter9.c
index e409d5f..871a9a3 100644
--- a/src/gallium/state_trackers/nine/adapter9.c
+++ b/src/gallium/state_trackers/nine/adapter9.c
@@ -549,7 +549,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
                                D3DPMISCCAPS_CULLCCW |
                                D3DPMISCCAPS_COLORWRITEENABLE |
                                D3DPMISCCAPS_CLIPPLANESCALEDPOINTS |
-                               D3DPMISCCAPS_CLIPTLVERTS |
+                               /*D3DPMISCCAPS_CLIPTLVERTS |*/

Why is this commented out and not just removed?

In adapter9, we write all possible flags, but comment thoses that we don't support.


                                D3DPMISCCAPS_TSSARGTEMP |
                                D3DPMISCCAPS_BLENDOP |
                                D3DPIPECAP(INDEP_BLEND_ENABLE, 
D3DPMISCCAPS_INDEPENDENTWRITEMASKS) |
@@ -560,6 +560,8 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
                                D3DPIPECAP(MIXED_COLORBUFFER_FORMATS, 
D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS) |
                                D3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING |
                                /*D3DPMISCCAPS_FOGVERTEXCLAMPED*/0;
+    if (!screen->get_param(screen, PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION))
+        pCaps->PrimitiveMiscCaps |= D3DPMISCCAPS_CLIPTLVERTS;

Just to confirm, when that cap is available, you *always* turn use the
window space position?

D3DPMISCCAPS_CLIPTLVERTS indicatesthe device will clip D3DFVF_XYZRHW vertices. This is what happen with our
fallback of D3DFVF_XYZRHW.

When we have PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION, we use
the vs_window_space_position flag to implement D3DFVF_XYZRHW.
According to spec, vs_window_space_position will bypass clipping
too.


 -ilia

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to