[Mesa-dev] [PATCH 05/16] gallium/draw: support hack to disable clipping
David Heidelberger
david.heidelberger at ixit.cz
Sat Oct 18 04:54:55 PDT 2014
From: Christoph Bumiller <christoph.bumiller at speed.at>
Signed-off-by: David Heidelberger <david.heidelberger at ixit.cz>
---
src/gallium/auxiliary/draw/draw_cliptest_tmp.h | 2 +-
src/gallium/auxiliary/draw/draw_context.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
index 779b237..119c677 100644
--- a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
@@ -171,7 +171,7 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
position[2] = position[2] * w * scale[2] + trans[2];
position[3] = w;
}
-#ifdef DEBUG
+#if 0 /* def DEBUG - WTF ? */
/* For debug builds, set the clipped vertex's window coordinate
* to NaN to help catch potential errors later.
*/
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index b0f4ca2..20dea66 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -378,6 +378,11 @@ void draw_set_viewport_states( struct draw_context *draw,
viewport->translate[1] == 0.0f &&
viewport->translate[2] == 0.0f &&
viewport->translate[3] == 0.0f);
+
+ draw->driver.bypass_clip_xy = vps[0].scale[3] == 0.0f;
+ draw->clip_xy = !draw->driver.bypass_clip_xy;
+ draw->identity_viewport =
+ draw->identity_viewport || vps[0].scale[3] == 0.0f;
}
--
2.1.2
More information about the mesa-dev
mailing list